Kendall's Tau Rank Correlation Calculator

JJ Ben-Joseph headshot JJ Ben-Joseph

What is Kendall’s tau?

Kendall’s tau is a nonparametric rank correlation coefficient that measures the strength and direction of the association between two variables based on the ordering of their values, not on the raw magnitudes. It is especially useful when your variables are ordinal (ranked), when the relationship may be monotonic but not linear, or when outliers and non-normal distributions make Pearson’s correlation less appropriate.

Suppose you have n paired observations (xi,yi) for i=1,,n. Kendall’s approach compares all distinct pairs of observations and checks whether the ordering of x agrees with the ordering of y. This pairwise comparison makes the statistic robust to outliers and suitable for data where only the order (rank) is meaningful.

Concordant, discordant, and tied pairs

Kendall’s tau is built from three types of pairwise relationships:

  • Concordant pairs (C): Two observations (xi,yi) and (xj,yj) are concordant if the ordering of x matches the ordering of y. Formally, this means (xixj)(yiyj)>0, so either xi>xj and yi>yj, or \(x_i
  • Discordant pairs (D): The same pair is discordant if the orderings disagree: \[(x_i - x_j)(y_i - y_j)
  • Tied pairs:
    • Ties in X only (Tx): xxi=xj but yiyj.
    • Ties in Y only (Ty): yi=yj but xixj.
    • Ties in both X and Y: xxi=xj and yi=yj. These are usually omitted from both concordant and discordant counts.

The calculator examines every unique pair of observations, classifies it as concordant, discordant, or tied, and then uses these counts to compute Kendall’s tau-b.

Kendall’s tau-b formula

This calculator uses the tau-b variant, which adjusts for ties in both variables. A common form of the tau-b formula is:

τ = C D ( C + D + Tx ) ( C + D + Ty )

where:

  • C = number of concordant pairs
  • D = number of discordant pairs
  • Tx = number of tied pairs in X only
  • Ty = number of tied pairs in Y only

The resulting value always lies between −1 and 1:

  • τ=1: perfect agreement in ranks (all usable pairs are concordant).
  • τ=-1: perfect disagreement (all usable pairs are discordant).
  • τ=0: no overall monotonic association in the sample.

Tau-a, tau-b, and tau-c

Several related Kendall coefficients exist:

  • Tau-a: assumes no ties in either variable and uses only C and D. It is mainly of theoretical interest because most real data contain ties.
  • Tau-b: corrects for ties in both variables using the denominator shown above. It is the most common version for continuous or ordinal data with possible ties and is what this calculator reports.
  • Tau-c: also called Stuart–Kendall tau-c, often used for rectangular contingency tables with many ties and a limited number of categories.

In practice, if you have numeric or ordinal data with any tied values, tau-b is usually the recommended choice, which is why it is implemented here.

How to interpret Kendall’s tau

Kendall’s tau measures the strength and direction of a monotonic association. Positive values indicate that larger values of X tend to be associated with larger values of Y, while negative values indicate that larger X tends to come with smaller Y.

There are no universal cutoffs, but a rough, informal guide often used in practice is:

  • |τ| < 0.1: very weak or negligible association
  • 0.1 ≤ |τ| < 0.3: weak association
  • 0.3 ≤ |τ| < 0.5: moderate association
  • |τ| ≥ 0.5: strong association

These ranges are only rules of thumb. The context, sample size, and measurement quality all matter for interpretation.

Worked example with the sample data

Consider the example data mentioned near the form:

  • X series: 12, 15, 20, 21, 30
  • Y series: 10, 20, 25, 18, 35

We have n=5 paired observations. There are n(n1)2=10 distinct pairs to compare. We will classify a few of them to illustrate the idea (the calculator checks all pairs automatically).

  1. Pair 1 vs 2: (12, 10) and (15, 20). Here, 15 > 12 and 20 > 10, so both X and Y increase together. The product (1512)(2010)>0, so this pair is concordant.
  2. Pair 1 vs 3: (12, 10) and (20, 25). Again, 20 > 12 and 25 > 10, so the pair is concordant.
  3. Pair 2 vs 4: (15, 20) and (21, 18). Now, 21 > 15 but 18 < 20, so X increases while Y decreases. The product is negative, and this pair is discordant.
  4. Pair 3 vs 4: (20, 25) and (21, 18). Here, 21 > 20 but 18 < 25, so this is also discordant.

Repeating this classification for all 10 pairs yields total counts C and D. If none of the X values tie with each other and none of the Y values tie with each other in this small sample, then Tx = 0 and Ty = 0. The calculator uses all such pairwise comparisons to compute a specific tau-b value, which will lie between −1 and 1 and will appear in the results under the form.

How to use this calculator

The basic workflow for using the Kendall’s tau-b rank correlation calculator is:

  1. Prepare two lists of equal length containing your X and Y values. These can be ranks, scores, measurements, or any numeric encodings of ordinal categories.
  2. Enter or paste the first list into the field for the first data series and the second list into the field for the second data series. Separate values with commas or line breaks, and ensure there are no extra non-numeric characters.
  3. Run the calculation using the button below the form.
  4. Review the output: the calculator reports Kendall’s tau-b along with the numbers of concordant and discordant pairs and the counts of ties in each series.

If the two series have different lengths, contain invalid numbers, or are otherwise malformed, the computation cannot proceed and you should fix the inputs first. In valid cases, a positive tau-b suggests that higher X values tend to go with higher Y values, while a negative tau-b suggests an inverse tendency.

Comparison with other correlation measures

The table below summarizes how Kendall’s tau-b compares with two widely used alternatives: Pearson’s correlation and Spearman’s rank correlation.

Measure Type of data What it uses Strengths Limitations
Kendall’s tau-b Ordinal or continuous, with possible ties Counts of concordant/discordant pairs and ties Robust to outliers; intuitive interpretation as a probability of concordance; good for small samples and ordinal data More computationally intensive for large n; less familiar to some audiences than Pearson’s r
Spearman’s rho Ordinal or continuous (ranked) Pearson correlation of rank-transformed data Simple to compute; widely supported; handles monotonic but non-linear relationships better than Pearson Less directly interpretable in terms of concordant/discordant probabilities; still somewhat sensitive to extreme ranks
Pearson’s r Continuous, approximately interval-scale Raw numeric values Standard for linear relationships; strong theoretical basis and familiar interpretation in many fields Assumes linearity and sensitivity to outliers; not ideal for purely ordinal data or heavily skewed distributions

Assumptions, limitations, and appropriate use

When using Kendall’s tau-b and this calculator, keep the following assumptions and limitations in mind:

  • Paired observations: Each X value must belong to exactly one Y value. The method is not designed for unpaired or aggregated data.
  • Ordinal or higher measurement scale: X and Y should at least be ordinal (ranked). Using nominal categories that have no inherent order can produce misleading or uninterpretable results.
  • Independence of pairs: Each pair (xi,yi) should represent an independent observational unit. Strong dependence between pairs (for example, repeated measures on the same subject without adjustment) can distort the interpretation.
  • Handling of ties: This tool uses tau-b, which adjusts for ties in both variables. However, extremely large numbers of ties (for instance, data recorded on a very coarse scale) can still make the effective information content small and reduce the maximum attainable |τ|.
  • Sample size: Very small samples (e.g., fewer than 10 observations) can yield unstable estimates of τ. The value may change considerably if a few observations are added or removed. Consider this when drawing substantive conclusions.
  • No built-in significance testing (unless explicitly stated elsewhere): The basic calculator described here focuses on the point estimate of tau-b and pair counts. Formal hypothesis tests (p-values, confidence intervals) are not computed unless a separate feature is provided. For inferential decisions, you may need additional statistical software.
  • Missing or invalid values: The calculator expects clean numeric input. Missing values, non-numeric symbols, or mismatched list lengths must be corrected or removed before running the analysis.

Because of these limitations, Kendall’s tau-b is best viewed as a descriptive measure of rank association. It can guide your understanding of how two variables move together but should not be the sole basis for critical decisions without further analysis.

Summary

Kendall’s tau-b rank correlation provides a robust, rank-based measure of how strongly two variables are related in a monotonic sense. By counting concordant and discordant pairs and adjusting for ties, it offers an interpretable coefficient bounded between −1 and 1. This calculator automates the pairwise comparisons and presents not only the tau-b value but also the underlying pair counts, helping you see how the statistic is constructed.

Use tau-b when your data are ordinal or when you are concerned about outliers and non-normality. Combine it with subject-matter knowledge, sample-size considerations, and, where appropriate, additional statistical tools to form a complete picture of the relationship between your variables.

Enter paired values and compute.

Separate numbers with commas or spaces. Both series must be the same length, such as 12 15 20 21 30.

Embed this calculator

Copy and paste the HTML below to add the Kendall's Tau Rank Correlation Calculator to your website.