r
Statistical Tools
Correlation Coefficient Calculator
Live calculator, charts, and worked steps

Kendall Tau Correlation Calculator

Use this Kendall Tau correlation calculator to measure monotonic association by comparing concordant and discordant pairs. Enter raw data, upload a spreadsheet, or paste ordinal ratings to instantly calculate Kendall τ, pair counts, z-statistic, p-value, confidence intervals, and a full step-by-step pair comparison that is especially useful for small samples and tie-heavy datasets.

Handles τ-a and τ-b automaticallyShows concordant and discordant pair countsStep-by-step pair comparisonFree forever and no sign-up
Live update window
300ms
Manual row limit
500
Output package
r, p, CI
Active method
Pearson r

Best for continuous variables with a linear relationship.

r=i=1n(xixˉ)(yiyˉ)i=1n(xixˉ)2i=1n(yiyˉ)2r = \frac{\sum_{i=1}^{n}(x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum_{i=1}^{n}(x_i - \bar{x})^2 \cdot \sum_{i=1}^{n}(y_i - \bar{y})^2}}
Data input
Enter or import paired values
8 valid pairs
Row
X Variable
Y Variable
1
2
3
4
5
6
7
8
Drag and drop a CSV or Excel file
Column headers are detected automatically so you can choose which variables become X and Y.
Example datasets
Interactive Scatter Plot
2.04.06.08.050.055.060.065.070.075.080.085.090.0X VariableY Variable
Correlation Meter
-1.00.0+1.00.9991
Strength badgeVery strong
Data health check
Sample sizeGood
8 valid pairs gives a stable first-pass estimate.
Distribution shapeGood
Neither variable shows strong skewness from a quick sample-skewness check.
Linearity checkInfo
Pearson and Spearman are close, which supports a mostly linear trend.
Residual Plot
X VariableResidual
r
0.9991
0.9981
p-value
2.13e-9
t
56.1931
df
6
95% CI
0.995 to 1.000
99% CI
0.991 to 1.000
Automatic interpretation
This dataset shows a very strong positive linear relationship. It is statistically significant at the 0.05 level.

Pearson r = 0.9991 based on 8 valid pairs, p = 0.0000.

Your result
r = 0.9991Very strong
-1-0.500.51
Statistically significant at p < 0.05
r² = 0.9981 so X explains 99.81% of Y variance.
Sample size n=8 is small, so treat the confidence interval with caution.
Step-by-step
How the calculator got this result
Step 1: Compute the means

Average the X values and the Y values before measuring joint movement.

x̄ = (1.0000 + 2.0000 + 3.0000 + 4.0000 + 5.0000 + 6.0000 + 7.0000 + 8.0000) / 8 = 36.0000 / 8 = 4.5000
ȳ = (52.0000 + 57.0000 + 62.0000 + 67.0000 + 72.0000 + 77.0000 + 83.0000 + 86.0000) / 8 = 556.0000 / 8 = 69.5000
Step 2: Measure paired deviations

Subtract the mean from every X and Y value to get centered deviations.

#1: dx = 1.0000 - 4.5000 = -3.5000, dy = 52.0000 - 69.5000 = -17.5000
#2: dx = 2.0000 - 4.5000 = -2.5000, dy = 57.0000 - 69.5000 = -12.5000
#3: dx = 3.0000 - 4.5000 = -1.5000, dy = 62.0000 - 69.5000 = -7.5000
#4: dx = 4.0000 - 4.5000 = -0.5000, dy = 67.0000 - 69.5000 = -2.5000
#5: dx = 5.0000 - 4.5000 = 0.5000, dy = 72.0000 - 69.5000 = 2.5000
#6: dx = 6.0000 - 4.5000 = 1.5000, dy = 77.0000 - 69.5000 = 7.5000
#7: dx = 7.0000 - 4.5000 = 2.5000, dy = 83.0000 - 69.5000 = 13.5000
#8: dx = 8.0000 - 4.5000 = 3.5000, dy = 86.0000 - 69.5000 = 16.5000
Step 3: Sum the covariance numerator

Multiply each pair of deviations and add them up.

