Gini Coefficient Calculator (Income Inequality)
What the Gini coefficient measures
The Gini coefficient is a widely used summary statistic for inequality. It compresses an entire income (or wealth) distribution into a single number between 0 and 1:
- 0 means perfect equality (everyone has the same income).
- 1 means maximal inequality (one person/household has all income and everyone else has zero).
It’s used in economics, sociology, public policy, and data journalism because it allows comparisons across places and time. That said, it is still a summary: different distributions can share the same Gini value, and the number is sensitive to how data are defined and cleaned (see limitations).
How to use: Introduction: How this calculator works (step by step)
This calculator expects a list of incomes (for individuals or households) separated by commas and/or new lines. When you click Calculate, it:
- Parses your entries into numeric values.
- Optionally filters invalid entries and (by default) rejects negative incomes (configurable guidance below).
- Sorts incomes from smallest to largest.
- Computes the Gini coefficient using a standard discrete formula for an unweighted sample.
The Lorenz curve connection (intuition)
The Gini coefficient 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 (unweighted sample)
Let the incomes be sorted so that x1 ≤ x2 ≤ … ≤ xn, with n total observations and total income S = ∑i=1n xi. A common discrete form of the Gini coefficient is:
This is mathematically equivalent to other standard Gini formulas (including those based on pairwise absolute differences), but it’s efficient to compute once the values are sorted.
Interpreting your result
A single Gini value is easiest to interpret comparatively: compare regions, years, or groups using the same definition of income and 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
Suppose five households have annual incomes:
10, 20, 30, 40, 100
These values are already sorted. Here, one household (100) is much richer than the others, so the Lorenz curve bows noticeably below the equality line. The calculator will return a Gini coefficient around the mid-0.3s (exact value depends on rounding). If you changed the last income from 100 to 40:
10, 20, 30, 40, 40
the distribution becomes more even, and the Gini coefficient decreases.
Comparison table (how changes affect Gini)
The table below illustrates how different income patterns typically move the Gini coefficient. (Values shown are qualitative—use the calculator for exact numbers.)
| 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 (important)
- 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 better results
- 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 Calculator (Income Inequality) Calibration Run
Use this quick arcade run to practice separating useful scenario inputs from common planning mistakes before you rely on the calculator output.
Start the game, then use your pointer or arrow keys to catch useful inputs and avoid bad assumptions.
