An automatic effipsometer that uses a four-detector photopolarimeter (FDP) to measure the state of polarization of light reflected from an optically isotropic or aniotropic, depolarizing or nondepolarizing, sample surface is described. For conventional effipsometry on specular isotropic surfaces, the incident light is polarized (at least partially) in one stable state (e.g., using a linear polarizer which need not be perfect), and the reflectance and ellipsometric parameters of the surface are encoded onto, hence can be retrieved from, the Stokes parameters of the reflected light. The latter are measured, virtually instantaneously, by the FDP. The FDP also greatly simplifies generalized Mueller-matrix ellipsometry on amisotropic or nonspecular surfaces. In this case, the polarization of the incident light is controlled by a linear polarizer followed by a quarter-wave retarder (QWR) with rotationally adjustable fast axis azimuth C. Fourier analysis of the output current vector of the FDP as a function of C yields a series of five terms whose vectorial coefficients determine the Mueller matrix column-by-column. In such an analysis, the small inevitable imperfections of the QWR are accounted for. Results are presented for measurements at 633 nm wavelength of the ellipsometric parameters of a Au surface and the zeroth-order Mueller matrix of a 1200 G/mm Al-coated holographic grating for three different orientations of the grooves relative to the plane of incidence.