Gini Coefficient Calculator
Paste your income or value data below to calculate inequality using the Gini coefficient. Use commas, spaces, or new lines.
What is the Gini coefficient?
The Gini coefficient is one of the most widely used measures of inequality. It summarizes how evenly (or unevenly) a quantity is distributed across a population. Most often, that quantity is income or wealth, but it can also be used for land ownership, productivity, customer concentration, and many other distributions.
The value usually falls between 0 and 1:
- 0 means perfect equality (everyone has exactly the same value).
- 1 means maximum inequality (one person has everything, everyone else has nothing).
Formula for calculation of gini coefficient
Unweighted sample formula
Where n is the number of observations, μ is the mean of the values, and the double summation runs over every pair of observations.
Weighted formula
Weighted calculations are useful when one row represents multiple people, households, or units. This calculator supports both unweighted and weighted inputs.
How to interpret your result
No single threshold is universal, but a practical rule of thumb is:
- 0.00–0.20: very low inequality
- 0.21–0.30: relatively low inequality
- 0.31–0.40: moderate inequality
- 0.41–0.50: high inequality
- 0.51+: very high inequality
Always interpret Gini values in context: country, year, tax system, household size adjustments, and whether your data is pre-tax or post-tax can all change the result substantially.
Step-by-step example
Suppose five people have incomes of 20, 25, 30, 35, and 90 (in thousands).
- Mean income is 40.
- Compute absolute differences for every pair.
- Add all pairwise differences together.
- Divide by 2n²μ.
You would get a Gini coefficient around 0.31, indicating moderate inequality because one value is substantially higher than the others.
Common mistakes in gini coefficient calculations
1) Mixing units
If part of your dataset is monthly income and part is annual income, the result is meaningless. Standardize units first.
2) Ignoring zero or missing values
Zero values are valid in many studies and can increase inequality. Missing values should be handled explicitly rather than silently dropped without documentation.
3) Using negative values without care
Negative incomes can occur in tax/business data, but interpretation becomes tricky. This calculator requires non-negative inputs to avoid invalid or misleading results.
4) Forgetting weights
If each row in your data represents a different number of people (survey weights), unweighted Gini may bias your estimate.
When should you use Gini vs other inequality metrics?
- Gini coefficient: single intuitive summary of overall inequality.
- Theil index: decomposable by subgroup; useful in advanced analysis.
- Palma ratio: focuses on top 10% vs bottom 40%.
- Percentile ratios (P90/P10): easy communication to non-technical audiences.
In practice, analysts often report Gini together with one or two additional indicators for a fuller picture.
Final takeaway
The calculation of gini coefficient is straightforward once your data is clean. The bigger challenge is usually data quality, proper weighting, and interpretation. Use this tool as a fast first pass, then validate assumptions before using the result in policy, research, or business decisions.