Abstract The robustness of soil organic carbon (SOC) and total nitrogen (TN) content prediction accuracy by visible near-infrared spectroscopy (visNIRS) and mid-infrared spectroscopy (MIRS) models after a change in the quantity or quality of crop residues requires investigation. Arable soils (0–20 cm) from 20 locations across Germany were collected, and 0, 2, 4, or 8 g C kg soil -1 of wheat straw (C/N ratio, 54) or clover (C/N ratio, 13) were added. Before and after a 56-d incubation, dried and ground samples were measured for SOC and TN content and by visNIRS and MIRS. The complete dataset ( n = 280) was subdivided into calibration and validation datasets to test the robustness of partial least squares regression models to changes in crop residue quantity and quality in soil. Noise-reducing data pretreatments included region selection, moving averages, resampling every second data point, and the Savitzky-Golay algorithm. The MIRS estimates for SOC (7.4–33 g kg -1 ) had lower root mean squared error of validation (RMSE V = 0.9–2.9 g kg -1 ) compared with visNIRS (RMSE V = 1.6–7.1 g kg -1 ). Total N estimates (0.7–2.8 g kg -1 ) were more comparable for MIRS (RMSE V = 0.1–0.3 g kg -1 ) and visNIRS (RMSE V = 0.1–1.0 g kg -1 ). Loadings of partial least squares regression components suggested the predictive mechanisms for SOC and TN were more similar for visNIRS than for MIRS. Differing crop residue quantity or quality in calibration versus validation resulted in biased SOC and TN estimates by visNIRS and MIRS models. However, calibration with a global residue model containing all soils and crop residue quantities and qualities lowered RMSE V for SOC and TN prediction with visNIRS and MIRS, demonstrating the usefulness of this approach.