✓ Effortless Math · Free Tool

Linear Regression Calculator

Paste your paired (x, y) data points to find the least-squares line of best fit, the slope and intercept, the Pearson correlation r and r², a live scatter plot, and full step-by-step working.

Line of best fit:  y = mx + b
Data points — one per line (x, y)

Enter one point per line as x, y (commas or spaces both work). You need at least two distinct x-values. Decimals and negatives are fine.

Results

Line of best fit
Slope (m)
Intercept (b)
Correlation (r)
n points
Mean x̄
Mean ȳ

Scatter plot

Data pointsBest-fit line

Step-by-step (least-squares regression)