Skip to content
Convert. Calculate.

Linear Regression Calculator

Fit a least-squares line to data and predict values.

Your details

Result

Best-fit line

y = 0.771429x + 1.8

Slope
0.771429
Intercept
1.8
R-squared
0.7714
Predicted y at x = 7
7.2

Good to know: slope = Σ(x−x̄)(y−ȳ) ÷ Σ(x−x̄)²

About this tool

Formula

slope = Σ(x−x̄)(y−ȳ) ÷ Σ(x−x̄)²

Questions people ask

What does R-squared mean?

The share of the variation in y explained by the line, from 0 (none) to 1 (all).

Related tools

How we calculate this

We use the standard published formula or definition for this calculation, and we show the working so you can check it.

Spotted a mistake? Tell us and we'll check it. How we check our calculators