STRAIGHT-LINE LEAST SQUARES / ENTERED PAIRS
Find a line.
Keep the differences.
Fit one unweighted line to your x/y pairs. Read the slope, intercept and every residual, with exact decimal-input arithmetic behind the rounded view.
A line summarises. Residuals show what remains.
01 / YOUR OBSERVATIONS
One pair on each line.
02 / THE ENTERED-DATA FIT
ŷ = a + b × x
Slope b
Intercept a
Sum of squared residuals
R²
equally weighted rows. Decimal views round to at most 10 places. Exact fractions describe entered numbers, not measurement accuracy.
Points are entered y values; the red line is the fitted model across the entered x range. Dashed distances show residuals. Chart positions are rounded for drawing.
| Row | x | y | Fitted y | Residual |
|---|
A high R² does not establish causation, a suitable model, or reliable future results. Constant y has undefined R² here.
THE RULE
Minimise the squared
vertical differences.
This calculator chooses the slope and intercept that minimise Σ(y − ŷ)² for the entered rows. It includes an intercept and gives every row equal weight. Swapping x and y asks a different question.
Read the equations and worked examples →