we present here a simple numerical method to obtain the mode effective indices as well as field distributions of modes of any arbitrary profile planar optical waveguide. The method is based on the solutions of scalar and semivectorial Helmoltz's equation by finite difference algorithm and devised with a field convergence technique. This approach is quite general and can be applied straightforwardly to calculate the guided as well as quasior leaky modes of any arbitrary planar structure without the need to solve any eigenvalue equation or any complex matrix formalism. Besides providing the ease of application, the algorithm is particularly useful for waveguides with any graded index profile or with irregular multilayered structure and multilayered waveguides with a localised arbitrary nonlinear film. The performance of our method is verified against typical problems with analytical solutions or having results known otherwise, and is shown to yield results with good accuracy.