MAXScanner calculator widget
Linear Regression Calculator — Best-Fit Line, R², Correlation & Residuals
Editable live calculator
Change any input — the result updates immediately
No hidden assumptions. Inputs, units and the working stay visible so you can check the calculation.
Calculated result
ŷ = 46.8 + 4.6286x
Slope b: 4.6286 · Intercept a: 46.8
Pearson r: 0.9959 · R²: 0.9918
Sxx: 17.5 · Sxy: 81 · SSE: 3.0857
Prediction at X=7: ŷ=79.2
Observed X range: 1 to 6
Regression residuals
| # | X | Observed Y | Predicted Ŷ | Residual |
|---|---|---|---|---|
| 1 | 1 | 52 | 51.4286 | 0.5714 |
| 2 | 2 | 55 | 56.0571 | -1.0571 |
| 3 | 3 | 61 | 60.6857 | 0.3143 |
| 4 | 4 | 66 | 65.3143 | 0.6857 |
| 5 | 5 | 69 | 69.9429 | -0.9429 |
| 6 | 6 | 75 | 74.5714 | 0.4286 |
Show the working
- 1. Compute x̄ = 3.5 and ȳ = 63.
- 2. Sxx = Σ(x−x̄)² = 17.5; Sxy = Σ(x−x̄)(y−ȳ) = 81.
- 3. Slope b = Sxy ÷ Sxx = 4.6286.
- 4. Intercept a = ȳ − b x̄ = 46.8.
- 5. For each pair, ŷ = a + bx and residual = y − ŷ.
The requested prediction lies outside the observed X range, so it is an extrapolation. The linear pattern may not continue there.
Shared links reopen these inputs; saved calculations stay in this browser unless you clear site data.