An improved theory of the change of the real part of the dielectric function in quantum-well lasers is presented. New formulas for the intraband component are given, which allow for the first time to take into account all possible optical transitions on equal footing. As an application, the dependence of the change of the effective index on the modal gain is investigated.