NIR food analysis: what it measures and where it fails
Short answer: Near‑infrared spectroscopy can reliably predict bulk constituents such as protein, moisture, fat, fiber and starch in grains and feed ingredients when a robust multivariate calibration built on accurate wet‑chemistry reference data is used. It struggles with trace compounds (mycotoxins, minerals, individual amino acids) and with samples that vary in particle size, packing density or temperature, because those factors alter light scattering and effective path length.
Understanding which molecular overtone bands NIR actually detects—and how sample presentation and calibration quality shape the resulting predictions—is crucial for getting trustworthy results in food‑ and feed‑analysis settings.
What does NIR actually measure in food and feed?
Near‑infrared (NIR) spectroscopy records the overtone and combination vibrations of the three most abundant covalent bonds in organic matter – C‑H, O‑H and N‑H – within the 780‑2500 nm region. These bonds generate broad, intense absorbance bands that dominate the spectra of grains, meals, silage and other feed ingredients. Because protein, moisture, fat, fiber and starch each contain characteristic mixtures of those bonds, the strength and shape of their associated bands correlate tightly with concentration. A calibrated multivariate model (typically partial‑least‑squares) learns how subtle changes in band intensity map to reference‑chemistry values and then predicts the component in any new spectrum. ILLUSTRATIVE

