The calculation of a propagation constant is an interesting problem in the study of planar waveguides. We present a new method for solving the problem of a planar dielectric waveguide with arbitrary refractive-index variation for either TE or TM modes, and this method is simpler than other methods. Taking a parabolic refractive-index profile as an example, we show that high accuracy can be attained with this new method, provided that the waveguide is divided into layers of proper number and thickness.