Skip to main content
v2026.11,858 entries · CC-BY 4.0
LAC HealthMedical & Research SuppliesReagents, PPE & instruments — chain-of-custody documented.Fast, traceable sourcing built for regulated research environments, from bench consumables to instrumentation.Shop lac.us CodeCASRAIlac.us

Kendall Tau Correlation Coefficient: Formula, Interpretation and Worked Example

Kendall’s tau explained: formulas for tau-a, b and c, a worked example, tau vs Spearman and Pearson, APA reporting, and R, Python, Excel code.

Written and maintained by CASRAI Editorial Board

Last updated

Kendall’s tau (τ) is a rank-based correlation coefficient that measures how often two variables order the same pairs of observations in the same direction. It runs from −1 to +1 and needs only ordinal information. This guide gives the formula for each tau variant, a worked example with the arithmetic shown, a reading table, and code for R, Python and Excel.

What is the Kendall tau correlation coefficient?

Kendall’s tau is a measure of rank association between two variables. For every pair of observations it asks whether the two variables move in the same direction (a concordant pair) or in opposite directions (a discordant pair). A tau of +1 means every pair is concordant, −1 means every pair is discordant, and 0 means concordant and discordant pairs balance. R’s documentation describes it, with Spearman’s rho, as a statistic “used to estimate a rank-based measure of association” (R stats::cor, read 2026-11-07). Unlike Pearson’s r, it does not assume a linear relationship, only a monotonic one.

Kendall tau formula and what every symbol means

Take n paired observations and compare all n(n−1)/2 pairs. Define:

  • P: the number of concordant pairs.
  • Q: the number of discordant pairs.
  • T: the number of pairs tied only on x.
  • U: the number of pairs tied only on y.

Pairs tied on both variables are counted in none of these. The SciPy documentation (scipy.stats.kendalltau, read 2026-11-07) gives the forms:

  • Tau-a (no ties): τa = (P − Q) / [n(n−1)/2]. SciPy notes that variants b and c reduce to tau-a when there are no ties.
  • Tau-b: τb = (P − Q) / √[(P + Q + T)(P + Q + U)]. This is SciPy’s default, and R’s cor computes tau-b when there are ties, as proposed by Kendall (1945).
  • Tau-c: τc = 2(P − Q) / [n²(m−1)/m], where m is the smaller number of distinct values in x or y. SciPy offers it as variant=’c’.

Worked example with the arithmetic shown

Seven participants are measured on two variables. The x values are 1, 2, 3, 4, 5, 6, 7 and the paired y values are 1, 3, 2, 3, 5, 6, 6. With n = 7 there are 7 × 6 / 2 = 21 pairs.

  1. Ties. The x values have no ties, so T = 0. The y values contain two ties: the observations at x = 2 and x = 4 (both y = 3), and at x = 6 and x = 7 (both y = 6). So U = 2.
  2. Discordant pairs. Only the pair at x = 2 (y = 3) and x = 3 (y = 2) moves in opposite directions. Q = 1.
  3. Concordant pairs. The remaining pairs: P = 21 − 1 − 2 = 18.
  4. Tau-a, ignoring the ties: (18 − 1) / 21 = 17 / 21 = 0.810.
  5. Tau-b. P + Q + T = 19 and P + Q + U = 21, so τb = 17 / √(19 × 21) = 17 / √399 = 17 / 19.975 = 0.851.

The pair counts and both coefficients were checked by brute-force counting in Python and against scipy.stats.kendalltau, which returns 0.8511 for these data with a two-sided p-value of 0.009 (normal approximation, because the data contain ties).

Interpreting Kendall tau results

Tau has a direct probabilistic reading: it is the proportion of concordant pairs minus the proportion of discordant pairs. A tau of 0.85 in the example means concordant pairs far outnumber discordant ones. The sign gives direction and the p-value tests the null hypothesis that τ = 0.

What does a 0.7 correlation coefficient mean?

It depends on which coefficient. For Pearson’s r, SAS (Wicklin, 2023) quotes the Schober et al. bands: 0.1–0.39 weak, 0.4–0.69 moderate, 0.7–0.89 strong, 0.9–1.0 very strong, so r = 0.7 is strong. Those bands were proposed for Pearson. Kendall’s tau is smaller in magnitude than Pearson’s r for the same underlying association, so applying the Pearson labels directly to a tau understates the relationship. A tau of 0.7 corresponds to a Pearson r of about 0.89 under bivariate normality (see the table below).

Kendall tau vs Spearman vs Pearson: are Spearman and Pearson the same?

