In this paper, an exact Fourier cosine method is proposed for the numerical calculation of the propagation constant in the rib-type dielectric waveguides with arbitrary index profile. Example is given for rib waveguides based on semiconductor material and silicon dioxide. It establishes the accuracy of Fourier cosine method as a criterion in calculation of critical design parameters such as propagation constant and mode field profile. Moreover, the accuracy and CPU time of this method are presented as well as compared with the commercial software Beam PROP.