The present invention provides an ophthalmic device capable of minimizing the generation of flare at a lower cost and in a shorter time than in the prior arts when photographing in a state where an optical axis of an examination optical system is deviated from a reference position of a subject eye. The ophthalmic device according to an embodiment of the present invention includes a photographing unit that images a region to be observed of the subject eye through the examination optical system, a first alignment unit that performs alignment on the examination optical system with respect to the subject eye in the optical axis direction and the direction perpendicular to the optical axis direction, an optical system movement unit that moves the examination optical system from a first position aligned by the first alignment unit to a second position which is deviated from the first position at least in the perpendicular direction, and a second alignment unit that determines an alignment position in the optical axis direction of the examination optical system with respect to the subject eye at the second position based on the positional difference between the first position and the second position and moves the examination optical system to the alignment position along the optical axis direction.