No. Pearson’s r measures linear association on the raw values. Spearman’s rho is Pearson’s r computed on the ranks, so it captures any monotonic relationship. Kendall’s tau counts concordant and discordant pairs instead. For bivariate normal data, SAS (Wicklin, 2023, read 2026-11-07) gives the relationships Spearman = (6/π)·arcsin(r/2) and Kendall = (2/π)·arcsin(r). The table below was computed from those formulas. It is a bivariate-normal benchmark, not a general conversion, and outliers distort Pearson.

Pearson r Spearman ρ Kendall τ
0.30 0.29 0.19
0.50 0.48 0.33
0.70 0.68 0.49
0.90 0.89 0.71

So a Pearson r near 0.7 corresponds to a Kendall tau near 0.5, and a “small” tau next to a larger Spearman or Pearson value is not a contradiction. For a step-by-step Spearman workflow see Spearman rank correlation in SPSS, and for the linear counterpart Pearson correlation in SPSS.

How do you interpret Spearman correlation results alongside tau?

Read them the same way: the sign gives direction, the magnitude gives strength of monotonic association, and the p-value gives evidence against zero. Compare magnitudes only within one coefficient, since the same data give a smaller tau than rho. Choose the coefficient before looking at results.

Assumptions and common mistakes

  • Data type. Variables must be at least ordinal and observations paired. Tau does not require normality.
  • Monotonic, not linear. Tau detects consistent ordering. A U-shaped relationship can give a tau near 0 despite strong dependence.
  • Ties. With ties use tau-b (or tau-c); tau-a has no tie correction. R and SciPy handle ties automatically.
  • Exact vs approximate p-values. R’s cor.test computes an exact p-value only with fewer than 50 paired samples and no ties; otherwise it uses a normal approximation. SciPy’s method=’exact’ works only without ties and raises a ValueError otherwise; the default ‘auto’ chooses for you. In R’s own tuna example, exact = FALSE moves a one-sided p-value from 0.05972 to 0.04765, enough to change a significance decision.
  • Cross-scale comparison. Do not apply Pearson strength labels directly to tau (see the table above).
  • Causation. No correlation coefficient shows that one variable influences the other. See the correlation coefficient overview and how to read a correlation matrix.

How to report Kendall’s tau (APA-style example)

Report the variant, the sample size and the p-value, and say whether the p-value is exact or asymptotic. For the worked example:

Scores on the two measures were strongly and positively associated, Kendall’s τb = .85, p = .009, n = 7.

Following APA convention, statistics that cannot exceed 1 are written without a leading zero.

How to calculate Kendall’s tau in R, Python and Excel

R

x <- c(1,2,3,4,5,6,7)y <- c(1,3,2,3,5,6,6)cor(x, y, method = "kendall")        # tau-b because of tiescor.test(x, y, method = "kendall")   # tau and p-value

Python (SciPy)

from scipy.stats import kendalltaux = [1,2,3,4,5,6,7]y = [1,3,2,3,5,6,6]res = kendalltau(x, y)   # variant='b' by defaultprint(res.statistic, res.pvalue)   # 0.8511, 0.0090

See also the SciPy stats guide.

Excel

Excel has no built-in Kendall function. With x in A2:A8 and y in B2:B8, sum the products of sign differences over all ordered pairs (dynamic-array Excel, or array-enter in older versions):

S      =SUMPRODUCT(SIGN(A2:A8-TRANSPOSE(A2:A8))*SIGN(B2:B8-TRANSPOSE(B2:B8)))tau-a  =S/(7*6)tau-b  =S/SQRT(SUMPRODUCT(SIGN(A2:A8-TRANSPOSE(A2:A8))^2)*SUMPRODUCT(SIGN(B2:B8-TRANSPOSE(B2:B8))^2))

S equals 2(P − Q) because each pair is counted in both orders. The same sign-matrix computation gives 0.8095 for tau-a and 0.8511 for tau-b on the example data. Excel gives no p-value, so use R or Python for inference.

Frequently asked questions

What is the formula for the rank correlation coefficient?

For Kendall’s rank correlation without ties, τ = (P − Q) / [n(n−1)/2]. With ties, τb = (P − Q) / √[(P + Q + T)(P + Q + U)]. Spearman’s rank coefficient is a different statistic: Pearson’s r computed on the ranks.

Can tau be used with tied ranks?

Yes, use tau-b (or tau-c). R’s cor computes tau-b when there are ties, and SciPy defaults to tau-b.

Sources

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about Kendall Tau Correlation Coefficient: Formula, Interpretation and Worked Example

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →