Pearson correlation coefficient (r)
The Pearson correlation coefficient r measures the strength and direction of the linear relationship between two numeric variables. It ranges from −1 (perfect negative correlation) to +1 (perfect positive correlation), with 0 meaning no linear relationship.
This calculator works from the six standard summary statistics of a paired dataset, rather than the raw pairs themselves. If you have raw data, compute the sums first in a spreadsheet, then plug them in here.
Formula
r = (n·Σxy − Σx·Σy) / √[(n·Σx² − (Σx)²)(n·Σy² − (Σy)²)]
Where:
- n — number of paired observations
- Σx, Σy — sums of the X and Y values
- Σxy — sum of the products x·y for each pair
- Σx², Σy² — sums of squared X and Y values
How to use
- Count your data pairs and enter n.
- From your spreadsheet, compute and enter Σx, Σy, Σxy, Σx², Σy².
- The Pearson r appears instantly.
Interpreting r
| |r| range | Strength | |---|---| | 0.00–0.19 | very weak | | 0.20–0.39 | weak | | 0.40–0.59 | moderate | | 0.60–0.79 | strong | | 0.80–1.00 | very strong |
A positive r means both variables move together; a negative r means they move in opposite directions.
FAQ
Does r imply causation?
No. Correlation only describes association. A high r between two variables can result from a confounding third variable, coincidence, or reverse causation.
What about non-linear relationships?
Pearson's r measures linear association only. Two variables with a perfect quadratic relationship can have r ≈ 0. For non-linear monotonic relationships, use Spearman's rank correlation instead.
How is r related to R²?
R² = r² for a simple linear regression. R² is the fraction of variance in Y explained by X.