Statistics

Linear Regression Calculator

Best fit line for paired data.

Enter your values

Results update instantly as you type — no submit needed.

Results
Equation
y = 1.99286x + 0.25714
Slope
1.992857
Intercept
0.257143
R squared
0.99827
Prediction
20.18571

Quick answer

Least squares regression finds the line minimising squared vertical distances, giving y = mx + b.

m = Σ(x−x̄)(y−ȳ)/Σ(x−x̄)², b = ȳ − mx̄

How to use the Linear Regression Calculator

  1. 1Paste your X values.
  2. 2Paste matching Y values.
  3. 3Enter an x value to predict.

Frequently asked questions

What is a good R squared?

Depends on field — 0.9+ in physics, 0.3 can be meaningful in social science.

Can I extrapolate?

Cautiously — predictions outside your data range are unreliable.