Correlation Calculator

Measure the strength and direction of a linear relationship.

Enter at least one pair of values.

How Pearson correlation works

Pearson's correlation coefficient r measures the strength and direction of a linear relationship between two variables, from −1 (perfect negative) through 0 (no linear relationship) to +1 (perfect positive).

The calculator requires paired X and Y values of equal length, at least two pairs, and at least one variable must vary (a constant column has zero variance and no defined correlation).

Correlation describes association, not causation: two variables can be strongly correlated without one causing the other.

The formula

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

For each pair, multiply the deviations of x and y from their means, sum them, and divide by the square root of the product of the summed squared deviations of x and y.

Worked example

Perfect positive relationship

For X = 1,2,3,4,5 and Y = 2,4,6,8,10 every point lies exactly on a rising line, so r = 1. If Y were 10,8,6,4,2, r would be −1.

Frequently asked questions

How do I interpret the strength of r?

As a rough guide, |r| below 0.3 is weak, 0.3–0.7 is moderate, and above 0.7 is strong. Context and sample size matter — always consider both.

Why do I get an error for constant data?

If all X values are identical there is no variance in X, so the correlation is undefined. Add a dataset with some variation.

Does correlation imply causation?

No. Correlation alone cannot establish cause and effect — a third variable may drive both, or the relationship may be coincidental.

Built by PanelRoster

PanelRoster is an enterprise operations management platform for organizations coordinating distributed teams, assignments, workflows, quality assurance and operational execution.

Explore PanelRoster