Skip to content
K Knidox Search…
Statistics · Relationships

Correlation Calculator

Pearson’s r, r², and significance from two paired datasets.

Sample data — tap to load
Pearson’s r
0.8783p < 0.05

strong positive correlation · r² = 0.7714 · p = 0.0213

Scatter plot with the line of best fit
Scatter plot of the 6 X–Y pairs with the least-squares line of best fit; Pearson’s r = 0.8783.7216

Pearson’s r measures the strength and direction of a linear relationship, from −1 to +1. For X = 1–5 and Y = 2, 3, 5, 4, 6, r = 9 ÷ √(10 × 10) = 0.9, so r² = 0.81 — about 81% of the variance is shared. An r near 0 means no linear link.

How strongly are two variables related?

Pearson’s r measures the strength and direction of a linear relationship, from −1 (perfect negative) through 0 (none) to +1 (perfect positive). It compares how the two variables vary together to how much they vary on their own. Squaring it gives r², the share of variance in one variable that the other accounts for.

r = Σ(xᵢ − x̄)(yᵢ − ȳ) ÷ √[Σ(xᵢ − x̄)² · Σ(yᵢ − ȳ)²]

covariation divided by the product of each variable’s spread

Worked example

Five pairs — X: 1, 2, 3, 4, 5 and Y: 2, 3, 5, 4, 6. Here x̄ = 3 and ȳ = 4.

  1. 1
    Sum the cross-products. Σ(x−x̄)(y−ȳ) = 4 + 1 + 0 + 0 + 4 = 9.
  2. 2
    Sum each squared deviation. Σ(x−x̄)² = 10 and Σ(y−ȳ)² = 10.
  3. 3
    Divide and square. r = 9 ÷ √(10 × 10) = 9 ÷ 10 = 0.9, so r² = 0.81 — 81% of the variance is shared.

Interpreting |r|

Rough strength bands; the right cutoffs depend on your field.

|r|Strengthr² (variance shared)
0.0–0.2very weak / none0–4%
0.2–0.4weak4–16%
0.4–0.7moderate16–49%
0.7–0.9strong49–81%
0.9–1.0very strong81–100%

What r can and can’t tell you

Correlation is not causation. A strong r means two variables move together — not that one drives the other. A lurking third variable, or pure coincidence, can produce a high correlation.

r only sees straight lines. Pearson’s r captures linear association. A clear curved pattern, like a U-shape, can give an r near 0 even though the variables are tightly related.

Outliers distort it. Because it’s built from squared deviations, a single extreme point can drag r up or down sharply. Always look at a scatterplot before trusting the number.

Significance depends on n. The tool tests r with t = r·√[(n − 2) ÷ (1 − r²)] on n − 2 degrees of freedom. With few pairs even a large r may not be significant; with many pairs even a small r can be.

How many pairs do I need?
At least three to compute r, though more pairs give a more trustworthy estimate and a more reliable significance test.
What counts as a strong correlation?
Loosely: |r| ≥ 0.7 strong, 0.4–0.7 moderate, below 0.2 very weak. The right thresholds depend on your field.
Does this detect non-linear links?
No. Pearson’s r only captures linear relationships; a curved pattern can have r near 0 despite a clear association. Plot the data to check.
What is r² exactly?
The coefficient of determination — the proportion of variance in one variable explained by the other. An r of 0.9 means r² = 0.81, or 81% shared variance.
Is a significant correlation a large one?
Not necessarily. With a big sample, even a tiny r can be statistically significant. Judge importance by the size of r and r², not just the p-value.
How does it test whether r is significant?
It computes t = r·√[(n − 2) ÷ (1 − r²)] on n − 2 degrees of freedom, then reads the p-value. Few pairs make even a large r non-significant; many pairs can make a small r significant.