| Analyte | Dominant bond(s) | Key band (nm) | Typical calibration strength |
|---|---|---|---|
| Protein | N‑H, C‑H | 2060‑2180 | High (R² > 0.95) |
| Moisture | O‑H | 1450‑1500 | Very high (R² > 0.98) |
| Fat | C‑H | 1200‑1300 | High (R² > 0.94) |
| Fiber | C‑H, O‑H | 1725‑1900 | Moderate (R² ≈ 0.90) |
| Starch | C‑H | 2100‑2200 | Moderate (R² ≈ 0.89) |
Build a diverse calibration set. Include low‑, medium‑ and high‑value samples for each target analyte so the multivariate model captures the full shape of the overtone bands and delivers robust predictions across batches.
Why is a calibration against reference chemistry essential?
Near‑infrared spectroscopy records a cloud of absorbance values across hundreds of wavelengths, but those raw numbers do not correspond to concentrations on their own. A multivariate model – typically partial‑least‑squares or a related chemometric algorithm – translates the spectral shape into a quantitative estimate. That translation only works when the model has been taught “what the numbers mean” by a set of samples whose true component levels are known from a primary, wet‑chemistry method (e.g., Kjeldahl for protein, oven‑dry for moisture, or gravimetric extraction for fat). The model learns how subtle variations in band intensity, width and baseline relate to the reference values, and then applies those learned relationships to any new spectrum.
Because the relationship between absorbance and concentration is indirect, two calibrations built on the same instrument but using different reference data will produce different prediction equations. A calibration trained on biased reference values (for example, a protein assay that consistently under‑reports) will inherit that bias, causing every NIR prediction to be shifted by the same amount. Likewise, if the reference set does not span the full compositional range of the material to be measured, the model is forced to extrapolate outside its training space, and prediction errors grow sharply.
Calibration is the bridge between light and chemistry. Accurate, well‑distributed reference data give the chemometric model a solid footing; without it, every prediction rests on a shaky foundation.
| Step | What you need | Why it matters | Typical outcome |
|---|---|---|---|
| Sample selection | Broad compositional spread (low‑, mid‑, high‑range) across all major ingredients | Ensures the model can interpolate, not just extrapolate | Robust predictions across all production lots |
| Reference analysis | Validated wet‑chemistry methods (e.g., oven‑dry for moisture, Kjeldahl for protein) | Provides the true concentration against which the model is trained | Low bias, high accuracy (RMSEP ≈ 0.15‑0.25 % for moisture in grain)ILLUSTRATIVE |
| Model building | Multivariate algorithm (PLS, PCR) with appropriate preprocessing (scatter correction, derivative) | Extracts the systematic relationship while minimizing noise | Prediction equations that translate spectra to concentrations |
| Validation | Independent check set not used in model training | Confirms that the model works on unseen material | Metrics such as R² > 0.95, RPD > 3 indicate a fit‑for‑purpose model |
Which analytes are reliably quantified and which are not?
When a calibration has been built on a solid reference data set, near‑infrared spectroscopy delivers repeatable, industry‑standard results for a handful of bulk constituents. The strongest, most reproducible signals arise from overtone and combination bands of O‑H, N‑H and C‑H bonds that dominate protein, moisture, fat, fiber and starch. In practice these five components meet typical quality‑control specifications for grain and feed (e.g., 0.15–0.25 % RMSEP for moisture, 0.30–0.50 % for protein).1
- Protein – N‑H and C‑H combination bands centred around 2060–2180 nm.
- Moisture – Strong O‑H overtone near 1450–1500 nm and combination bands around 1900 nm.
- Fat – C‑H stretch overtones at 1200–1300 nm and 1725 nm.
- Fiber – Broad C‑H and O‑H features spanning 1700–2100 nm.
- Starch – C‑H overtone peaks around 1200 nm coupled with water‑associated bands.
Components that exist only at trace levels or lack strong NIR‑active bonds fall below the noise floor of typical diffuse‑reflectance measurements. Mycotoxins, most mineral nutrients and detailed amino‑acid profiles usually sit under 0.1 % of the total matrix, and their spectral signatures are swamped by the dominant water, protein and carbohydrate bands. Even with sophisticated chemometrics the prediction error exceeds regulatory tolerances, so wet‑chemistry confirmations remain mandatory.2
| Analyte | Typical RMSEP (% dry basis) | Calibration difficulty | Regulatory relevance |
|---|---|---|---|
| Protein | 0.30–0.50 | Medium – requires robust reference (Kjeldahl, Dumas) | High – crude protein claims |
| Moisture | 0.15–0.25 | Low – strong water bands | High – storage limits, safety |
| Fat | 0.20–0.35 | Medium – overlapping C‑H bands | Medium – energy content |
| Fiber (ADF/NDF) | 0.40–0.60 | High – broad, overlapping features | Medium – feed formulation |
| Starch | 0.35–0.55 | Medium – requires diverse matrix set | Low – usually derived from total carbs |
| Mycotoxins (e.g., DON) | >1.0 (unreliable) | Very high – concentrations <0.1 % | High – safety limits |
| Minerals (Ca, P, etc.) | >1.0 (unreliable) | Very high – no NIR‑active bonds | High – nutritional labeling |
| Amino‑acid profile | >1.0 (unreliable) | Very high – dilute signals | Low – usually derived from protein |
Do not rely on NIR for trace contaminants. Mycotoxin levels, mineral concentrations and detailed amino‑acid patterns are generally below the detection limit of standard NIR calibrations. Use targeted wet‑chemistry or mass‑spectrometry methods when regulatory compliance is at stake.
How does sample presentation influence NIR accuracy?
When a ground grain, meal or silage sample is placed in the cup, three physical factors dominate the way light interacts with it. Each factor alters the effective optical path length and scattering, which in turn changes the recorded absorbance as if the composition had shifted.
- Particle size. Smaller particles reduce multiple‑scattering events, allowing photons to travel deeper and produce sharper, higher‑intensity bands. Olinger & Griffiths showed that halving the mean particle diameter of wheat flour raised the protein‑related absorbance at ~2100 nm by roughly 0.12 AU, inflating the predicted protein by ILLUSTRATIVE 0.4 % protein1. Coarser material flattens the spectrum and commonly depresses the moisture band, leading to under‑prediction.
- Packing density. A tightly packed cup squeezes out air, increasing the bulk refractive index and shortening the average scattering path. In soy‑meal experiments a 20 % rise in bulk density shifted the water overtone at 1450 nm by ≈0.03 AU, which translated to a ILLUSTRATIVE 0.2 % moisture error2.
- Sample temperature. O‑H vibrations are temperature‑dependent; a 10 °C rise moves the water band by ~0.02 AU and can bias a moisture model by ILLUSTRATIVE 0.15 % RMSEP3. The effect is amplified in high‑moisture forages where the water signal dominates.
Because chemometric models assign fixed weights to each wavelength, any systematic change in scattering or path length propagates through the entire spectrum, producing a predictable bias if the calibration set did not encompass the same presentation conditions.