#1: (-3.5000) × (-17.5000) = 61.2500
#2: (-2.5000) × (-12.5000) = 31.2500
#3: (-1.5000) × (-7.5000) = 11.2500
#4: (-0.5000) × (-2.5000) = 1.2500
#5: (0.5000) × (2.5000) = 1.2500
#6: (1.5000) × (7.5000) = 11.2500
#7: (2.5000) × (13.5000) = 33.7500
#8: (3.5000) × (16.5000) = 57.7500
Σ(xᵢ - x̄)(yᵢ - ȳ) = 209.0000
Step 4: Sum the squared deviations

Compute the denominator from the independent spread of X and Y.

#1: dx² = 12.2500, dy² = 306.2500
#2: dx² = 6.2500, dy² = 156.2500
#3: dx² = 2.2500, dy² = 56.2500
#4: dx² = 0.2500, dy² = 6.2500
#5: dx² = 0.2500, dy² = 6.2500
#6: dx² = 2.2500, dy² = 56.2500
#7: dx² = 6.2500, dy² = 182.2500
#8: dx² = 12.2500, dy² = 272.2500
Σ(xᵢ - x̄)² = 42.0000
Σ(yᵢ - ȳ)² = 1042.0000
Step 5: Divide numerator by denominator

The covariance term is normalized by both standard-deviation components.

r = 209.0000 / √(42.0000 × 1042.0000)
r = 0.9991

How to Use This Calculator

Step 1

Enter paired observations manually, paste two columns from Excel, or upload a CSV or Excel file.

Step 2

Choose Kendall Tau when your variables are ordinal, your sample is small, or tied values are common.

Step 3

Read τ, τ², z, p-value, confidence intervals, and the dedicated pair analysis card with concordant and discordant counts.

Step 4

Expand the step-by-step section to inspect every pair comparison and the exact τ-a versus τ-b logic used.

What Is the Kendall Tau Correlation Coefficient?

Kendall tau, also called the Kendall rank correlation, is a non-parametric measure of monotonic association based on pair ordering rather than raw numerical distance. Maurice Kendall introduced the statistic in 1938 to answer a practical question: when you compare two observations at a time, how often do the two variables agree about which observation ranks higher? The coefficient is written as τ\tau, and it ranges from -1 to +1. Positive values indicate that concordant pairs outnumber discordant pairs, negative values indicate the reverse, and values near zero indicate little systematic agreement in ordering.

The unique strength of Kendall tau is that it stays close to the real ordering question analysts often care about. A pair is concordant when both variables move in the same direction across two observations. A pair is discordant when the order flips. Because the method is built on pair comparisons, Kendall rank correlation is especially appealing for small samples, ordinal ratings, and datasets with many ties. It does not require normality and is less influenced by outliers than Pearson correlation.

Kendall tau also has an unusually intuitive interpretation. If τ=0.6\tau = 0.6, then P(concordant)=(1+τ)/2=0.8P(\text{concordant}) = (1 + \tau)/2 = 0.8. In plain language, a randomly chosen pair of observations has an 80% chance of being in the same order across both variables. That direct probability interpretation is one of the reasons Kendall Tau is preferred in fields such as survey analysis, preference ranking, medicine, and any domain where tied or small-sample ordinal data appears frequently.

Kendall Tau Formula (τ-a, τ-b, τ-c)

τa=CD12n(n1)\tau_a = \frac{C - D}{\frac{1}{2}n(n-1)}
τb=CD(C+D+Tx)(C+D+Ty)\tau_b = \frac{C - D}{\sqrt{(C + D + T_x)(C + D + T_y)}}
τc=2(CD)n2m1m\tau_c = \frac{2(C - D)}{n^2 \cdot \frac{m-1}{m}}
z=3τn(n1)2(2n+5)z = \frac{3\tau\sqrt{n(n-1)}}{\sqrt{2(2n+5)}}
SymbolMeaning
CCNumber of concordant pairs
DDNumber of discordant pairs
TxT_xNumber of X-tied pairs
TyT_yNumber of Y-tied pairs
nnNumber of valid observations
mmThe smaller dimension in a rectangular contingency table for τ-c

τa\tau_a is the original no-ties formula. It simply compares the difference between concordant and discordant pairs against the total number of possible pairs. That works well in toy examples, but real data often contains tied values.

