Correlation Coefficient Calculator Online: Pearson, Spearman, and Kendall
Pearson, Spearman, and Kendall correlation coefficients computed in one step, with individual p-values, Pearson’s 95% confidence interval, and r².
Three coefficients measuring different things
Pearson r measures the strength of a linear relationship. It uses raw values, so it is sensitive to outliers and can only capture straight-line relationships.
Spearman ρ converts the data to ranks first, then computes Pearson. It measures monotonic relationships — as long as “when one goes up the other goes up too” holds, it does not require a straight line.
Kendall τ directly counts concordant pairs versus discordant pairs. It is more robust than Spearman, has better distributional properties in small samples, but computation scales as n².
Two examples showing why you need all three
Example 1: monotonic but non-linear. x = 1…8, y = 2ˣ: Pearson gives 0.850, while Spearman and Kendall both give 1.000. The relationship is perfectly monotonic, but Pearson underestimates it because it is not a straight line.
Example 2: a single outlier can flip the sign. x = 1, 2, …, 10 and y = 10, 9, 8, 7, 6, 5, 4, 3, 2, 50: apart from the last point, y strictly decreases with x, but that one value of 50 causes Pearson to give +0.358 and Spearman to give −0.455 — opposite signs. Looking only at Pearson leads to completely the wrong conclusion.
So: look at all three together. A large discrepancy means the data has a story. Pearson much smaller than Spearman usually means the relationship is monotonic but curved; opposite signs almost always point to an outlier.
Reading r² correctly
r² is “the proportion of variance explained by the linear relationship” — not “accuracy.” r = 0.7 looks high, but r² = 0.49, meaning half the variation is still unexplained. At r = 0.5, r² is only 0.25. The squaring makes it easy to overestimate association strength.
Correlation ≠ causation — and that’s not the whole story
Beyond “correlation does not imply causation,” two more things matter equally:
Zero correlation does not mean independence. It only means no linear (or monotonic) relationship. A U-shaped relationship can have Pearson r exactly equal to 0, yet the two variables are clearly related.
With large samples, a trivially small correlation can be statistically significant. At n = 1000, r = 0.07 can produce p < 0.05, yet it explains only 0.5% of the variance. Look at r and r² before the p-value.
Confidence interval
Pearson’s interval is computed using the Fisher z-transformation: r is first mapped to a nearly normal scale, a symmetric interval is computed there, then mapped back. The interval is therefore asymmetric around r, more visibly so as r approaches ±1. A wide interval at n < 10 is an honest reflection of uncertainty, not a flaw.
FAQ
Which coefficient should I report?
It depends on the data. If the relationship is clearly linear with no extreme values, report Pearson; if it is monotonic but curved, or if outliers are present, report Spearman or Kendall. At small sample sizes (n < 20), Kendall has better distributional properties. Critically: choose your method before seeing the results — picking the best-looking of the three after the fact is not valid.
What does a large difference between Pearson and Spearman mean?
Spearman substantially higher than Pearson typically means the relationship is monotonic but curved (e.g., exponential or logarithmic), and Pearson underestimates it because it only measures linearity. Opposite signs almost always indicate outliers — a few extreme values can pull Pearson in the opposite direction while rank-based coefficients remain unaffected. This tool flags both situations automatically.
Does r = 0 mean the two variables are unrelated?
No. It only means there is no linear relationship (Spearman = 0 means no monotonic relationship). A U-shaped relationship can have Pearson r exactly equal to 0, yet the two variables are clearly related. Always plot a scatter plot before running a correlation analysis — that is a step no correlation coefficient can replace.
Why is the confidence interval asymmetric around r?
Because the Fisher z-transformation is used: r is first mapped to a nearly normal scale, a symmetric interval is computed there, then mapped back. The closer r is to ±1, the more pronounced the asymmetry. This is correct behavior, not a computation error.
A large sample gives a very small p-value — does that mean the association is strong?
No. At n = 1000, r = 0.07 can produce p < 0.05, yet explains only 0.5% of the variance. The p-value answers "how likely is this association under pure chance?"; r and r² answer "how strong is the association?" Look at the latter first.
Related tools
How to Choose a Statistical Test: By Data Type, Number of Groups, and Paired vs. Independent Design
Answer three questions to identify the right test: comparing values or proportions, how many groups, paired or independent. Each row links to the corresponding tool.
Multiple Testing Correction Calculator: BH (FDR), BY, and Bonferroni
Paste a column of p-values and get BH q-values, BY, and Bonferroni corrections side by side in one step.
qPCR 2^−ΔΔCt Relative Quantification Online Calculator
Paste your Ct table and get ΔCt, ΔΔCt, fold-change, and within-group dispersion calculated automatically.
Buy me a coffee