| Presentation factor | Observed spectral change | Typical impact on prediction |
|---|---|---|
| Finer particles (< 250 µm) | Higher band intensity, reduced baseline scatter | Protein + 0.3–0.5 % ( ILLUSTRATIVE) |
| Coarser particles (> 500 µm) | Flattened spectra, elevated baseline | Moisture – 0.2–0.4 % ( ILLUSTRATIVE) |
| High packing density | Shorter effective path, lower overall absorbance | Fat + 0.1–0.2 % ( ILLUSTRATIVE) |
| Temperature + 10 °C | Shift & slight widening of water overtone | Moisture + 0.1–0.2 % ( ILLUSTRATIVE) |
Standardise the sample‑preparation workflow. Mill every batch to a target size (e.g., ≤ 250 µm), use the same cup volume, apply a consistent tap‑down step, and equilibrate the sample to a defined temperature (20 °C ± 1 °C). Replicate scans of a duplicate‑jar set will reveal whether residual variability exceeds the model’s RMSEP, prompting tighter control.
What are the common pitfalls and how to avoid them?
NIR is a secondary‑method – it only predicts what you have taught it to predict. The model must be built on a solid reference method and then validated against the exact type of sample you will measure. If that link breaks, the predictions drift.
Water interference. Water’s broad O‑H overtone dominates the spectrum. In high‑moisture feeds (silage, fresh grain) the water signal can swamp protein or fat bands, so a calibration built on dry material will mis‑predict those components.
Another frequent source of error is overlapping bands. Protein, fat and starch all have C‑H absorptions that lie close together; only chemometric algorithms can untangle them. When the matrix changes – for example, adding an oilseed with a different fatty‑acid profile – the overlap pattern shifts and the original model may no longer be valid.
The NIR beam penetrates only a few millimetres into a sample, and the depth depends on scattering. Dark, dense matrices (high‑fat meals, compacted silage) therefore limit the effective sampling volume. If particle size or packing density varies, the optical path length changes and the absorbance intensity moves, producing systematic bias.

Because of these constraints, a robust validation plan is essential. A typical routine runs 10‑20 independent check samples each month, covering the full range of moisture, protein and fat expected in production. Plot bias and slope; if either exceeds the tolerance defined during calibration development, rebuild or reinforce the model.
| Pitfall | Root cause | Practical mitigation |
|---|---|---|
| Secondary‑method nature | Model relies on reference chemistry | Use high‑quality wet‑chemistry references; update when matrix changes |
| Water interference | Strong O‑H overtone bands | Include moisture‑spanning samples; consider temperature‑controlled cuvettes |
| Overlapping bands | Close C‑H, N‑H, O‑H features | Apply appropriate preprocessing (e.g., first derivative) and robust multivariate algorithms |
| Penetration limits | Scattering and sample density | Standardize particle size, packing density; use shallow‑depth sampling accessories for dense feeds |
| Validation gaps | Infrequent or unrepresentative check samples | Implement routine monthly validation with spread‑range samples; monitor bias & slope trends |
Checking a calibration? Enter the reference standard deviation and SEP in the free RPD and SEP calculator. Comparing wet feeds such as silage? The free silage dry matter calculator turns wet and dry weights into dry matter and converts nutrients to a dry-matter basis.
Worked example: adapting a wheat calibration for a mixed corn‑soy‑canola feed blend
ILLUSTRATIVE A mid‑size feed mill has a robust wheat‑based protein calibration that predicts protein to ±0.3 % RMSEP on its incoming grain. The product line expands to a custom blend containing 30 % corn, 25 % soy meal and 15 % canola meal (the remaining 30 % stays wheat). When the mill runs the existing calibration on the new blend, the predicted protein drifts upward by ≈ 1.2 % across the batch – a clear sign that the matrix has changed.
Step 1 – collect fresh transfer samples. The lab selects 12 representative blend samples that span the expected protein range (9 %–15 %). Each sample is prepared exactly as the routine grain‑feed sample (ground ≤250 µm, packed to 0.65 g cm⁻³, equilibrated at 20 °C). Reference protein is measured by Kjeldahl on the same day.
Step 2 – scan the transfer set on the existing wheat model. The 12 spectra are recorded with the current instrument settings. The raw predictions show a systematic positive bias of +1.1 % with a slight slope (low‑protein samples are only 0.4 % high, high‑protein samples are 1.8 % high).

