A simple algorithm is presented for the fast and fully automatic removal of peak shifts in large spectral data sets. It is able to remove peak shifts exceeding the discrete spectral resolution. The algorithm has been applied to Raman spectra of three solution copolymerizations of styrene (Sty) and butyl acrylate (BA) performed on three separate days. Small Raman peak shifts, smaller than the spectral resolution, and induced by the on/off switching of the laser and the repositioning of the grating, could successfully be removed prior to partial least squares (PLS) regression. It is demonstrated that after shift correction, the ability of PLS to predict Sty and BA concentrations is improved. Due to its speed, the algorithm is suitable to eliminate real time (on-line) spectral shifts from the spectra. This makes re-calibration or model adaptation forced by spectral shifts superfluous. The proposed algorithm may Likewise be used to remove peak/wavelength shifts in mid-IR, near-IR, and NMR spectra, as well as to remove retention time shifts in chromatograms. (C) 2000 Elsevier Science B.V. All rights reserved.