Calculate & Convert

Correlation & Linear Regression

Pearson correlation, best-fit line and R² from two paired data sets.

Enter values

The formula

r = Σ((x−x̄)(y−ȳ)) / √(Σ(x−x̄)² · Σ(y−ȳ)²)

Correlation measures how tightly two variables move together, on a scale from −1 to +1. The regression line is the straight line that best predicts one from the other. Neither proves that one causes the other — a strong correlation is a reason to investigate, not a conclusion.

All calculations run locally in your browser and update instantly as you type.

Example calculations

Common questions this calculator answers — select one to load its values.

Related calculators

Frequently asked questions

What does r actually mean?+
r ranges from −1 to +1. +1 is a perfect upward straight line, −1 a perfect downward one, and 0 means no linear relationship at all. Values in between describe how tightly the points hug a straight line.
Does correlation prove causation?+
No. Two variables can move together because one causes the other, because something else causes both, or by pure coincidence in a small sample. Correlation tells you to look closer; it does not tell you why.
What is R² for?+
R² is the proportion of variation in y explained by x. An R² of 0.64 means 64% of the movement in y is accounted for by the straight-line relationship with x.
All calculations run locally in your browser. Nothing you type is sent to a server.