Kendall Tau-b Correlation Calculator

StatisticsLast updated: August 22, 2026

Kendall tau-b is a nonparametric correlation coefficient that measures the agreement between two ordinal variables directly, through pairwise comparisons. Every pair of observations is examined one by one: if both variables rank the pair in the same direction the pair is concordant, and if they rank it in opposite directions the pair is discordant. The coefficient is the excess of concordant pairs expressed as a proportion of the comparable pairs, and it ranges from −1 to +1.

This calculator counts every pair to obtain C and D, the pairs that contain a tie, the statistic S = C − D, the tie-corrected tau-b coefficient, z and p from the normal approximation, and a confidence interval for tau. The pair count is summarized in a table, and the same data is also run through Spearman rho for comparison, so you can see in concrete numbers why tau-b is the more reliable choice in small samples with many ties.

Each value belongs to one observation. Ordinal data can be entered directly.
Each value must match the observation in the same position in the X field; both fields must hold the same number of values.
Sets the false positive risk. In the social sciences 5% is the common choice.
The probability that the interval covers the true parameter.

Kendall Tau Formulas

Total pairs:      n₀ = n(n − 1)/2
S = C − D         (C: concordant pairs, D: discordant pairs)
Tau-a:            τ_a = S / n₀
Tau-b:            τ_b = S / √[(n₀ − n_x)(n₀ − n_y)]
n_x = Σ tᵢ(tᵢ − 1)/2  (tie groups in X),  n_y likewise for Y
Var(S) = [n(n−1)(2n+5) − Σtᵢ(tᵢ−1)(2tᵢ+5) − Σuⱼ(uⱼ−1)(2uⱼ+5)] / 18
         + [Σtᵢ(tᵢ−1)(tᵢ−2)·Σuⱼ(uⱼ−1)(uⱼ−2)] / [9n(n−1)(n−2)]
         + [Σtᵢ(tᵢ−1)·Σuⱼ(uⱼ−1)] / [2n(n−1)]
z = S / √Var(S)   ,  p = 2·[1 − Φ(|z|)]
Confidence interval: tanh( artanh(τ_b) ± z_(1−α/2)·√(0.437/(n − 4)) )

The tie-corrected Var(S) formula is Kendall's classic derivation and produces the same z value as the Nonparametric Correlations output in SPSS. Concordant and discordant pairs are counted here by an exhaustive O(n²) scan; no approximation is used.

How to Calculate

  1. Paste the X and Y values into the two fields in the same order; both fields must hold the same number of values, and each row must belong to the same observation.
  2. Choose the significance level (α) and the confidence level.
  3. Study the pair count table: it shows how many pairs are concordant, discordant, and tied, and how the ties affect the tau-b denominator.
  4. Read tau-b, z, and p together; the decision line states directly whether the relationship is significant at your α.
  5. Compare with Spearman rho: it is normal for tau-b to come out numerically smaller, because the two coefficients are defined on different scales.
  6. Report τ_b, z, p, and the confidence interval together in your write-up.

Worked Examples

Two ordinal measurements (with tied values)

Of the 45 pairs, 42 are concordant and none are discordant; the remaining 3 are tied on Y. S = 42 and τ_b = 0.966 (τ_a = 0.933). With Var(S) = 122, z = 3.803 and the relationship is significant at p < 0.001; the 95% confidence interval runs from 0.905 to 0.988, and Spearman rho is 0.991.

Kendall tau-b (τ_b): 0.966 · Effect size label: strong (|τ_b| = 0.966) · Kendall tau-a (τ_a): 0.933

Negative but non-significant agreement

Of the 45 pairs, 13 are concordant and 32 are discordant: S = -19 and τ_b = -0.422 (τ_a is identical because there are no ties). Since z = -1.699 stays below the critical value of 1.960, p = 0.089 and the relationship is not statistically significant; the 95% confidence interval runs from -0.753 to 0.078 and contains zero.

Kendall tau-b (τ_b): -0.422 · Effect size label: strong (|τ_b| = 0.422) · Kendall tau-a (τ_a): -0.422

Likert-type data (heavily tied)

Of the 66 pairs, 48 are concordant, 1 is discordant, and 17 are tied. With the tie correction τ_b = 0.832, while the uncorrected τ_a stops at 0.712 — the gap is the effect of the dense ties. With z = 3.394 and p < 0.001 the agreement is significant; Spearman rho = 0.909 gives a larger value.

Kendall tau-b (τ_b): 0.832 · Effect size label: strong (|τ_b| = 0.832) · Kendall tau-a (τ_a): 0.712

Frequently Asked Questions

What is the difference between Kendall tau and Spearman rho?
Both are rank-based nonparametric correlation measures, but they count different things: Spearman is built on the squared differences of ranks, while Kendall is built on the proportion of concordant and discordant pairs. On the same data tau usually comes out numerically smaller than rho (roughly τ ≈ ⅔ρ); this is a difference of scale, not an inconsistency. Tau has a direct probability interpretation and is more stable in small samples.
What is the difference between tau-a, tau-b, and tau-c?
Tau-a applies no tie correction and can never reach ±1 when ties are present. Tau-b corrects for ties by removing tied pairs from the denominator and can reach ±1 in square contingency tables; it is the most widely used version and the one this calculator reports. Tau-c was developed for rectangular tables where the number of rows and columns differ. For continuous or finely scaled ordinal data, tau-b is the right choice.
What do concordant and discordant pairs mean?
In a pair of two observations, if the X difference and the Y difference have the same sign the pair is concordant: whichever observation is larger on X is also larger on Y. If the signs are opposite the pair is discordant. If either difference is zero (a tie), the pair is neither concordant nor discordant, and tau-b removes such pairs from the denominator. τ = +1 means every pair is concordant and τ = −1 means every pair is discordant.
When should Kendall tau be preferred over Spearman?
Tau-b is preferred when the sample is small, when the data contain many ties, or when a few extreme observations distort the ranks; the sampling distribution of tau approaches normality faster and the estimate is less volatile. Tau is also the natural choice for analyses that need partial tau or generalized measures of agreement. In large samples the two coefficients lead to the same decision.
How is the p-value computed — exactly or approximately?
This calculator produces p from the normal approximation (a z test) using the tie-corrected variance of the S statistic, the same method as the Nonparametric Correlations output in SPSS. When n is small (roughly n < 10) and there are no ties, the exact Kendall distribution is more accurate; R's cor.test(x, y, method="kendall") returns the exact p in that case. The calculator shows a warning when n < 10.
How large does tau have to be to count as strong?
Tau should not be read on the same scale as rho or r. By the commonly used thresholds, |τ| < 0.07 is negligible, 0.07 to 0.21 is weak, 0.21 to 0.35 is moderate, and above 0.35 indicates a strong relationship. On the same data a Pearson r of 0.50 can correspond to a tau of about 0.35, so when comparing results in the literature you must check which coefficient is being reported.
Does Kendall tau capture non-linear relationships?
Yes, as long as the relationship is monotonic: tau comes out high even for an exponential, logarithmic, or step-wise increasing relationship, because it looks only at the ranks. For non-monotonic relationships such as a U shape, however, tau comes out near zero and misses a strong association. That is why you should examine the scatter plot before interpreting the coefficient.