Pearson r Calculator
Enter two equal-length lists of numbers to calculate the Pearson correlation coefficient (r), its square (r²), and a quick interpretation.
Tip: Separate values with commas, spaces, or line breaks.
What is the r coefficient?
The r coefficient usually refers to the Pearson correlation coefficient, a number between -1 and +1 that describes the direction and strength of a linear relationship between two variables.
- r = +1: perfect positive linear relationship
- r = -1: perfect negative linear relationship
- r = 0: no linear relationship
This metric is commonly used in statistics, psychology, finance, data science, and research design when you want to understand how two continuous variables move together.
How to use this calculator
Step-by-step
- Enter your first dataset in X values.
- Enter your second dataset in Y values.
- Make sure both lists have the same number of data points.
- Click Calculate r.
The tool returns:
- r (correlation coefficient)
- r² (coefficient of determination)
- A plain-language interpretation of strength and direction
The Pearson correlation formula
The calculator uses this classic formula:
r = [nΣxy - (Σx)(Σy)] / √{[nΣx² - (Σx)²][nΣy² - (Σy)²]}
Where n is the number of paired observations. This method measures how closely points align to a straight line.
How to interpret r values
Interpretation is context-dependent, but a common guide is:
- 0.00 to 0.09: negligible
- 0.10 to 0.29: weak
- 0.30 to 0.49: moderate
- 0.50 to 0.69: strong
- 0.70 to 0.89: very strong
- 0.90 to 1.00: nearly perfect
Use the sign to read direction (+ or -), and the absolute value to read strength.
Worked example
Suppose you track weekly study hours (X) and test scores (Y) for students. If the calculator gives r = 0.78, that indicates a very strong positive linear relationship: as study hours increase, scores tend to increase.
If r² = 0.61, you can say about 61% of the variation in test scores is linearly associated with study hours in this sample.
Common mistakes to avoid
- Correlation is not causation. A high r does not prove X causes Y.
- Outliers can distort results. One extreme point may dramatically change r.
- Nonlinear patterns can hide in plain sight. You can have r near 0 but still have a strong curved relationship.
- Mismatched data pairs. Every X must correspond to the correct Y observation.
When Pearson r is not the best choice
Consider alternatives when assumptions are violated:
- Spearman rank correlation for ordinal data or monotonic but nonlinear trends
- Kendall’s tau for smaller samples and rank-based association
- Robust methods when data contain influential outliers
Quick FAQ
What does r = 0 mean?
It means no linear relationship was detected. A nonlinear relationship may still exist.
Can r be greater than 1?
No. Valid Pearson correlation values are always between -1 and +1.
Why does the calculator show an error about variance?
If all X values (or all Y values) are identical, there is no spread in that variable, and Pearson r is undefined.