Linear Regression Calculator
Fit a least-squares line to data and predict values. The result updates as you type, with the working underneath so you can check it.
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
- Correlation CalculatorCalculate Pearson's correlation coefficient between two sets of values.
- Quartile and IQR CalculatorFind quartiles, the interquartile range and outliers.
- Coefficient of Variation CalculatorCompare variability between datasets of different scale.
- Average & MedianStatistical calculations
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