Try Calculators

Calculate linear regression line

Least-squares line ŷ = mx + b from paired data.

Also known as: calculate linear regression line calculator, linear regression calculator, calculate linear regression line, statistics math, statistics calculate linear regression line

Inputs

Results update when you click Solve.

Line ŷ = mx + b

y = 0.9000x + 1.3000

Slope m

0.9000

Intercept b

1.3000

0.8100

Ad · below results slot

Recently used

Tools you open will show up here on this device — with your last inputs when available.

What this result means

Least-squares line ŷ = mx + b from paired data. Slope m = Σ(x−x̄)(y−ȳ)/Σ(x−x̄)²; intercept b = ȳ − mx̄.

Assumptions

  • Rule dependency: Universal formula.

How is it calculated?

Slope m = Σ(x−x̄)(y−ȳ)/Σ(x−x̄)²; intercept b = ȳ − mx̄.

Example

Fit a best-fit line through scattered (x, y) pairs.

Frequently asked questions

Prediction?+

Plug x into y = mx + b for predicted ŷ.