Calculator Uni

Linear Regression Calculator

Fit the least-squares line through paired data with r².

Paired data

Best-fit line

y = 2.02x − 0.02

0.9982

Prediction at x = 8

16.14

Least squares in a sentence

Regression finds the line minimizing the summed squared vertical misses. The slope is the covariance of x and y over the variance of x; the intercept forces the line through the point of means. r² reports the share of y's variation the line captures.

Predict with care

Interpolation (inside the observed x range) is regression's strength; extrapolation beyond it assumes the pattern continues — the classic way forecasts fail. And a high r² doesn't validate the model shape: plot residuals to see what the line missed.

Frequently asked questions

How does the Linear Regression Calculator work?
Fit the least-squares line through paired data with r².
Is the Linear Regression Calculator free to use?
Yes. The Linear Regression Calculator is completely free, runs entirely in your browser, and requires no account or sign-up. Your inputs never leave your device.

Related calculators