ReadyCalcs · All calculators

Residual Calculator

Measure the signed and absolute difference between an observed value and a model prediction.

INPUT & RESULT

How the result changes

-92.75102.726.3183.8
Observed value (units)Current: 105 → 5 units

Only observed value changes; all other inputs stay at your current values. The line illustrates the formula across the shown range. This is not a forecast of real-world outcomes.

About this calculation

Residual Calculator: Measure the signed and absolute difference between an observed value and a model prediction. Enter observed value, predicted value; the reported quantities are signed residual (units), absolute residual (units). The equations and examples below show how those inputs lead to the result and where the model's assumptions matter.

Formula

residual = observed - predicted

Worked example

With Observed value: 105 units, Predicted value: 100 units, signed residual is 5 units.

Method and inputs

Subtract the model-predicted value from the observed value. The sign shows direction: positive means the observation exceeded the prediction, while negative means the model predicted more than observed. Taking the absolute value removes the sign.

Worked example

If an instrument measures 105 units and a fitted model predicts 100, the residual is +5 units and its absolute size is 5. If the observation were 95, the residual would be -5.

A sequence of residuals 5, 4, 6 and 5 suggests consistent underprediction, even though each individual magnitude looks small. A sequence alternating positive and negative around zero has a different diagnostic meaning. Plotting residuals against time or predicted value reveals such patterns.

How to read the result

A residual is not automatically a measurement error. It can reflect random variation, a missing predictor, a misspecified model or inaccurate measurement. Examining many residuals against fitted values can reveal patterns that one number cannot.

For forecasts, an observed value may not be available until after the prediction period. A residual is then retrospective, unlike a forecast interval that describes uncertainty before observation. Avoid using one after-the-fact residual as a forward error guarantee.

Assumptions and checks

The observed and predicted quantities must have the same unit and represent the same case and time. The subtraction is appropriate even for negative values if those values are meaningful in the application.

Reversing the subtraction changes the sign. Do not compare absolute residuals from outcomes with vastly different scales without normalization. A zero residual on one observation does not prove the full model is valid.

Common questions

What does the residual calculator calculate?

It returns observed minus predicted and the magnitude of that difference for a single case.

When should I recalculate or check another method?

Recalculate when a prediction is refitted or data are corrected. For model validation, inspect the distribution and structure of residuals across many observations, not only one example.

Inputs

  • Observed value (units)
  • Predicted value (units)

Related calculators