In order to detect a position alignment state between an apparatus and an eye to be inspected in a working distance direction with high precision at a high speed in the apparatus side, an ophthalmologic apparatus is disclosed. The position alignment state between the eye to be inspected and the apparatus in the working distance direction is detected by evaluating a contrast of an index image that is obtained as a reflection image of an index projected onto an anterior ocular segment, and a contrast of the index image is evaluated using a ratio or a difference between pixel numbers of the index image in at least two or more gray scale values.