Gini Coefficient Calculator (Income Inequality)

JJ Ben-Joseph headshot JJ Ben-Joseph

What the Gini coefficient measures

The Gini coefficient summarizes inequality across an income (or wealth) distribution in one number. For the finite, unweighted income list used by this calculator, it runs from 0 to (n − 1)/n, where n is the number of observations; the upper bound approaches 1 as the list grows:

The income Gini is used in economics, sociology, public policy, and data journalism to compare distributions across places or periods. It remains a summary: different income patterns can produce the same Gini value, and the result depends on how the observations are defined and cleaned (see limitations).

Entering income observations for this Gini calculation

This Gini coefficient calculator accepts incomes for individuals or households separated by commas and/or new lines. When you click Calculate, it:

  1. Parses your entries into numeric values.
  2. Ignores invalid entries and negative incomes, while retaining non-negative values.
  3. Sorts incomes from smallest to largest.
  4. Computes the Gini coefficient using a standard discrete formula for an unweighted sample.

The Lorenz curve connection for income inequality

The Gini coefficient for an income list is closely tied to the Lorenz curve, which plots the cumulative share of income earned by the bottom share of the population after sorting from poorest to richest. If everyone earned the same, the Lorenz curve would follow the 45° line of equality. Real distributions typically bow below that line. The Gini coefficient is proportional to the area between the line of equality and the Lorenz curve—more bowing implies higher inequality.

Formula used for the unweighted income Gini

For the income values sorted so that x1x2 ≤ … ≤ xn, let n be the number of observations and let total income be S = ∑i=1n xi. This calculator uses the following discrete Gini formula:

G = 2 n·S i=1 n i·xi n+1 n

This income-sorting formula is mathematically equivalent to standard Gini forms based on pairwise absolute income differences, while avoiding a comparison of every pair once the values have been sorted. Because every accepted entry has equal weight here, repeating an income deliberately changes the population represented by the calculation and can change the coefficient.

Interpreting your income Gini result

A Gini result is most useful when you compare income distributions that use the same definition of income and the same sampling approach. Very rough interpretive bands sometimes used for income distributions are:

These ranges are context-dependent. A country’s “market income” Gini (before taxes/transfers) is typically higher than its “disposable income” Gini (after taxes/transfers). Wealth inequality also tends to produce higher Gini values than income inequality.

Worked example: calculating the Gini coefficient from five household incomes

For five households with annual incomes:

10, 20, 30, 40, 100

the values are already sorted. Their total income is 200, and the calculator’s weighted sum is 800, producing a Gini coefficient of 0.4000. The income of 100 gives the top household a much larger share than the other four, so the Lorenz curve bows below the equality line. If the last income changes from 100 to 40:

10, 20, 30, 40, 40

the distribution is more even, and the calculated Gini coefficient falls. This illustrates that bringing a high outlying income closer to the other observations reduces measured inequality in this unweighted list.

Comparison table for changes in an income Gini

The income patterns below show the direction in which the Gini coefficient typically moves. Use the calculator when you need the exact value for a particular list.

Income list (example) Distribution shape Expected Gini Why
50, 50, 50, 50 Perfectly equal 0.00 Everyone earns the same amount
10, 20, 30, 40 Gradual increase Low–moderate No extreme outliers
10, 20, 30, 40, 100 One high outlier Moderate–high Top income pulls share upward
0, 0, 0, 100 Extreme concentration Very high Most people have zero; one has all income

Assumptions and limitations of this income Gini calculation

This calculator reports an unweighted Gini coefficient for the valid, non-negative income entries you provide. Review the following choices before treating the result as a description of a broader population:

Practical tips for reliable income Gini results

To make an income Gini comparison meaningful, prepare every list using the same observation unit and the same treatment of missing or unusual values.

Gini coefficient inputs
Paste a list like: 10, 20, 30, 40 or one value per line. Non-negative numbers only. Zeros are allowed.

Arcade Mini-Game: Gini Coefficient Income-List Calibration Run

Use this quick arcade run to distinguish valid income-list entries from inputs that do not belong in an unweighted Gini calculation.

Score: 0 Timer: 30s Best: 0

Start the game, then use your pointer or arrow keys to catch valid income inputs and avoid unsuitable entries.

Enter incomes to estimate the Gini coefficient.