Linear regression calculator
MEMBERSThe line of least squares through pairs of numbers, with the correlation, r squared and the points on a graph.
Data
Statistics
This number is outside what the distribution allows.
Found a bug or missing something? Write to us
How it works
A line through the points
Pairs of numbers are pasted from a spreadsheet. The line of least squares is the one for which the sum of squared vertical distances is smallest.
The correlation r tells how closely the points follow a line, from -1 to 1, and r squared which part of the variation the line explains.
The line can be plotted in the graphing mode as a function, to read values or to compare it with another curve. A value far outside the data is a guess.
Help
FAQ
What does r close to zero mean?
That the points do not follow a line. They may still follow a curve, which the graph shows.
Does a high correlation mean a cause?
No. Two things can change together because of a third one, or by chance. The number describes the data only.
How many pairs are needed?
Two pairs give a line that fits exactly, which says nothing about the fit. From three pairs on, r and r squared begin to mean something.