Linear Regression Calculator
Fit the least-squares line through paired data with r².
Best-fit line
y = 2.02x − 0.02
r²
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.
Related calculators
Percentage Calculator
Solve any percentage problem: percent of, percent change, and more.
Fraction Calculator
Add, subtract, multiply, and divide fractions with simplified results.
Scientific Calculator
A full scientific calculator with trig, logs, and exponents.
Random Number Generator
Generate random numbers in any range, with or without repeats.