An ophthalmic apparatus which captures an image of a retina by illuminating the fundus of an eye to be examined with light from a light source through a measuring optical path is provided. The ophthalmic apparatus divides light from the light source into light propagating to the measuring optical path and light propagating to a reference optical path different from the measuring optical path, obtains interference light by composing return light returned along the reference optical path and return light from the measuring optical path, images interference fringes generated by the interference light composed at a position conjugate with the position of the pupil of the eye, and corrects a wavefront aberration of light passing through the measuring optical path by using correction data for correcting a wavefront aberration of the eye which is obtained from a captured image of interference fringes.