Correlation Coefficient Calculator
Enter two matching lists of numbers (paired x and y values) to calculate Pearson's correlation coefficient (r) — a measure of how strongly and in what direction the two variables move together.
How the Correlation Coefficient formula works
The Pearson correlation formula:
r = [ n·Σxy − Σx·Σy ] / √[ (n·Σx² − (Σx)²)(n·Σy² − (Σy)²) ]
r ranges from −1 (perfect negative relationship) to +1 (perfect positive relationship), with 0 indicating no linear relationship.
Step-by-step calculation
- Calculate the sum of x values, sum of y values, sum of x×y products, sum of x², and sum of y².
- Plug these sums into the correlation formula.
- The result, r, indicates both the strength (how close to ±1) and direction (positive or negative) of the linear relationship.
Worked example
For paired data (1,2), (2,4), (3,5), (4,8): the calculation yields r ≈ 0.98, indicating a very strong positive linear relationship — as x increases, y increases in a highly consistent, near-linear pattern.
Frequently asked questions
What counts as a 'strong' correlation?
As a rough guide, |r| above 0.7 is often considered strong, 0.3–0.7 moderate, and below 0.3 weak — though what counts as meaningful varies by field, and these are conventions, not strict rules.
Does correlation mean one variable causes the other?
No — correlation measures association, not causation. Two variables can be strongly correlated because one causes the other, both are caused by a third factor, or purely by coincidence, so correlation alone never proves a causal relationship.