Pearson Correlation Coefficient Calculator
Enter two equal-length datasets to compute Pearson’s r, the direction and strength of their linear relationship.
What is a correlation coefficient?
A correlation coefficient is a number between -1 and +1 that summarizes how two variables move together. In this calculator, we use the most common version: Pearson’s correlation coefficient (r).
- r > 0: positive relationship (as X increases, Y tends to increase)
- r < 0: negative relationship (as X increases, Y tends to decrease)
- r ≈ 0: little to no linear relationship
- |r| = 1: perfect linear relationship
How this calculator works
Paste your two data series in the input fields. The calculator parses the numbers, checks for matching lengths, and applies the Pearson formula:
r = [n(Σxy) − (Σx)(Σy)] / √{[n(Σx²) − (Σx)²][n(Σy²) − (Σy)²]}
It then returns:
- The correlation coefficient (r)
- The coefficient of determination (r²)
- A plain-language interpretation of strength and direction
Interpreting your result
Direction
The sign of r tells you direction. A positive sign means both variables move together. A negative sign means they move in opposite directions.
Strength (rule of thumb)
- 0.00 to 0.19: Very weak
- 0.20 to 0.39: Weak
- 0.40 to 0.59: Moderate
- 0.60 to 0.79: Strong
- 0.80 to 1.00: Very strong
These are conventions, not universal laws. Context matters by field (finance, psychology, biology, etc.).
Important caveats
- Correlation is not causation. A high r does not prove one variable causes the other.
- Pearson r measures linear relationships. A curved relationship can exist even when r is near zero.
- Outliers can distort r. Always inspect your data visually when possible.
- Constant data cannot be correlated. If all X or all Y values are identical, r is undefined.
When to use this calculator
Use it for quick analysis in research, business dashboards, quality control, marketing studies, and classroom assignments. It is especially useful when you need a fast check before running deeper modeling such as regression or forecasting.
Example use case
Suppose you track hours studied (X) and test scores (Y) for a group of students. A strong positive r suggests students who study more tend to score higher. That insight can guide coaching, but you should still verify assumptions and check for confounding factors like prior knowledge or sleep quality.