Pearson Correlation Coefficient Calculator
Enter two equal-length numeric datasets (comma, space, semicolon, or new-line separated).
What this Pearson calculator measures
This tool calculates the Pearson correlation coefficient (r), which measures the strength and direction of a linear relationship between two numerical variables. If one variable tends to increase when the other increases, the result is positive. If one tends to decrease when the other increases, the result is negative.
Values of r range from -1 to +1:
- +1: perfect positive linear relationship
- 0: no linear relationship
- -1: perfect negative linear relationship
How to use the calculator
1) Enter paired observations
Put your X values in the first box and Y values in the second box. Both lists must have the same number of values, and each X value should correspond to the Y value in the same position.
2) Click “Calculate Pearson r”
The calculator returns the correlation coefficient, coefficient of determination (r²), sample size, and an easy-to-read interpretation of strength and direction.
3) Check assumptions before making big conclusions
Pearson correlation is best for continuous numeric variables with an approximately linear pattern. Strong outliers can dramatically affect your result.
Interpreting the result
A practical rule of thumb for absolute correlation strength (|r|):
- 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
Remember: correlation does not imply causation. A high r can exist because of a third factor, coincidence, or indirect relationships.
When Pearson correlation is a good choice
- Studying relationship between study hours and exam score
- Comparing ad spend and sales across time periods
- Testing the relationship between temperature and electricity usage
- Evaluating sensor agreement in engineering or lab measurements
Pearson vs. Spearman: quick comparison
Pearson
Best when the relationship is linear and values are measured on an interval/ratio scale. Sensitive to outliers.
Spearman
Uses ranks instead of raw values. Better for monotonic (not necessarily linear) relationships, ordinal data, or when outliers are a concern.
Common mistakes to avoid
- Using unequal list lengths
- Mixing categories with numeric variables and treating them as continuous
- Ignoring non-linear patterns
- Relying only on r without visualizing data (scatter plot)
- Concluding causation from correlation alone
FAQ
Can I use decimals and negative numbers?
Yes. The calculator accepts integers, decimals, and negative values.
Why did I get an error about zero variance?
If all X values are identical (or all Y values are identical), there is no variability in that variable, and Pearson r is undefined.
What does r² mean?
r² is the proportion of variation in one variable that is linearly associated with the other. For example, r = 0.70 gives r² = 0.49, meaning about 49% shared linear variation.