InfyCalculator

Correlation Coefficient Calculator

Compute the Pearson correlation coefficient r between two lists of numbers, with r-squared and a plain-language reading of the relationship.

X values
Y values
Loading calculator…

How it works

r = Σ(x − x̄)(y − ȳ) ÷ √(Σ(x − x̄)² × Σ(y − ȳ)²)

Pearson’s r measures how tightly two variables track a straight line, on a scale from −1 to +1. Values near +1 mean they rise together, near −1 mean one falls as the other rises, and near 0 mean no linear link. Squaring r gives r², the share of one variable’s variation that the linear fit explains. Correlation captures only straight-line patterns and never proves that one variable causes the other.

Worked example

For X = 1, 2, 3, 4, 5 and Y = 1, 3, 2, 5, 4, both means are 3. The deviation products sum to 8, and each list’s squared deviations sum to 10, so r = 8 ÷ √(10 × 10) = 0.8 — a strong positive relationship with r² = 0.64. A perfectly linear pair like Y = 2, 4, 6 against X = 1, 2, 3 returns r = 1.

Frequently asked questions

Does a high correlation mean one thing causes the other?

No. Correlation only measures how well the points line up. A lurking third variable, coincidence, or reverse causation can all produce strong correlations, which is why "correlation is not causation" is repeated so often.

What does r² tell me that r doesn’t?

r² is the proportion of variation explained by the linear relationship: an r of 0.8 means r² = 0.64, so 64% of the variance is accounted for. It turns the abstract r into a share that is easier to interpret.

Can r miss a real relationship?

Yes. Pearson’s r only detects straight-line association. A strong curved pattern — say a U-shape — can have an r near zero even though the variables are clearly related, so always plot the data too.

Related calculators

For education — check assumptions (sample size, distribution) before using statistics in real decisions.