Residual Calculator

Fit a least-squares line to your x and y data and get the residual for each point, which is the observed y minus the predicted y. It also reports the slope, intercept, R squared and standard error.

1 Paste or type your text

2 Your answer

Your answer shows here as you type.

How to use the Residual Calculator

  1. Enter one x,y pair per line. Use at least two points with different x values.
  2. Read the fitted line, slope and intercept from the results.
  3. Check each residual: a positive value means the point sits above the line, a negative value means below.

Frequently asked questions

What is a residual in statistics?

A residual is the observed value minus the value predicted by a model. For a regression line, residual = y minus (intercept plus slope times x).

How is the least-squares line calculated?

The slope is the sum of (x minus mean x) times (y minus mean y), divided by the sum of (x minus mean x) squared. The intercept is the mean of y minus slope times the mean of x.

What does R squared tell you?

R squared is the share of the variation in y explained by the line, from 0 to 1. It is 1 minus the sum of squared residuals divided by the total sum of squares around the mean of y.

Wrote something with AI? Slop Monkey rewrites it so it sounds like you, and keeps your facts.