A displacement detecting device includes a light source that performs irradiation with light, a light-beam splitting section, a reflection/transmission section, a phase plate, a transmission-type diffraction grating, a light-beam combining section, a light-receiving section, and a relative position information output unit. The reflection/transmission section transmits or reflects a first light beam, and causes the beam to enter a member to be measured. Furthermore, the reflection/transmission section guides the first light beam to a specific position of the member to be measured in the case where the member to be measured is in a reference position. Moreover, an optical path of the first light beam reflected by the member to be measured again overlaps with an optical path of the first light beam reflected at a specific position of the member to be measured.