Linear Regression Calculator
Fit a best-fit line through up to four points.
Find the least-squares line of best fit through your data points.
The math behind it
slope = Σ(x−x̄)(y−ȳ) ÷ Σ(x−x̄)²; intercept = ȳ − slope×x̄; R² measures fit quality.
Worked example
Sample points → y ≈ 1.9x + 0 (R² ≈ 0.92).
FAQ
R²?
The fraction of variance in y explained by x (0–1).