Correlation Coefficient Calculator (Pearson's $r$)
Use this calculator to find the strength and direction of the linear relationship between two variables, X and Y. Enter your paired data points below. Each line should contain the X-value, followed by the Y-value, separated by a comma or space.
Make sure X and Y have the same number of data points. Use commas, spaces, or new lines to separate values.
Results
Pearson's $r$
Interpretation
Coefficient of Determination ($R^2$)
Step-by-Step Calculation Table
Pearson's Correlation Coefficient ($r$) Formula
Pearson's $r$ is calculated using the following formula, which is designed to measure the covariance of X and Y normalized by the standard deviations of X and Y:
$$r = \frac{n \sum xy - (\sum x)(\sum y)}{\sqrt{[n \sum x^2 - (\sum x)^2][n \sum y^2 - (\sum y)^2]}}$$
Where:
- $n$ is the number of paired observations (data points).
- $\sum x$ and $\sum y$ are the sums of the X and Y values.
- $\sum x^2$ and $\sum y^2$ are the sums of the squared X and squared Y values.
- $\sum xy$ is the sum of the products of X and Y for each pair.
This formula always yields a value between $-1$ and $+1$.
Interpreting the Correlation Coefficient ($r$)
The value of $r$ tells you two things about the relationship between X and Y:
- Direction (Sign):
- **Positive ($r > 0$):** As X increases, Y tends to increase (a positive slope).
- **Negative ($r < 0$):** As X increases, Y tends to decrease (a negative slope).
- **Zero ($r \approx 0$):** No linear relationship exists.
- Strength (Magnitude): The closer the value is to $\pm 1$, the stronger the linear relationship. The closer it is to 0, the weaker the relationship.
Strength Guidelines (Commonly Used)
| Magnitude of $|r|$ | Strength |
|---|---|
| 0.90 to 1.00 | Very Strong |
| 0.70 to 0.89 | Strong |
| 0.50 to 0.69 | Moderate |
| 0.30 to 0.49 | Weak |
| 0.00 to 0.29 | Negligible |