This paper proposes the use of digital-grating moiré effect for measuring the focal lengths and radius of curvatures of biconvex and biconcave spherical simple lenses and spherical mirrors. Based on Fresnel diffraction, the equation for the electric field of propagated light passing through the test samples was derived. Through digital image post processing, the recorded intensity on an observation screen was superimposed on a digital grating to generate a moiré pattern. On substituting the slant angle of the moiré pattern into the derived equation, the focal lengths and radius of curvatures could be determined. The experimental results successfully demonstrated the feasibility of the proposed method; the percent errors for focal length and radius of curvature measurement were less than 0.5%. The measurement uncertainty was analyzed and the correctness of the derived equation was confirmed through simulation. Because of the use of digital image post processing, the proposed method has advantages such as a simple set up, easy operation, high stability, high accuracy, and low cost. Thus, the method has considerable potential in relevant application.