Linear Regression Calculator

Enter paired x and y values to fit a least-squares line. You get the equation, the correlation coefficient and R-squared, plus a scatter plot with the fitted line drawn through it so you can see whether a straight line is a reasonable description of the data in the first place.

Frequently asked questions

What does R-squared tell me?

The proportion of variation in y that the line accounts for. R-squared of 0.85 means the line explains 85% of the variance. A high value does not confirm that the relationship is causal, or even that a straight line is the right shape.

Why should I look at the scatter plot?

Because very different datasets can produce identical regression statistics. Anscombe's quartet is the classic demonstration: four datasets with the same slope, intercept and R-squared that look nothing alike when plotted. Always look.

Related tools