Commercially available homogenized cow- and plant-based milks were investigated by optical spectroscopy in the range of 400-1360 nm. Absorbance spectra, the effective scattering coefficient mu(')(s), and the spectral absorption coefficient mu(a) were recorded for 23 milk varieties and analyzed by multivariate data analysis. Cow- and plant-based milks were compared and discriminated using principal component analysis combined with a quadratic discriminant analysis. Furthermore, it was possible to discriminate the origin of plant-based milk by mu a and the fat content in cow-based milk by mu s'. Partial least squares regression models were developed to determine the fat content in cow-based milk. The model for mu s' proved to be the most efficient for this task with R-2 = 0.98 and RMSEP = 0.19 g/100 mL for the external validation. Thus, optical spectroscopy together with multivariate data analysis is suitable for routine laboratory analysis or quality monitoring in the dairy production.