Correlation Coefficient Calculator - Pearson's r
Calculate the Pearson correlation coefficient (r) from a list of x/y data point pairs.
Data Points (x, y)
#1
#2
#3
#4
Correlation Coefficient (r)
0.9812
How to Calculate the Pearson Correlation Coefficient
The Pearson correlation coefficient (r) measures the strength and direction of a linear relationship between two numeric variables. It ranges from -1 (a perfect negative relationship) to +1 (a perfect positive relationship), with 0 meaning no linear relationship. Add your x/y data pairs below to compute r.
Example
The pairs (1,2), (2,4), (3,5), and (4,8) give n=4, Σx=10, Σy=19, Σxy=57, Σx²=30, and Σy²=109. Plugging into the formula: r = (4×57 − 10×19) ÷ √[(4×30 − 100)(4×109 − 361)] = 38 ÷ √1,500 ≈ 0.98, indicating a very strong positive relationship.
Common Use Cases
- Checking whether two variables — like study hours and test scores — move together.
- Quick statistical sanity-checks before building a regression model.
- Evaluating the relationship between marketing spend and sales, or similar business metrics.
FAQs
What does an r value close to 0 versus ±1 mean?
An r near 0 means little to no linear relationship between the two variables — knowing one tells you almost nothing about the other. An r close to +1 or -1 means the variables track each other closely in a straight-line pattern, either both increasing together (positive) or one increasing as the other decreases (negative).
Does correlation imply causation?
No — a strong correlation only shows that two variables move together, not that one causes the other. Both could be driven by a third factor, or the relationship could be coincidental, especially with a small dataset.
How many data points do I need for a meaningful result?
Mathematically, the formula works with as few as 2 pairs, but a correlation from just a handful of points can be misleadingly high or low. For a result you can actually rely on, aim for at least 5-10 or more data points, and more for noisy real-world data.
