spectroscience.com / blog / applications path / part 1
Applications path · Part 1 of 7What NIR measures in food and feed

NIR food analysis: what it measures and where it fails

Vitaly Kirkpatrick · first published May 27, 2025 · 8 min read

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.

spectroscience.com / blog / applications path / part 1 of 4
Applications path · Part 1 of 5What NIR measures in food and feed

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

Typical grain spectrumInteractive · simulated
The cyan curve is a representative ground corn spectrum. Toggle the checkboxes to isolate the three major overtone regions that drive protein, moisture and fat predictions. The gray region beyond 2400 nm illustrates where band intensity collapses and trace constituents become invisible.
Illustrative NIR spectrum showing strong protein, moisture and fat bands with a faded region at low concentrations
Typical NIR spectrum of a grain sample highlighting measurable regions (protein, moisture, fat) and a gray area where trace analytes fall. Illustration, not a specific product.
AnalyteDominant bond(s)Key band (nm)Typical calibration strength
ProteinN‑H, C‑H2060‑2180High (R² > 0.95)
MoistureO‑H1450‑1500Very high (R² > 0.98)
FatC‑H1200‑1300High (R² > 0.94)
FiberC‑H, O‑H1725‑1900Moderate (R² ≈ 0.90)
StarchC‑H2100‑2200Moderate (R² ≈ 0.89)
Try this first

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.

Key point

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.

StepWhat you needWhy it mattersTypical outcome
Sample selectionBroad compositional spread (low‑, mid‑, high‑range) across all major ingredientsEnsures the model can interpolate, not just extrapolateRobust predictions across all production lots
Reference analysisValidated wet‑chemistry methods (e.g., oven‑dry for moisture, Kjeldahl for protein)Provides the true concentration against which the model is trainedLow bias, high accuracy (RMSEP ≈ 0.15‑0.25 % for moisture in grain)ILLUSTRATIVE
Model buildingMultivariate algorithm (PLS, PCR) with appropriate preprocessing (scatter correction, derivative)Extracts the systematic relationship while minimizing noisePrediction equations that translate spectra to concentrations
ValidationIndependent check set not used in model trainingConfirms that the model works on unseen materialMetrics such as R² > 0.95, RPD > 3 indicate a fit‑for‑purpose model
Calibration workflow illustrationInteractive · simulated
Illustrates the calibration pipeline: collect a representative sample set → run reference chemistry → acquire NIR spectra → train a chemometric model → validate on an independent set. The interactive panel is static for now; numbers shown are ILLUSTRATIVE.

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

AnalyteTypical RMSEP (% dry basis)Calibration difficultyRegulatory relevance
Protein0.30–0.50Medium – requires robust reference (Kjeldahl, Dumas)High – crude protein claims
Moisture0.15–0.25Low – strong water bandsHigh – storage limits, safety
Fat0.20–0.35Medium – overlapping C‑H bandsMedium – energy content
Fiber (ADF/NDF)0.40–0.60High – broad, overlapping featuresMedium – feed formulation
Starch0.35–0.55Medium – requires diverse matrix setLow – 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 bondsHigh – nutritional labeling
Amino‑acid profile>1.0 (unreliable)Very high – dilute signalsLow – usually derived from protein
Watch out

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.

Analyte reliability matrix – static viewInteractive · simulated
This panel would normally let you toggle between analytes to see their spectral intensity and typical prediction error. For this section the visual is static, but the layout matches all interactive figures elsewhere in the series.

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.

