A measurement apparatus of measuring a position of a target object, the apparatus comprising: a detector configured to detect modulated light from the target object having a periodic pattern and embedding an absolute code, and to output discrete data of a periodic pattern signal (Ir); and a calculation unit (CULC) configured to calculate the position of the target object based on the output of said detector, wherein said calculation unit is further configured to calculate the absolute code based on the periodic pattern signal output from said detector; calculate phase information of the periodic pattern signal; and calculate the position of the target object based on the calculated phase information and the calculated absolute code; characterized in that said calculation unit (CULC2) is further configured to determine positions of two extreme values which either are both local minimum points or both local maximum points and each of which appears as a constant value for each period of the periodic pattern from the discrete data of periodic pattern signal output from said detector, calculate a first total sum by multiplying the discrete data of the periodic pattern signal by first reference waveform data (Sa) of a sinusoidal waveform with a phase θp defined by the detector and the same period as that of the periodic pattern signal in a region between the positions of the two extreme values, and by adding the multiplication results, calculate a second total sum by multiplying the discrete data of the periodic pattern signal by second reference waveform data (Sb) of a sinusoidal waveform with a phase difference of 90° with respect to the phase θp of the first reference waveform data in said region, and by adding the multiplication results, and to divide the first total sum by the second total sum, and calculates the phase information PHS of the periodic pattern signal based on the division result, wherein the phase information PHS is a difference between a phase θs of the periodic pattern signal and the phase θp. a detector configured to detect modulated light from the target object having a periodic pattern and embedding an absolute code, and to output discrete data of a periodic pattern signal (Ir); and a calculation unit (CULC) configured to calculate the position of the target object based on the output of said detector, wherein said calculation unit is further configured to calculate the absolute code based on the periodic pattern signal output from said detector; calculate phase information of the periodic pattern signal; and calculate the position of the target object based on the calculated phase information and the calculated absolute code; characterized in that said calculation unit (CULC2) is further configured to determine positions of two extreme values which either are both local minimum points or both local maximum points and each of which appears as a constant value for each period of the periodic pattern from the discrete data of periodic pattern signal output from said detector, calculate a first total sum by multiplying the discrete data of the periodic pattern signal by first reference waveform data (Sa) of a sinusoidal waveform with a phase θp defined by the detector and the same period as that of the periodic pattern signal in a region between the positions of the two extreme values, and by adding the multiplication results, calculate a second total sum by multiplying the discrete data of the periodic pattern signal by second reference waveform data (Sb) of a sinusoidal waveform with a phase difference of 90° with respect to the phase θp of the first reference waveform data in said region, and by adding the multiplication results, and to divide the first total sum by the second total sum, and calculates the phase information PHS of the periodic pattern signal based on the division result, wherein the phase information PHS is a difference between a phase θs of the periodic pattern signal and the phase θp.