Skip to main content

MAXScanner calculator widget

Linear Regression Calculator — Best-Fit Line, R², Correlation & Residuals

Open full guide ↗

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

#XObserved YPredicted ŶResidual
115251.42860.5714
225556.0571-1.0571
336160.68570.3143
446665.31430.6857
556969.9429-0.9429
667574.57140.4286
Show the working
  1. 1. Compute x̄ = 3.5 and ȳ = 63.
  2. 2. Sxx = Σ(x−x̄)² = 17.5; Sxy = Σ(x−x̄)(y−ȳ) = 81.
  3. 3. Slope b = Sxy ÷ Sxx = 4.6286.
  4. 4. Intercept a = ȳ − b x̄ = 46.8.
  5. 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.