How to use the Linear Regression Calculator
- Paste or type your data, one x, y pair per line.
- Read the equation of the line, r and R².
- Enter an x value to predict y.
What does this tool do?
Simple linear regression finds the straight line y = bx + a that minimises the squared vertical distances to your points — the least-squares line. The slope b tells you how much y changes for each unit of x.
The correlation r runs from −1 to 1 and measures how tightly the points follow a line. R² is the share of the variation in y explained by x. The residuals table shows how far each point is from the line.
Why use it?
- Paste two columns straight from a spreadsheet.
- Correlation, R² and standard error.
- Residuals for every point.
The formula
Accuracy and limits
- Correlation doesn't imply causation, and a linear fit can be misleading if the true relationship curves.
Privacy
The calculation happens instantly in your browser. The numbers you enter are not sent to our servers or saved. There's no account to create and nothing to install.
Last reviewed by the M2Toolkit team.