AP Stats Residual Calculator

A residual is how far an observed value misses its predicted value. Positive means the actual value was above the line; negative means it was below the line. Residuals show whether a regression model fits well — or systematically misses.

Residual Calculator

Enter values, then click Calculate.

Interactive visual: Live preview

Press Show live preview to redraw this chart from your calculator inputs.

What Is a Residual?

A residual is the difference between an observed value and the value predicted by the regression line: residual = observed y - predicted y. A positive residual means the actual value was above the line, and a negative residual means it was below it. Plotting residuals against the explanatory variable shows whether a straight line is a good model, the residuals should scatter randomly with no pattern.

Interactive visual: See the idea

Example: observed 10, predicted 9 — residual = 1.

How to Use This Calculator

Interactive visual: Walk through it

Step 1: Open the AP Stats Residual Calculator calculator at the top and enter the values it asks for.

Choose your input mode. If you already have predicted values, enter observed y and predicted ŷ in the same order. If you have a regression equation instead, enter x, slope, and intercept, and the calculator finds ŷ = a + bx for each x first. The table then shows every residual, and the chart draws positive residuals above zero and negative ones below zero.

How to Calculate Residuals

Interactive visual: See it on a chart

Press Update visual to redraw this chart from your calculator inputs.

Formula: residual = observed − predicted, or e = y − ŷ. With a model, ŷ = a + bx first.

Worked example: Observed y = 10, 12, 15, 18 and predicted ŷ = 9, 13, 14, 18. Residuals are 10 − 9 = 1, 12 − 13 = −1, 15 − 14 = 1, and 18 − 18 = 0. The first and third points sit above the line, the second sits below it, and the fourth sits exactly on it. Same example from a model: with x = 1, 2, 3, 4, slope 2.5 and intercept 7, predicted values are 9.5, 12, 14.5, 17, giving residuals 0.5, 0, 0.5, 1.

Tips and Common Mistakes

Interactive visual: Mistake vs correct

Mistake: Computing predicted minus observed.

Frequently Asked Questions

Interactive visual: FAQ

Tap any question below to show or hide its answer.

What does a positive residual mean?

The observed value was higher than predicted — the point sits above the regression line.

What does a negative residual mean?

The observed value was lower than predicted — the point sits below the regression line.

Can a residual be zero?

Yes. It means the observed value equals the predicted value and the point lies exactly on the line.

Do residuals always sum to zero?

For a least-squares regression line fitted to the same data, they sum to approximately zero (apart from rounding). That is a property of the fit, not proof the model is good.

What is a residual plot used for?

It plots residuals against x (or against predicted values). A random scatter supports a linear model; a pattern, curve, or funnel shape warns against it.

How are residuals different from errors?

A residual is the observed minus predicted value from your fitted model. The true “error” would use the unknown true population line, which you never observe.

Disclaimer: AP is a trademark of the College Board, which was not involved in this site.

Related Calculators and Guides

Keep exploring AP Statistics with calculators and guides related to this tool.

Related Calculators

Interactive visual: Tool path

Start with this tool, then follow the path through the related calculators.

Residual Calculator → Linear Regression Calculator → R-Squared Calculator

Related Guides

All AP Statistics Calculators

Use any of the 25 free calculators below, no login needed. Each calculator opens on its own page with its own formula, worked example, tips, and FAQs.

AP Statistics Score Calculator Z-Score Calculator P-Value Calculator T-Test Calculator Confidence Interval Calculator Margin of Error Calculator Standard Deviation Calculator Chi-Square Calculator Binomial Distribution Calculator Normal Distribution Calculator Expected Value Calculator Hypothesis Testing Calculator Sample Size Calculator Correlation Coefficient Calculator Residual Calculator Linear Regression Calculator Two-Sample T-Test Calculator Proportion Confidence Interval Calculator Variance Calculator Geometric Distribution Calculator Percentile Calculator Degrees of Freedom Calculator Outlier Calculator R-Squared Calculator Poisson Distribution Calculator

Read the AP Statistics guides for worked examples, TI-84 steps, and exam strategy.