Linear Regression Calculator (Line of Best Fit)
Linear regression calculator: the line of best fit (least squares) for x–y data, with slope, intercept, correlation r, R² and predictions.
y = m x + b · m = Σ(x − x̄)(y − ȳ)Σ(x − x̄)²
How to use this calculator
- Type your input in the box.
- The result updates as you type.
- Use “Copy result” or “Copy link” to share it.
The least-squares line minimizes the sum of squared vertical distances. R² is the share of the variation in y explained by x.
Frequently asked questions
(1, 2.1), (2, 3.9), (3, 6.2), (4, 7.8), (5, 10.1)?
y = 1.99x + 0.05, r ≈ 0.9987.
Related calculators
- Probability Calculator (Two Events: And, Or, Not)
- Binomial Probability Calculator
- Normal Distribution Calculator (Probability Between Values)
- Confidence Interval Calculator
- Test Grade Calculator (Score to Percentage)
- Exponential Growth & Decay Calculator
- Number to Words Converter (for Checks)
- Percent Difference Calculator
Last updated: · Report an error