A powerful numerical technique, the quadratic finite element method with Galerkin approach is proposed for analyzing the modal characteristic of single mode optical fiber with arbitrary refractive index profile. A generalized refractive index profile is defined, which can be characterized by few parameters. The closed form solution of the wave equation for optical waveguide is available only for step index profile. Hence for arbitrary refractive index profile, one has to look for approximate method of analysis. Most of the existing numerical approaches are good enough for the calculation of propagation constant, though some of them are not suited for arbitrary refractive index profile. However for the numerical technique can be made highly accurate so as to meet the above requirements, with only moderate computational efforts. The simulated results when compared with exact ones for step index profile, confirms the accuracy of the proposed numerical technique. Examples are given for simple step index fiber, dispersion shifted fiber, W-fiber, quadruply cladded fiber. The numerical approach can also be used in the analysis of multimode fibers. With multiple cladded fiber, we can have a wavelength span over which the dispersion is kept confined within a prescribed level so as to exploit the vast transmission capacity offered by single mode fiber.