Calculateus

Gini Coefficient Calculator

Calculate the Gini coefficient to measure inequality within a set of values, such as income or wealth.

Result

Gini Coefficient
0.373
Inequality Level
Moderate inequality

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.

After sorting n values ascending, assign each value a rank i (starting at 1) and compute a rank-weighted sum equal to the sum of (rank) x (value) across all entries. The Gini coefficient is (2 x rank-weighted sum) / (n x total) - (n + 1) / n.

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.
Written & fact-checked by the Calculateus TeamLast updated August 5, 2026How we verify our formulas

Frequently asked questions

How is the Gini coefficient interpreted?

It ranges from 0 (perfect equality, everyone has the same value) to 1 (perfect inequality, one entity has everything) - it's most widely known as a measure of income or wealth inequality across countries, but the same formula applies to any distribution you want to assess for concentration, such as market share or resource allocation.

Conclusion

The Gini Coefficient Calculator turns a raw list of values into the standard 0-to-1 inequality measure used across economics and other fields, with the accompanying inequality-level label offering a quick way to interpret the result. Because it depends only on the relative distribution of values, it can be applied to any dataset where concentration is the question.