Recently, a technique for fast and accurate phase analysis called sampling moiré method has been developed for measurement of small-displacement distribution. In this study, a distribution of phase error caused by linear interpolation in case with mismatch between the sampling pitch and the grating pitch is theoretically analyzed. Moreover, a technique for effective phase compensation is proposed to reduce the periodic phase error. The performance of our compensation method is validated by a computer simulation. Phase analysis can be performed more accurately even in the case that the sampling pitch does not match to the grating pitch strictly.