Theil Index Calculator

Statistics

Theil T0.1927
Theil L (mean log deviation)0.2231
Maximum possible Theil T0.6931
Share of maximum27.8 %
How this was calculated
  1. Two-group Theil T: the top group holds 80 % of income with 50 % of the people.
  2. T = s ln(s/p) + (1-s) ln((1-s)/(1-p)) = 0.80 x ln(1.60) + 0.20 x ln(0.400) = 0.1927.
  3. Theil L runs the same comparison from the population side: 0.2231.
  4. Theil result: T = 0.1927, which is 27.8 % of the 0.6931 maximum for this split.

Income inequality can be summarised in many ways, but few measures are built as directly on information theory as the Theil index. This theil index calculator takes the simplest useful version of the problem: a population divided into two groups, where you know what share of total income the first group holds and what share of the people it contains. From those two shares it reports Theil T, the companion measure Theil L, the maximum value T could reach for that population split, and how far the actual result sits below that ceiling.

The contrast between the two shares is the whole story. When a group's income share matches its population share, there is nothing for the index to detect and the result sits at the bottom of its range. When income is concentrated in a group that is small relative to its earnings, or spread so that a large group receives very little, the gap between the shares widens and the index rises. Because the calculation works with shares rather than currency amounts, the same calculator applies to a household survey, a region, a firm, or any setting where income can be divided between two groups.

Worked examples

80 percent of income, 50 percent of people

(80 % · 50 %)

Theil T0.1927
Theil L (mean log deviation)0.2231
Maximum possible Theil T0.6931
Share of maximum27.8 %

60 percent of income, 30 percent of people

(60 % · 30 %)

Theil T0.1920
Theil L (mean log deviation)0.1838
Maximum possible Theil T1.2040
Share of maximum16.0 %

95 percent of income, 60 percent of people

(95 % · 60 %)

Theil T0.3326
Theil L (mean log deviation)0.5561
Maximum possible Theil T0.9163
Share of maximum36.3 %

Entropy as an inequality measure

The Theil index borrows its mathematics from entropy, the measure of disorder or missing information used in information theory. Imagine picking a person at random and asking which group they belong to, then picking a unit of income at random and asking which group earned it. If income were distributed exactly in proportion to population, those two questions would have the same answer pattern, and there would be no surprise to record. The index grows as the income answer drifts away from the population answer.

Formally, with s as the income share of group 1 and p as its population share, Theil T weights each group's income share against its population share: T = s ln(s/p) + (1-s) ln((1-s)/(1-p)). Each group contributes a term built from the ratio of its income share to its population share, and the logarithm turns that ratio into a signed distance. A group earning exactly its population share contributes nothing, because the logarithm of a ratio of one is zero.

The weighting matters. In Theil T, each group's term is weighted by its income share, so the experience of the group holding most of the income dominates the result. That is why T is sometimes described as looking at inequality from the income side: it asks where the money sits relative to where the people sit, and it pays the most attention to the group that holds the money.

The calculator also reports the maximum possible Theil T for the population split you entered. That ceiling is set by the smaller side of the split, because inequality is bounded by how completely income could pile into the smaller group. Reporting the result as a share of its maximum makes comparisons fairer: the same T value means something different when the ceiling is low than when the ceiling is high, and the share-of-maximum figure puts the two situations on a common footing.

  • Enter the income share of group 1 as a percentage in the first field.
  • Enter the population share of group 1 as a percentage in the second field.
  • Read Theil T as the headline result, then compare Theil L and the share of maximum below it.
  • The two shares for group 1 imply the shares of the other group automatically, since each pair must add up to the whole.
Theil T is zero only when income share equals population share for the group you entered — perfect proportionality, not necessarily a judgement about fairness.

Worked examples: three splits

The three examples below use the calculator exactly as you would: two percentages in, the full set of results out. Read them together, because the comparison between them is more instructive than any single value. Two of the splits produce almost identical T values from quite different arrangements of income and people, which is a useful reminder that a single index compresses a distribution and cannot describe its shape on its own.

In the first split, the top group holds 80 % of income with 50 % of the people. The formula gives T = s ln(s/p) + (1-s) ln((1-s)/(1-p)) = 0.80 x ln(1.60) + 0.20 x ln(0.400) = 0.1927. Theil L runs the same comparison from the population side and gives 0.2231. The maximum possible Theil T for this split is 0.6931, so the result is 27.8 % of that ceiling.

In the second split, the top group holds 60 % of income with 30 % of the people, and the working is 0.60 x ln(2.00) + 0.40 x ln(0.571) = 0.1920. Theil L is 0.1838 here, the maximum possible Theil T is 1.2040, and the result is 16.0 % of the maximum. Notice that the headline T is nearly the same as in the first split even though the arrangement is different: a smaller group holding a smaller majority of income can register the same entropy gap as a larger group holding a larger one.

In the third split, the top group holds 95 % of income with 60 % of the people, and the working is 0.95 x ln(1.58) + 0.05 x ln(0.125) = 0.3326. Theil L rises much more sharply to 0.5561, the maximum possible Theil T is 0.9163, and the result is 36.3 % of the maximum. The widening gap between T and L in this split is itself informative, and the next section explains why the two measures can pull apart.

