Correlation Coefficient Calculator
This correlation coefficient calculator computes Pearson’s r and Spearman’s ρ from paired x and y values. It also reports a two-sided p-value for each coefficient and draws a scatter plot of the points. The site already has tools that convert between a covariance and r; this page is the one that starts from the raw data.
Correlation coefficient calculator
Paste paired x and y values to get Pearson’s r and Spearman’s ρ, with two-sided p-values.
Working
Calculator loading… If the form does not return a result, wait a moment and try again.
Pearson and Spearman formulas
Pearson: r = Sxy / √(Sxx Syy), with Sxy = Σ(x − x̄)(y − ȳ).
The usual test of H₀: ρ = 0 uses t = r √((n−2)/(1−r²)) with df = n − 2.
Spearman: rank each variable, using average ranks for ties, then compute Pearson’s r on the ranks. The p-value shown here uses the same t approximation as Pearson, which is standard for a quick calculator but is an approximation, especially in small samples or with many ties.
Worked example
Using the same eight pairs as the regression example — x = 1 through 8 and y = 2.1, 3.9, 6.2, 7.8, 10.1, 11.7, 14.2, 15.8 — Pearson’s r is about 0.999 and Spearman’s ρ is 1, because the ranks increase together even though the relationship is not a perfectly straight line.
Related calculators and guides
Frequently asked questions
Use Pearson when you want the strength of a linear relationship on the original scale. Use Spearman when you care about a monotone relationship, when the data are ordinal, or when outliers would distort Pearson’s r.
No. Correlation does not imply causation. A significant r or ρ only says the association in the sample would be unusual if there were no association in the population.
Tied values receive the average of the ranks they would have occupied. The coefficient is then the Pearson correlation of those average ranks.
No. The older tools convert between a known covariance and a correlation coefficient. This calculator estimates r and ρ from a list of paired observations.
Yes. Use the linear regression calculator with the same two lists. Its Pearson r will match the Pearson r here.