| Sample | Protein % (reference) | Predicted % (wheat model) | Bias |
|---|---|---|---|
| Blend‑01 | 9.2 | 10.3 | +1.1 |
| Blend‑02 | 10.0 | 11.2 | +1.2 |
| Blend‑03 | 11.5 | 12.8 | +1.3 |
| Blend‑04 | 12.0 | 13.4 | +1.4 |
| Blend‑05 | 13.2 | 14.6 | +1.4 |
| Blend‑06 | 14.5 | 15.9 | +1.4 |
| Blend‑07 | 9.8 | 11.0 | +1.2 |
| Blend‑08 | 10.7 | 11.9 | +1.2 |
| Blend‑09 | 12.4 | 13.8 | +1.4 |
| Blend‑10 | 13.0 | 14.5 | +1.5 |
| Blend‑11 | 14.0 | 15.6 | +1.6 |
| Blend‑12 | 15.0 | 16.7 | +1.7 |
Step 3 – decide: bias‑/slope‑correction or full rebuild? Because the bias is consistent and the slope is modest, a simple bias‑and‑slope adjustment could bring the model back into spec. However, the blend introduces new fatty‑acid profiles from canola meal that alter the C‑H band shapes. To safeguard future formulation changes, the lab opts for a partial rebuild that adds the 12 transfer samples to the original wheat set and re‑trains the PLS model.
Validate on an independent set. After applying the bias + slope correction, scan five new blend samples not used in the transfer set. If the residuals stay under the original RMSEP (≈0.3 % protein), the correction is adequate; otherwise, rebuild.
Step 4 – rebuild and validate. The expanded calibration (original wheat + 12 blend samples) is rebuilt using the same preprocessing (MSC + first derivative). Cross‑validation yields R² = 0.96 and RMSEP = 0.28 % on a hold‑out set of 20 blend samples – fully within the mill’s specification.
Quick check
Step 1 of 7: What NIR measures in food and feed
- 1What NIR measures in food and feedYou are here.Current
- 2NIR in food quality assuranceWhere NIR fits in a QA program.Read part 2 →
- 3Feed mill raw materialsProtein and moisture checks at intake.Read part 3 →
- 4Inline dairy monitoringReal-time readings on the line.Read part 4 →
- 5Kjeldahl, Dumas or NIR for proteinAccuracy and real cost of each method.Read part 5 →
- 6Predicting ashHow NIR estimates minerals indirectly and when to trust it.Read part 6 →
- 7NIR, MIR or Raman for oilseedsStrengths, limits and cost in oilseed labs.Read part 7 →
Frequently asked questions
What major components can NIR measure in food and feed?
Protein, moisture, fat, fiber and starch can be quantified reliably when a proper calibration against reference chemistry is used.
Why does NIR need a calibration against a reference method?
The spectrometer records absorbance patterns; chemometric models translate those patterns into concentration values, so accurate reference data are essential for training the model.
Can NIR detect mycotoxins or mineral nutrients at regulatory levels?
No. The concentrations are typically too low (<0.1 %) for the broad, overlapping NIR bands, so wet chemistry or targeted assays are required.
How does sample presentation affect NIR accuracy?
Particle size, packing density and temperature change scattering and path length, which alters absorbance intensity and can bias predictions if not represented in the calibration.
Is NIR useful for quality control in feed mills?
Yes. It provides rapid, non‑destructive measurements of protein, moisture and fat for incoming raw material screening, in‑process monitoring and finished‑product verification when calibrations are properly maintained.
What is the typical RMSEP achievable for moisture in grain using NIR?
Well‑built calibrations commonly achieve 0.15–0.25 % RMSEP against oven‑dry reference methods.
What should I do if my NIR model drifts over time?
Implement a routine validation plan (10‑20 check samples per month), monitor bias and slope, and rebuild or update the calibration when drift exceeds acceptable limits.
Next questions people ask
Turn NIR data into reliable decisions
Our 32‑lesson NIR Fundamentals course walks you through chemistry, sampling, calibration and validation for food, feed and dairy labs. One payment, lifetime access.
Sources
- Dardenne, Sinnaeve, Baeten. "Multivariate Calibration and Chemometrics for near Infrared Spectroscopy: Which Method?" Journal of Near Infrared Spectroscopy 2000. doi:10.1255/jnirs.283
- Olinger, Griffiths. "Effects of Sample Dilution and Particle Size/Morphology on Diffuse Reflection Spectra of Carbohydrate Systems in the Near- and Mid-Infrared. Part I: Single Analytes" Applied Spectroscopy 1993. doi:10.1366/0003702934066965
- Cozzolino, Murray. "Effect of Sample Presentation and Animal Muscle Species on the Analysis of Meat by near Infrared Reflectance Spectroscopy" Journal of Near Infrared Spectroscopy 2002. doi:10.1255/jnirs.319
- Isaksson, Tøgersen, Iversen et al. "Non‑destructive determination of fat, moisture and protein in salmon fillets by use of near‑infrared diffuse spectroscopy" Journal of the Science of Food and Agriculture 1995. doi:10.1002/jsfa.2740690115
- Hossain, Goto. "Near- and mid‑infrared spectroscopy as efficient tools for detection of fungal and mycotoxin contamination in agricultural commodities" World Mycotoxin Journal 2014. doi:10.3920/wmj2013.1679