White-light interferometric techniques allow high-precision shape measurement of objects with discontinuous structures by detecting the peak of the coherence envelope. These techniques assume a specific change in the optical path difference (OPD) between the interfering beams; however, the scanning device effecting that change often introduces OPD errors that are carried over to the measurements. We present a technique for measuring OPD changes from the collected interference fringes during each measurement. Information about the scan is directly fed into the algorithm, which compensates for the errors, resulting in improved measurement accuracy. The method corrects not only the scanner errors but also slowly varying vibrations. In addition, this technique can be easily adapted to any existing low-coherence interferometer because no large data storage or postprocessing is required.