Bench Tools Free browser-based calculators for the lab and for bioinformatics

Tools›Statistics Calculators

Correlation Coefficient Calculator: Pearson, Spearman and Kendall

Compute all three correlation coefficients with p-values in one step; returns Pearson's confidence interval and r², and flags outliers or nonlinearity when results diverge.

Computes all three correlation coefficients—Pearson, Spearman and Kendall—in a single step, returning their p-values, the Pearson 95% confidence interval, and r².

The three coefficients measure different things

Pearson r measures the strength of a linear relationship. It uses the raw values, so it is sensitive to outliers and captures only straight-line relationships.

Spearman ρ converts the data to ranks and then applies Pearson’s formula. It measures monotonic relationships—as long as one variable consistently rises with the other, direction alone matters, not linearity.

Kendall τ directly counts concordant and discordant pairs. It is more robust than Spearman and has better distributional properties at small sample sizes, though computation scales as n².

When ties are present, this tool reports τb. The concordant-minus-discordant sum S can be divided two ways: by the total number of pairs n₀ = n(n−1)/2 to give τa, or by √[(n₀−n₁)(n₀−n₂)] to give τb, where n₁ and n₂ are the tie-pair counts for x and y respectively. Without ties the two are identical; with ties, τa is systematically smaller—for example, x = 1,2,2,3,5,5,5 and y = 2,3,4,5,5,6,8 give τa = 0.762 and τb = 0.868. R, scipy, and SPSS all report τb, so this tool does too and labels the output “τb” as a reminder. The p-value also incorporates the tie correction (Kendall 1945 variance formula); without it the test is conservative.

Two examples showing why you should look at all three

Example 1: monotonic but nonlinear. 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 the curve is not a straight line.

Example 2: a single outlier can reverse the sign. x = 1,2,…,10 and y = 10,9,8,7,6,5,4,3,2,50: outside the last point, y decreases strictly with x, but that one value of 50 causes Pearson to give +0.358 and Spearman −0.455—opposite signs. Looking only at Pearson leads to the completely wrong conclusion.

So: look at all three together—a large discrepancy means the data have a story to tell. Pearson much smaller than Spearman usually means the relationship is monotonic but curved; opposite signs almost always point to an outlier.

Interpreting r² correctly

r² is the proportion of variance explained by the linear relationship, not an accuracy rate. 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 relationship makes it easy to overestimate how strong an association really is.

Correlation is not causation—and that is not the whole story

Beyond “correlation does not imply causation,” two more points matter equally:

A correlation of 0 does not mean the variables are unrelated. It only means there is no linear (or monotonic) relationship. A U-shaped relationship can have Pearson r = 0 while the two variables are clearly associated.

At large sample sizes, trivially small correlations can be statistically significant. With n = 1000, r = 0.07 yields p < 0.05, yet explains only 0.5% of the variance. Check r and r² before reading the p-value.

Confidence interval

The Pearson interval is computed using the Fisher z transformation: r is mapped to an approximately normal scale, a symmetric interval is constructed there, then the endpoints are transformed back. The resulting interval is therefore asymmetric around r, and the asymmetry becomes more pronounced as r approaches ±1. With n < 10 the interval will be wide—an honest reflection of limited data, not a defect.

FAQ

Which coefficient should I report?

It depends on the data. If the relationship is clearly linear and free of 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. The key rule: choose your method before seeing the results—computing all three and then picking the most favorable one is not acceptable.

What does a large difference between Pearson and Spearman mean?

Spearman substantially higher than Pearson usually means the relationship is monotonic but curved (for example exponential or logarithmic), and Pearson underestimates it because it only measures straight lines. Opposite signs almost always point to outliers—a single extreme value can pull Pearson in the wrong direction while rank-based measures are unaffected. This page will flag 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 = 0 while the association is obvious. Always plot a scatter plot before running any correlation analysis—a step that no coefficient can replace.

Why is the confidence interval asymmetric around r?

Because the interval is computed via the Fisher z transformation: r is mapped to an approximately normal scale, a symmetric interval is built there, and the endpoints are transformed back. The closer r is to ±1, the more pronounced the asymmetry. This is correct behavior, not a computational error.

Does a very small p-value at large sample size mean the association is strong?

No. With n = 1000, r = 0.07 produces p < 0.05, yet explains only 0.5% of the variance. The p-value answers "how likely is this association under the null?"; r and r² answer "how strong is it?". Always check 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.

Michaelis-Menten Km and Vmax Calculator (Nonlinear Fit + Three Linearization Methods)

Nonlinear fit for Km and Vmax with Lineweaver-Burk, Hanes-Woolf, and Eadie-Hofstee linearizations shown in parallel—their spread directly reports data quality.

IC50 / EC50 Four-Parameter Logistic Fit Calculator (with Data Reliability Checks)

Fit IC50/EC50 and Hill slope from concentration–response data using 4PL; reports plateau coverage and how much fixing the slope to 1 shifts the result.

No ads, no tracking, no sign-up — and every formula here is checked against a known answer. Keeping it that way takes ongoing work. If it saved you time, buy me a coffee.
Buy me a coffee