Gini Coefficient Calculator (Income Inequality)
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:
- 0 means perfect equality (everyone has the same income).
- (n − 1)/n occurs when one person or household has all positive income and the other entries are zero; this is close to 1 for a large dataset.
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:
- Parses your entries into numeric values.
- Ignores invalid entries and negative incomes, while retaining non-negative values.
- Sorts incomes from smallest to largest.
- 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 x1 ≤ x2 ≤ … ≤ 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:
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:
- 0.20–0.30: lower inequality
- 0.30–0.40: moderate inequality
- 0.40–0.50: higher inequality
- > 0.50: very high inequality
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:
- Non-negative inputs: This calculator is designed for non-negative incomes. If your dataset can contain negative values (losses), consider preprocessing or using a method explicitly defined for negatives; otherwise results can be misleading.
- Zeros are allowed: Zero-income entries are valid and typically increase measured inequality when mixed with positive incomes.
- No weights: Each entry is treated equally (unweighted). If you have survey weights or household sizes, a weighted Gini is more appropriate; this tool does not implement weights.
- Currency/units don’t matter: Gini is scale-invariant. Dollars vs. euros doesn’t change the result as long as all entries share the same unit.
- Sample size effects: Very small lists can produce unstable or non-representative values. Use enough observations to reflect the population you’re describing.
- Outliers matter: Extremely large incomes can substantially raise the Gini. Consider whether your data need trimming/winsorization, and report your method if you do so.
- Definition matters: “Income” could mean individual, household, pre-tax, post-tax, annualized, etc. Comparisons are only meaningful when definitions match.
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.
- Use one person/household per entry (don’t paste totals plus subtotals together).
- Be consistent about the period (monthly vs annual) within the same calculation.
- If you’re comparing two groups, compute both with the same preprocessing rules (handling of missing, zeros, negatives, and outliers).
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.
Start the game, then use your pointer or arrow keys to catch valid income inputs and avoid unsuitable entries.
