A method for measuring the cell gap of liquid-crystal displays (LCDs) is presented. It is based on analyzing the interference spectrum of white light reflected by the LCD. It can be used before or after filling the LCD. The method is applicable for LCDs whose operation is based on the polarization or the scattering of light. Four methods for the calculation of the cell gap are presented. The first method is based on the wavelengths corresponding with the peaks in the interference spectrum. Two other methods use analog and digital filtering techniques to filter out all the irrelevant information in the interference spectrum; the cell gap is then calculated with fast Fourier transform (FFT) or the inverse FFT. In the fourth method an empirical model is fitted to the measured interference spectrum.