What this Gini Coefficient Calculator does
This Gini Coefficient Calculator estimates inequality in a distribution by approximating the area beneath a Lorenz curve. It accepts five population-group shares and the matching income shares. For a standard grouped-data example, the groups represent successive fifths of a population, ordered from the lowest-income group to the highest-income group.
The result is an estimated Gini coefficient on a scale where zero represents equality in the measured distribution and values closer to one indicate greater inequality. The estimate depends on the group data and the interpolation between group boundaries. It does not identify why a distribution has its shape, assess fairness, or explain differences in income, wealth, services, or political influence.
The calculator uses shares as percentages. The five population inputs should add to 100, and the five income inputs should also add to 100. Enter corresponding groups in the same order, from the lowest observed income share to the highest. The built-in arithmetic cannot verify those totals or confirm that the groups are ordered correctly, so check your data before interpreting the result.
How to use the Gini Coefficient Calculator
Prepare a table with five population groups and two shares for each group. Each population share describes what percentage of the full population belongs to that group. Its income share describes what percentage of the measured total income goes to that same group. Use one consistent population, time period, and definition of income throughout.
- Sort the groups from the lowest-income group to the highest-income group.
- Enter each group's population percentage in its matching population field.
- Enter that group's percentage of total income in the corresponding income field.
- Check that both sets of five shares sum to 100 percent.
- Read the estimated result and keep the original data and definitions with it.
For example, a dataset might divide residents into five population quintiles, each containing 20 percent of residents. If their income shares are 5, 10, 15, 20, and 50 percent, enter those values in order. These are illustrative figures, not a claim about any particular city or election. If your source uses deciles, unequal-sized groups, or a different number of categories, this five-group setup does not directly represent that dataset.
How the Gini Coefficient formula works
The formula constructs points on a Lorenz curve. The horizontal coordinate is cumulative population share, and the vertical coordinate is cumulative income share. Starting at zero, each group's population percentage advances the horizontal coordinate, while its income percentage advances the vertical coordinate. The curve connects those points in order.
The calculator approximates the area under each segment with a trapezoid. A segment's area is its population width multiplied by the average of its income shares at the two ends. The formula adds those segment areas, then subtracts the total from one. This corresponds to the grouped-data Gini calculation based on the area between the Lorenz curve and the line of equal distribution.
Using the example above, the cumulative population boundaries are 0, 0.2, 0.4, 0.6, 0.8, and 1. The cumulative income boundaries are 0, 0.05, 0.15, 0.30, 0.50, and 1. The trapezoid areas are 0.005, 0.020, 0.045, 0.080, and 0.150. Their sum is 0.300, so the formula gives 1 − 0.300 = 0.70. The result is dimensionless because percentages are converted to proportions before the areas are calculated.
This method assumes a straight line between observed cumulative points. Actual incomes within a group may vary substantially, and grouped data hide that detail. The estimate is therefore an approximation rather than a measure calculated from every individual record.
Use cases for the Gini Coefficient
A Gini coefficient can summarize inequality in a distribution when the underlying measure and population are clearly defined. Researchers, civic analysts, and readers of public data may use it as one descriptive statistic when comparing distributions or framing questions for further analysis.
- Compare periods: Apply a consistent definition to data from different years and examine how the summary changes.
- Describe places: Compare areas when the population coverage, income concept, and collection method are compatible.
- Read civic reports: Use the measure as context when reviewing public discussions of household conditions or resource distribution.
- Explain grouped data: Show how population and income shares combine to shape a summary statistic.
In an elections or civic-data discussion, the coefficient may provide background on economic conditions. It does not measure voter preferences, turnout, representation, campaign influence, or the causes of election outcomes. Those questions need data and methods suited to them. A single inequality statistic cannot establish a causal relationship between income distribution and political behavior.
Other factors to consider when calculating inequality
Before comparing results, check what the source means by income. It may report earnings, household income, disposable income after taxes and transfers, or another quantity. These definitions can produce different distributions. Household size, inflation adjustments, non-cash benefits, and treatment of people with zero or negative income can also affect the data and the interpretation.
Pay attention to how groups were formed. The calculator expects five contiguous groups ordered by income, with each group's income share paired with its population share. If rounding causes shares not to sum exactly to 100, the calculator still performs the arithmetic, but its output may no longer reflect a valid complete distribution. Correct the inputs using the source's unrounded data where possible.
Comparisons are most informative when they use compatible data collection methods and definitions. A difference may reflect a real change, a revised survey, different geographic boundaries, or a change in how income was measured. Report the source, reference period, population, measure, and grouping alongside the estimate. Treat the coefficient as one summary among several, and consult the underlying distribution when the shape matters.
Gini Coefficient Calculator FAQ
What does a Gini coefficient of zero mean?
Under the standard interpretation, zero describes perfect equality in the measured distribution. Every unit would receive the same amount of the measured total. It is a reference point for the metric, not a statement about whether a society or policy is fair.
Can the coefficient be shown as a percentage?
It is commonly reported as a decimal between zero and one, or multiplied by 100 and presented on a 0-to-100 scale. This calculator returns a decimal rounded to two places. If converting it for a report, state the scale clearly.
Why must the groups be in income order?
The Lorenz curve accumulates income from the lowest-income group upward. Reordering the groups changes the cumulative curve and makes the calculation inconsistent with the usual definition. Sort using the data's income ranking before entering shares.
Can I use this for wealth or election data?
The same mathematical idea can summarize a nonnegative distribution such as wealth, provided the grouped shares are meaningful and complete. The result describes that chosen measure. It cannot directly summarize election outcomes such as vote shares across candidates because those are not income shares across ordered population groups.
Why might my result differ from a published figure?
Published estimates may use individual records, more groups, survey weights, adjustments, or a different income definition. This calculator approximates the curve from five grouped shares. Differences in source, period, population, and method can all change the result.