FinanceHealthMathDev ToolsDate & TimeText ToolsConvertersUtilitiesBusinessConstructionAgricultureAutomotiveScienceStatisticsEducationLegal & TaxAbout

Correlation Coefficient Calculator

Calculate the Pearson and Spearman correlation coefficients between two variables. Paste your data, get r, r², and an interpretation of the strength and direction of the relationship.

Variable X (one per line)
Variable Y (one per line)
Pearson correlation coefficient (r)
Pearson r
R-squared (r²)
Spearman ρ (rank correlation)
Data points (n)
Covariance
Interpretation
Frequently Asked Questions
What is the Pearson correlation coefficient?

Pearson r measures the linear relationship between two variables. It ranges from -1 (perfect negative) through 0 (no correlation) to +1 (perfect positive). It assumes both variables are normally distributed and the relationship is linear.

How do I interpret the r value?

|r| < 0.3: very weak. |r| 0.3-0.5: weak. |r| 0.5-0.7: moderate. |r| 0.7-0.9: strong. |r| > 0.9: very strong. The sign indicates direction: positive means both variables increase together, negative means one rises as the other falls.

What is R-squared (r²)?

R-squared (coefficient of determination) shows the proportion of variance in Y explained by X. r = 0.8 gives r² = 0.64, meaning 64% of the variation in Y is explained by its linear relationship with X.

What is the difference between Pearson and Spearman correlation?

Pearson measures linear correlation between actual values and requires normality. Spearman measures monotonic correlation between ranks — it works for non-linear relationships and non-normal data, and is more robust to outliers.

Does correlation imply causation?

No. A high correlation between X and Y means they change together, but not that one causes the other. Both could be caused by a third variable (confound). Causation requires controlled experiments, not just correlation analysis.

How many data points do I need for correlation?

At least 5-10 pairs for a meaningful result. With fewer points, the correlation is statistically unreliable — even random data can show r = ±1 with just 2 points. For hypothesis testing, use at least 25-30 pairs.

What is a spurious correlation?

A spurious correlation is a high r value between two variables that have no causal or logical relationship. Famous examples: ice cream sales correlating with drowning rates (both caused by summer heat). Always consider the mechanism behind the numbers.