About the Gini Coefficient
The Gini Coefficient Calculator measures how unequally a set of values, such as household incomes, wealth, or market shares, is distributed across the entities that hold them. It condenses a list of raw values into a single number between 0 and 1 that summarizes concentration, the same statistic used internationally to compare income inequality across countries.
How It Works
Enter the values you want to assess, such as a list of household incomes, and the calculator sorts them from smallest to largest, then measures how the cumulative share of the total is distributed across that sorted list. Larger gaps between the smallest and largest values, relative to the total, push the resulting coefficient higher.
Formula & Methodology
To calculate by hand: sort the values from smallest to largest, multiply each value by its position in that sorted order (1st, 2nd, 3rd, and so on), add all those products together, then plug the count of values, their total sum, and the rank-weighted sum into the formula above.
Examples
Seven-household income sample
With incomes of 20000, 25000, 30000, 35000, 40000, 60000, and 150000 (total 360000 across 7 households), the rank-weighted sum works out to 1910000, giving a Gini coefficient of about 0.373 - labeled Moderate inequality.
Perfectly equal incomes
With four identical incomes of 50000 each, every value ranks the same relative to the total, and the formula reduces to exactly 0 - labeled Relatively low inequality, reflecting perfect equality across the group.
Advantages
- Condenses an entire distribution of values into a single, standardized number between 0 and 1, making comparisons across groups or time periods straightforward.
- Applies the same formula used for published national income inequality statistics, so results are directly comparable to widely cited benchmarks.
- Works on any list of non-negative values, extending naturally beyond income to wealth, market share, land holdings, or other measures of concentration.
Common Mistakes
- Entering percentages or shares that already sum to 100 instead of raw values, which changes the scale and can distort the resulting coefficient.
- Including negative values, such as net worth figures that include debt, which this formula does not support since it assumes all values are zero or positive.
- Treating the Gini coefficient as capturing everything about a distribution's shape, when two meaningfully different distributions can sometimes produce a similar coefficient.
Edge Cases to Watch For
- Requires at least 2 values, and every value must be zero or positive; negative entries, such as debt exceeding assets, are not supported by this formula.
- The values cannot all be zero, since the total sum appears in the denominator.
- A coefficient of 0 represents perfect equality, where every value is identical, while a coefficient approaching 1 represents extreme concentration, where nearly all the total sits in a single value.
Common Use Cases
- Economists and policy analysts comparing income or wealth inequality across regions, countries, or time periods.
- Business analysts assessing how concentrated market share or revenue is among competitors in an industry.
- Researchers and students studying distributional concentration in any dataset where values represent shares of a total.