Linear Regression Calculator
Fit a line of best fit to data points and find its equation.
A trend line through the data
Linear regression finds the straight line that best fits a set of data points, capturing the overall trend. This calculates that line of best fit and its equation from your data, so you can quantify a relationship and make predictions from it.
Enter your data points to find the line of best fit.
What regression tells you, and what it doesn't
The line of best fit summarises how one variable tends to change with another, and its equation lets you estimate values and predict beyond your data — the foundation of a huge amount of data analysis and forecasting. A related figure measures how well the line actually fits, since a line can be drawn through any data but only means something if the points genuinely cluster near it. Two cautions are essential. First, correlation is not causation: a strong linear relationship does not prove one thing causes the other. Second, predicting far outside the range of your data is risky, since the trend may not continue. Used within its limits, regression is one of the most practical statistical tools; over-interpreted, it is one of the most misused.
Linear Regression Calculator FAQ
What does the line of best fit give me?
An equation capturing how one variable changes with another, letting you quantify the relationship and estimate values from it.
Does a strong fit prove causation?
No — correlation is not causation. A strong linear relationship shows association, not that one thing causes the other.
Is anything uploaded?
No. The calculation happens in your browser.