Income share of group 1Population share of group 1Theil TTheil L (mean log deviation)Maximum possible Theil TShare of maximum
80 %50 %0.19270.22310.693127.8 %
60 %30 %0.19200.18381.204016.0 %
95 %60 %0.33260.55610.916336.3 %

Theil T versus Theil L

Theil T and Theil L are built from the same two shares and the same logarithmic idea, but they weight the comparison differently, and that difference decides which part of the distribution each measure listens to. T weights by income share, so it is most sensitive to what happens among the group holding the income. L, the mean log deviation, weights by population share, so it is most sensitive to what happens among the group holding the people, especially when a large group is left with very little income.

The examples show both behaviours. In the first split the two measures are close: T is 0.1927 and L is 0.2231. In the second split they nearly coincide again, with T at 0.1920 and L at 0.1838, L now slightly the smaller of the pair. In the third split they diverge sharply: T is 0.3326 while L reaches 0.5561. The reason is the small group left holding very little income in that split. From the population side, a group that represents a substantial share of people but a tiny share of income creates a large logarithmic gap, and L registers that gap with full population weight.

Neither measure is the correct one in the abstract. Reporting both is the standard, honest practice, because together they bracket the inequality in the split: T tells you how concentrated income looks from the money's point of view, and L tells you how deprived the lower group looks from the people's point of view. When the two agree, the summary is robust. When they disagree, the disagreement points at where in the distribution the inequality lives.

A practical habit is to watch which measure moves more when you test a policy or a change in the shares. A transfer that mainly lifts the income share of a large, low-income group will move L strongly. A change concentrated among high earners will show up more in T. The calculator makes that experiment cheap: adjust either share and compare both outputs before and after.

Decomposability: Theil's party trick

The property that made the Theil index famous among inequality researchers is decomposability. Total inequality, measured this way, can be split exactly into a part that comes from differences between groups and a part that comes from differences within groups, with nothing left over. Many popular measures cannot do this cleanly; their between-group and within-group pieces overlap or leave a residual that has to be explained away. With Theil, the pieces add up exactly, which makes it the natural tool for asking how much of a country's inequality is regional, how much is urban against rural, and how much sits inside each region or sector.

This calculator works with the between-group piece for a two-group split, which is the building block of every larger decomposition. With more groups, the same formula extends term by term: each group contributes according to its income share and population share, and the within-group Theil values are then added with their own weights. Mastering the two-group case is therefore not a toy exercise. It is the unit from which full decompositions of national income distributions are assembled.

Decomposability also disciplines interpretation. Because the between-group component for two groups depends only on the two shares, two very different societies can share the same value if their group shares match, while differing greatly inside each group. The index is honest about what it sees: it sees the split you gave it. Any conclusion about overall inequality needs the within-group story as well, and a careful analyst reports the component for what it is rather than as a verdict on the whole distribution.

Used with that discipline, the Theil index is a precise and transparent instrument. It needs only shares, it exposes its own ceiling through the maximum value, it offers two complementary weightings in T and L, and it scales from this two-group calculation to full decompositions without changing its logic. Enter your split, read both measures, compare the result with its maximum, and you have a defensible summary of between-group inequality that another researcher can reproduce exactly.

Because Theil decomposes exactly, the two-group result here is a component of total inequality, not the total itself — within-group inequality still has to be added.

FAQs

What Theil T does an 80 / 50 split give?

An income share of 80 % held by a group with 50 % of the population gives a Theil T of 0.1927. The working is 0.80 x ln(1.60) + 0.20 x ln(0.400), and the result is 27.8 % of the maximum possible value for that split.

And Theil L for the same split?

For the same 80 % income share and 50 % population share, Theil L is 0.2231. L weights the comparison by population share rather than income share, so it reads the same split slightly higher than T in this case.

60 % of income with 30 % of people?

That split gives T 0.1920, L 0.1838. The maximum possible Theil T for a 30 % population share is 1.2040, so the result is 16.0 % of its ceiling — nearly the same T as the first example, reached through a different arrangement of income and people.

95 % of income with 60 % of people?

That split gives a Theil T of 0.3326, with Theil L much higher at 0.5561. The maximum possible Theil T is 0.9163 and the result is 36.3 % of it. L rises faster here because a large share of people is left holding a very small share of income.

What share of its maximum is the first example?

The first example, 80 % of income with 50 % of the people, reaches 27.8 % of the 0.6931 ceiling. The ceiling is the maximum possible Theil T for that population split, so the share-of-maximum figure shows how much of the available inequality the split actually realises.

When is Theil T zero?

Theil T is zero when income share equals population share — the 50 / 50 split gives 0.0000. Each group's income-to-population ratio is then one, the logarithm of one is zero, and every term in the formula vanishes.

Sources

Related calculators

Lognormal Distribution Calculator
Compute the CDF, PDF, mean and median of a lognormal distribution from its log-scale mu and sigma.
Pareto Distribution Calculator
Probabilities, density, mean and median for the Pareto power-law distribution used for incomes, city sizes and file sizes.
Standard Deviation Calculator
Mean, sample and population standard deviation and variance for up to eight numbers — with the n versus n−1 difference explained.