τb\tau_b is therefore the default on this page. It corrects the denominator for ties in X and Y separately, which is why it is the standard version used by major statistical packages and research workflows. τc\tau_c is included for completeness because it is useful in rectangular contingency tables, but it is less common for ordinary two-variable ranking data. The calculator computes the large-sample zz statistic shown above to estimate the two-tailed p-value.

How to Calculate Kendall Tau Step by Step

Step 1

List all possible observation pairs. With n observations, Kendall compares n(n - 1)/2 pairs.

Step 2

For each pair, decide whether the order is concordant, discordant, tied in X, or tied in Y.

Step 3

Count C, D, T_x, and T_y from those pair classifications.

Step 4

Apply τ-b when ties are present. If there are no ties, τ-a and τ-b are identical.

Step 5

Convert τ to a z-statistic, estimate the p-value, and review the pair analysis card before drawing a conclusion.

The worked panel above follows the exact same workflow with your own dataset. It lists the pair comparisons, shows the counts of concordant and discordant pairs, reveals when ties force a switch from τa\tau_a to τb\tau_b, and then computes the final significance test.

Concordant and Discordant Pairs Explained

Kendall Tau is built on pair classification. Take two observations (xi,yi)(x_i, y_i) and (xj,yj)(x_j, y_j). They are concordant when both variables agree on the order: either xi>xjx_i > x_j and yi>yjy_i > y_j, or xi<xjx_i < x_j and yi<yjy_i < y_j. They are discordant when one variable says observation i is larger while the other says observation j is larger. If xi=xjx_i = x_j or yi=yjy_i = y_j, the pair is tied rather than concordant or discordant.

This pair logic is why Kendall Tau feels so intuitive. Instead of summarizing raw distances, it asks a ranking question repeatedly and counts the outcomes. With nn observations there are n(n1)/2n(n-1)/2 distinct pairs to compare. The coefficient rises when concordant pairs dominate and falls when discordant pairs dominate. That makes Kendall Tau a natural fit for small ordered datasets such as judge rankings, Likert scales, and preference lists where pair order matters more than numeric spacing.

Concordant vs Discordant Pairs Example
Data: (1,2), (3,4), (2,1)
Pair (1,2) vs (3,4): 1 < 3 and 2 < 4 → Concordant
Pair (1,2) vs (2,1): 1 < 2 but 2 > 1 → Discordant
Pair (3,4) vs (2,1): 3 > 2 and 4 > 1 → Concordant
C = 2, D = 1, τ-a = (2 - 1) / 3 = 0.3333

How to Interpret Kendall Tau Results

Start with the sign and the magnitude, just as you would with Pearson or Spearman. Then use Kendall Tau's biggest advantage: the probability interpretation. Because P(concordant)=(1+τ)/2P(\text{concordant}) = (1 + \tau)/2, you can convert the coefficient into an intuitive estimate of how often two randomly selected observations keep the same order across both variables. Pair counts, ties, and the p-value then add the remaining context.

P(concordant)=1+τ2P(\text{concordant}) = \frac{1 + \tau}{2}
0.90 to 1.00
Very Strong Positive
95%+ concordant pairs
0.70 to 0.89
Strong Positive
85% to 95% concordant pairs
0.50 to 0.69
Moderate Positive
75% to 85% concordant pairs
0.30 to 0.49
Weak Positive
65% to 75% concordant pairs
-0.29 to 0.29
Negligible
Near 50%, close to random order
-0.49 to -0.30
Weak Negative
25% to 35% concordant pairs
-0.69 to -0.50
Moderate Negative
15% to 25% concordant pairs
-0.89 to -0.70
Strong Negative
5% to 15% concordant pairs
-1.00 to -0.90
Very Strong Negative
Less than 5% concordant pairs

How Kendall Tau Handles Tied Ranks

Ties are a direct reason to prefer Kendall Tau over simpler rank measures. In the no-ties version, τa\tau_a uses the full pair count in the denominator. Once ties appear, that denominator becomes too large relative to the number of comparable pairs, which pushes the coefficient downward and underestimates the true ordered agreement.

τb\tau_b fixes that by correcting the denominator with tie counts in X and Y. If a value appears kk times in one variable, it contributes k(k1)/2k(k-1)/2 tie pairs. This calculator detects those ties automatically, reports TxT_x and TyT_y in the pair analysis card, and switches from τa\tau_a to τb\tau_b whenever the correction is needed.

