Two techniques based upon regression modeling of spectra are described for accurate estimation of the concentration of the analytes in the presence of background constituents. The results from two data sets are presented: (i) UV spectra of biphenyl with naphthalene as a contaminant and (ii) X-ray diffractograms of kaolinite in samples contaminated with smectite. For both data sets, the novel techniques give reliable predictions, while all the contaminated samples are detected as outliers in the conventional approach. Only after including the contaminated samples in the calibration model can the conventional approach produce predictions at the same level of precision as the novel techniques.