Residual Calculator
This residual calculator works out the residual, the gap between an observed value and the value a model predicts, such as a point on a regression line or a forecast figure. Residuals are the backbone of checking how well a statistical model fits real data, and they underpin methods like least squares regression, where the goal is to make the sum of squared residuals as small as possible. Enter your observed value and your predicted value into the two fields, and the calculator instantly returns three results: the residual itself, observed minus predicted, the squared residual used in least squares fitting, and the residual expressed as a percentage of the observed value. A positive residual means the model under-predicted, so the real figure was higher than expected, while a negative residual means it over-predicted. Watch the sign as much as the size, since a residual close to zero signals a good fit, while a large residual, positive or negative, flags a point the model struggled with. This tool suits students marking assignments, researchers checking model accuracy, and analysts screening data for outliers before running further statistical tests. Try the built-in worked example, an observed value of 10 against a predicted value of 8, to see how the residual, its square and its percentage are worked out before entering your own figures.
The formula
A residual is the observed value minus the predicted value: residual = observed minus predicted. The squared residual is that difference squared, the quantity minimised in least squares regression.
Worked example
If a model predicts 8 but the observed value is 10, the residual is 10 minus 8 = 2, the squared residual is 4, and the residual is 20 percent of the observed value. Enter 10 and 8 to confirm.
Frequently asked questions
What is a residual?
The difference between an observed value and the value a model predicts: observed minus predicted.
What does the sign mean?
A positive residual means the model under-predicted; a negative residual means it over-predicted.
Why square residuals?
Squaring removes the sign and penalises large errors more. Least squares regression minimises the sum of squared residuals.
Who this calculator is for
This calculator is for statistics students, researchers and analysts.
What this calculator assumes
- You enter valid numbers.
- The standard formula is applied.
- Results are rounded for display.
Formula and sources
Related calculators
- Standard Deviation Calculator: spread of data.
- Z-Score Calculator: standard score.
- Mean Median Mode Calculator: averages.