Accurate measurements of the InP refractive index as a function of free-carrier doping are reported at 1.3 and 1.5 mu m, the two strategic wavelengths for optical communications. A total of 21 samples with different N- and P-doping levels have been measured using a novel and simplified grating-coupling technique. Ln contrast to the conventional method, this only involves the use of a directly etched diffraction grating on the sample surface, thereby avoiding the necessity of a specific guiding layer. The measured index, in agreement with earlier predictions, decreases by more than 0.05 when the N doping is increased from below 10(15) to about 10(19) electrons per cubic centimeter, This effect, however, is much less pronounced with P doping than with N doping. (C) 1996 American Institute of Physics.