Tray of glass jars holding ground grain, soy, canola meal and silage samples arranged in rows
Representative sample set used for building a robust calibration across diverse feed ingredients. Illustration, not a specific product.
Sample presentation effectsInteractive · simulated
Move the sliders to simulate finer‑ground, loosely packed, or warmer samples. Notice how the water band (~1450 nm) and protein band (~2100 nm) change shape, which would shift a calibration’s predictions if those conditions are absent from the training set.
Presentation factorObserved spectral changeTypical impact on prediction
Finer particles (< 250 µm)Higher band intensity, reduced baseline scatterProtein + 0.3–0.5 % ( ILLUSTRATIVE)
Coarser particles (> 500 µm)Flattened spectra, elevated baselineMoisture – 0.2–0.4 % ( ILLUSTRATIVE)
High packing densityShorter effective path, lower overall absorbanceFat + 0.1–0.2 % ( ILLUSTRATIVE)
Temperature + 10 °CShift & slight widening of water overtoneMoisture + 0.1–0.2 % ( ILLUSTRATIVE)
Try this first

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.

Watch out

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.

Loosely and evenly packed NIR sample cups
Uneven packing and air gaps are a common, avoidable source of NIR error. Illustration, not a specific product.

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.

PitfallRoot causePractical mitigation
Secondary‑method natureModel relies on reference chemistryUse high‑quality wet‑chemistry references; update when matrix changes
Water interferenceStrong O‑H overtone bandsInclude moisture‑spanning samples; consider temperature‑controlled cuvettes
Overlapping bandsClose C‑H, N‑H, O‑H featuresApply appropriate preprocessing (e.g., first derivative) and robust multivariate algorithms
Penetration limitsScattering and sample densityStandardize particle size, packing density; use shallow‑depth sampling accessories for dense feeds
Validation gapsInfrequent or unrepresentative check samplesImplement routine monthly validation with spread‑range samples; monitor bias & slope trends
Water‑band interference demoInteractive · simulated
Slide the moisture slider to see how a calibration built on dry samples (left) loses accuracy as water content rises, while a calibration that includes moisture (right) stays stable. Numbers are illustrative.
Try it free

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).

Corn, soybean meal and canola meal at a mixing station
Worked example: a mixed corn, soy and canola feed is a different matrix from wheat. Illustration, not a specific product.
SampleProtein % (reference)Predicted % (wheat model)Bias
Blend‑019.210.3+1.1
Blend‑0210.011.2+1.2
Blend‑0311.512.8+1.3
Blend‑0412.013.4+1.4
Blend‑0513.214.6+1.4
Blend‑0614.515.9+1.4
Blend‑079.811.0+1.2
Blend‑0810.711.9+1.2
Blend‑0912.413.8+1.4
Blend‑1013.014.5+1.5
Blend‑1114.015.6+1.6
Blend‑1215.016.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.

Try this first

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.

Transfer demo – bias & slope correctionInteractive · simulated
Move the sliders to mimic the observed bias (+1.2 %) and slight slope (+0.06). Click “Apply correction” to see the corrected predictions (numbers are illustrative). The interactive panel mirrors the workflow used in the case study.

Quick check

1. Which of the following analytes is reliably quantified by NIR in most feed matrices?
2. What is the primary cause of poor NIR predictions when particle size varies greatly?
3. When a calibration built on wheat fails on corn, the first step should be:
Answer the three questions above to see your score.
Where you are on the Applications path

Step 1 of 7: What NIR measures in food and feed

1 of 7 steps
  1. 2NIR in food quality assuranceWhere NIR fits in a QA program.Read part 2 →
  2. 3Feed mill raw materialsProtein and moisture checks at intake.Read part 3 →
  3. 4Inline dairy monitoringReal-time readings on the line.Read part 4 →
  4. 5Kjeldahl, Dumas or NIR for proteinAccuracy and real cost of each method.Read part 5 →
  5. 6Predicting ashHow NIR estimates minerals indirectly and when to trust it.Read part 6 →
  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

NIR Fundamentals course · 32 lessons

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

  1. Dardenne, Sinnaeve, Baeten. "Multivariate Calibration and Chemometrics for near Infrared Spectroscopy: Which Method?" Journal of Near Infrared Spectroscopy 2000. doi:10.1255/jnirs.283
  2. 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
  3. 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
  4. 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
  5. 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