An apparatus comprising: a light source; a scale having first and second diffraction grating portions (GT1 and GT2) which differ from each other in a grating pitch; a light receiving portion configured to receive first and second interference light fluxes, respectively, the first interference light flux being generated from interference of a plurality of diffraction light fluxes which exit the first diffraction grating portion, the second interference light flux being generated from interference of a plurality of diffraction light fluxes which exit the second diffraction grating portion, and to output first and second periodic signals (U1, V1, and W1, and U2, V2, and W2) based on an intensity of the first and second interference light fluxes, respectively; and a computing unit configured to output, based on the first and second periodic signals, an origin signal representing an origin of displacement of the scale, wherein the second diffraction grating portion is formed such that the second periodic signal has an extremal value if the scale is located at the origin, characterized in that the first periodic signal includes a plurality of phase signals (U1, V1, W1) that are periodic signals of which phases are different from one another, and the second periodic signal includes a plurality of phase signals (U2, V2, W2) that are periodic signals of which phases are different from one another and are respectively same as phases of the plurality of phase signals of the first periodic signal, the computing unit is configured to obtain a maximum and a minimum among differences between pairs, each of the pairs being a pair of one of the plurality of phase signals of the first periodic signal and corresponding one of the plurality of phase signals of the second periodic signal, and to output the origin signal based on a difference between the maximum and the minimum. a light source; a scale having first and second diffraction grating portions (GT1 and GT2) which differ from each other in a grating pitch; a light receiving portion configured to receive first and second interference light fluxes, respectively, the first interference light flux being generated from interference of a plurality of diffraction light fluxes which exit the first diffraction grating portion, the second interference light flux being generated from interference of a plurality of diffraction light fluxes which exit the second diffraction grating portion, and to output first and second periodic signals (U1, V1, and W1, and U2, V2, and W2) based on an intensity of the first and second interference light fluxes, respectively; and a computing unit configured to output, based on the first and second periodic signals, an origin signal representing an origin of displacement of the scale, wherein the second diffraction grating portion is formed such that the second periodic signal has an extremal value if the scale is located at the origin, characterized in that the first periodic signal includes a plurality of phase signals (U1, V1, W1) that are periodic signals of which phases are different from one another, and the second periodic signal includes a plurality of phase signals (U2, V2, W2) that are periodic signals of which phases are different from one another and are respectively same as phases of the plurality of phase signals of the first periodic signal, the computing unit is configured to obtain a maximum and a minimum among differences between pairs, each of the pairs being a pair of one of the plurality of phase signals of the first periodic signal and corresponding one of the plurality of phase signals of the second periodic signal, and to output the origin signal based on a difference between the maximum and the minimum.