gini coefficient calculator

Use commas, spaces, or new lines. Enter at least two non-negative numbers. Do not use thousands separators inside a number.
The Gini coefficient ranges from 0 (perfect equality) to 1 (perfect inequality).

What is the Gini coefficient?

The Gini coefficient is one of the most commonly used measures of inequality. It summarizes how evenly a resource (usually income or wealth) is distributed across a group of people. A value close to 0 means people have very similar amounts, while a value close to 1 means a small share of people controls most of the resource.

Economists, policy analysts, researchers, and journalists often use this metric to compare inequality across countries, regions, or time periods. It is useful because it compresses a full distribution into one number that is easy to communicate.

How this calculator works

This calculator accepts a list of values and computes:

  • Gini coefficient
  • Total and average value
  • Median value
  • A plain-language interpretation of the inequality level

Internally, your values are sorted from smallest to largest and evaluated using the standard discrete Gini formula.

The formula (discrete form)

For sorted values xi (ascending), with n observations:

G = (2 × Σ(i × xi) / (n × Σxi)) − (n + 1) / n

This formula assumes non-negative values. If all values are zero, this tool reports a Gini of 0.

How to interpret your result

Quick interpretation guide

  • 0.00–0.19: Very low inequality
  • 0.20–0.29: Low inequality
  • 0.30–0.39: Moderate inequality
  • 0.40–0.49: High inequality
  • 0.50+: Very high inequality

These labels are practical rules of thumb, not hard scientific boundaries. Context matters: population size, data quality, taxes/transfers, and whether you use income or wealth can change the story.

Example use cases

1) Comparing neighborhoods

If two neighborhoods have the same average income, the one with the higher Gini has greater income spread. That can help identify areas where affordability or opportunity may differ sharply.

2) Tracking inequality over time

You can calculate a Gini value each year using consistent data definitions. A rising trend usually indicates concentration increasing at the top relative to the rest.

3) Classroom and research demos

This calculator is also useful for teaching statistics and economic inequality concepts quickly with custom datasets.

Important limitations

  • The Gini coefficient does not show where in the distribution inequality occurs.
  • Two very different distributions can produce the same Gini value.
  • It can be sensitive to missing top incomes in incomplete datasets.
  • Cross-country comparisons require consistent data definitions and methods.

Tips for better analysis

  • Pair Gini with percentile shares (top 10%, bottom 50%).
  • Compare both pre-tax and post-tax income when available.
  • Use median and mean together to understand skewness.
  • Keep sample size and data source transparent.

Frequently asked questions

Can I use wealth instead of income?

Yes. The same formula applies to any non-negative quantity distributed across units (people, households, firms, etc.).

Why are negative values rejected?

Standard textbook Gini implementations are typically defined for non-negative values. Handling negatives requires a modified approach and careful interpretation.

Is a lower Gini always better?

Lower inequality can indicate a more even distribution, but policy evaluation should also consider growth, mobility, poverty rates, and overall living standards.

🔗 Related Calculators

🔗 Related Calculators