Tie Correction Example
X = [1, 1, 2, 3] → tie in X: 1 pair (T_x = 1)
Y = [2, 3, 4, 4] → tie in Y: 1 pair (T_y = 1)
τ-a would underestimate the ordered agreement
τ-b corrects the denominator with T_x and T_y

This is why τ-b is the default result returned by the calculator whenever ties are found.

Kendall Tau vs Spearman vs Pearson

Kendall Tau is the most pair-focused and the most tie-aware of the common correlation measures. Compared with Spearman correlation, it is often preferred in small samples and with many tied ranks. Compared with Pearson correlation, it makes no normality assumption and does not require a straight-line relationship. The tradeoff is that Kendall Tau is computationally heavier because it compares observation pairs directly.

Kendall τ-bSpearman ρPearson r
Data typeOrdinal or continuousOrdinal or continuousContinuous
Distribution requirementNo distribution assumptionNo distribution assumptionApproximately normal for formal inference
Small samples (n < 20)Best choiceUsableOften not preferred
Tie handlingτ-b tie correctionAverage tied ranksNot applicable
Probability interpretationDirect and intuitiveIndirectUsually via r²
Outlier robustnessStrongestStrongWeakest
ComputationO(n²)O(n log n)O(n)
Common defaultsSPSS, R, Python support τ-bWidely availableMost common overall
LinkCurrent page/spearman-correlation//pearson-correlation/

Real-World Examples

Small Sample Preference Order

A compact ranking dataset intended for Kendall Tau interpretation.

This dataset is useful when rank order matters more than distance and ties are likely to appear in the observations.

Survey Likert Scale Ratings

Two 1 to 5 survey scales with many ties, ideal for Kendall Tau-b.

This dataset is useful when rank order matters more than distance and ties are likely to appear in the observations.

Frequently Asked Questions

What is Kendall Tau correlation?

Kendall Tau (τ) is a non-parametric measure of rank correlation that quantifies the ordinal association between two variables. It counts concordant pairs, where both variables move in the same order, minus discordant pairs, where the order reverses, and then normalizes that difference. Developed by Maurice Kendall in 1938, it is especially reliable for small samples and datasets with many tied ranks.

What is the difference between Kendall Tau-a and Tau-b?

Kendall τ-a uses the simple formula (C - D) divided by n(n - 1)/2 and assumes there are no ties. Kendall τ-b modifies the denominator to account for ties in X and Y separately, which makes it the standard choice for real-world data. τ-c is designed for rectangular contingency tables. This calculator defaults to τ-b whenever ties are present.

How do you interpret Kendall Tau?

Kendall Tau ranges from -1 to +1. One of its main advantages is the probability interpretation: P(concordant) = (1 + τ) / 2. So if τ = 0.6, then a randomly chosen pair of observations has an 80% chance of being concordant. As a rough guide, absolute values below 0.3 are weak, 0.3 to 0.7 are moderate, and above 0.7 are strong.

When should I use Kendall Tau instead of Spearman?

Prefer Kendall Tau when your sample is small, when your data has many tied values, when you want a direct probability interpretation, or when you need the most robust measure of monotonic association. Spearman is more commonly reported and faster to compute, but Kendall Tau is often statistically more efficient for small samples.

How do you calculate Kendall Tau by hand?

First list all n(n - 1)/2 possible pairs of observations. Next classify each pair as concordant, discordant, tied in X, or tied in Y. Then count C, D, T_x, and T_y. Finally apply τ-b = (C - D) / √((C + D + T_x)(C + D + T_y)). This calculator shows every pair comparison in the step-by-step section.

What is a concordant pair in Kendall Tau?

A concordant pair occurs when two observations keep the same relative order in both variables. If x_i is larger than x_j and y_i is also larger than y_j, or if both are smaller, the pair is concordant. In intuitive terms, both variables agree on which observation ranks higher.

What sample size is needed for Kendall Tau?

Kendall Tau is one of the best choices for small samples. It can still be informative with about 8 observations, and the normal-approximation z test is often used from around 10 observations upward. For very tiny samples, exact permutation p-values are better than the large-sample approximation.

Is Kendall Tau the same as Kendall's W?

No. Kendall Tau measures association between two variables, while Kendall's W measures agreement among three or more raters or rankings. They come from the same family of rank-based statistics, but they answer different questions.