A lateral-shearing interferometer specially devised for production-line inspection of lenses is presented. The interferometer is configured with four square prisms whose relative sliding motions readily provide lateral shearing and phase shifting necessary for evaluating the beam wavefront collimated by the lens under test. The prisms are attached face-to-face using immersion oil so that undesirable disturbances from external mechanical vibration and atmospheric turbulence can be minimized in the measurement. Further, a special phase-measuring least-squares algorithm is adopted to compensate the phase-shifting error caused by the thickness variation in the immersion oil holding the prisms. (C) 1997 Society of Photo-Optical Instrumentation Engineers.