We present a method to measure spherical power in ophthalmic lenses based on the measurement of moiré patterns, using the technique called infinite fringe moiré deflectometry. We develop a theoretical model using a geometrical analysis that was validated by a computer simulation using the LabVIEW software; also we build an experimental setup in which we get experimental data. As results, we obtain a measurement of the spherical power of a set of ophthalmic test lenses in the range of ± 0.50 to ± 3.00 diopters. This power is obtained by measuring the separation between each fringe of moiré pattern, from the obtained data we analyze the theoretical model and we make the necessary corrections, using polynomial regression by the method of least squares, to comply with standard ISO8598. At the same time, some components of the experimental setup were being improved to facilitate its implementation and obtain better experimental data.