CalcTune
📐
Math · Statistics

Gini Coefficient Calculator

Enter a list of income or wealth values to calculate the Gini coefficient — a standard statistical measure of inequality ranging from 0 (perfect equality) to 1 (maximal inequality).

Enter values separated by commas, spaces, or new lines. Negative values are ignored.

Example values — enter yours above
GINI COEFFICIENT
0.3845Moderate Inequality
00.51
Low InequalityHigh Inequality

Distribution Statistics

Count
5
Mean
88,000
Median
68,000
Total
440,000

Understanding the Gini Coefficient: Measuring Inequality in Distributions

The Gini coefficient — also called the Gini index or Gini ratio — is one of the most widely used statistical measures for quantifying inequality in a distribution. Originally developed by Italian statistician Corrado Gini in 1912, it summarizes the entire distribution of a dataset into a single number between 0 and 1. A value of 0 represents perfect equality (every unit has the same value), while a value of 1 represents maximal inequality (one unit holds everything). The Gini coefficient is most commonly applied to income and wealth data, but it can be used to measure inequality in any non-negative distribution — land ownership, access to healthcare, educational attainment, or ecological diversity.

What Does the Gini Coefficient Measure?

The Gini coefficient measures how far a distribution departs from perfect equality. The intuition behind it comes from the Lorenz curve — a graph that plots the cumulative share of total income received by the cumulative share of the population, starting from the lowest earners. If income were distributed perfectly equally, the Lorenz curve would be a straight diagonal line (the ‘line of perfect equality’). In reality, the curve bows below that diagonal, and the Gini coefficient is proportional to the area between the diagonal and the actual curve.

Mathematically, the Gini coefficient equals twice the area between the Lorenz curve and the line of equality. This geometric interpretation makes it intuitive: the more the actual distribution bows away from equality, the larger that area, and the higher the Gini coefficient. A perfectly equal distribution produces a Gini of 0; a single entity holding all the wealth would push the Gini toward its theoretical maximum of 1.

In practice, Gini coefficients for national income distributions range roughly from 0.24 (highly equal societies) to over 0.60 (highly unequal societies). The specific thresholds for ‘low’, ‘moderate’, and ‘high’ inequality vary by source and context; this calculator uses the commonly cited boundaries of 0.30 and 0.45 as approximate dividing lines.

How to Calculate the Gini Coefficient

Several equivalent formulas exist for the Gini coefficient. The rank-based formula used here is computationally convenient for datasets of any size: G = (2 × Σ(i × yᵢ)) / (n × Σyᵢ) − (n+1)/n, where yᵢ are the values sorted in ascending order, i is the 1-based rank of each value, and n is the total number of values.

For a concrete example, consider five income values: 25,000; 42,000; 68,000; 95,000; 210,000. Sorted in ascending order, the weighted rank sum is: (1×25,000) + (2×42,000) + (3×68,000) + (4×95,000) + (5×210,000) = 25,000 + 84,000 + 204,000 + 380,000 + 1,050,000 = 1,743,000. The total sum of values is 440,000. Applying the formula: G = (2 × 1,743,000) / (5 × 440,000) − 6/5 = 3,486,000 / 2,200,000 − 1.2 ≈ 1.5845 − 1.2 = 0.3845. This result falls in the moderate inequality range.

An alternative formulation uses the mean absolute difference: G = (Σᵢ Σⱼ |yᵢ − yⱼ|) / (2n² × mean). Both formulas produce the same result; the rank-based formula is simply faster to compute for large datasets.

Interpreting the Gini Coefficient

No single threshold separates ‘acceptable’ from ‘unacceptable’ inequality — that judgment depends on context, values, and policy goals. What the Gini coefficient does is provide a consistent, comparable number. A country whose income Gini rises from 0.30 to 0.40 over twenty years has measurably increased income inequality, regardless of whether those numbers cross any particular threshold.

Several real-world reference points help ground the numbers. Nordic countries such as Norway and Denmark typically show disposable income Gini values around 0.26–0.29 after taxes and transfers. The United States shows a pre-tax income Gini around 0.49, falling to roughly 0.39 after redistribution. Brazil and South Africa have historically had Gini values above 0.55, placing them among the more unequal large economies. Within a single country, wealth Gini values are generally much higher than income Gini values, because wealth is more concentrated than income flow.

It is also important to distinguish pre-tax (market income) Gini from post-tax (disposable income) Gini. Taxes, transfers, and social programs can significantly reduce the effective inequality that households experience. Comparing the two reveals how much redistribution a given policy system achieves.

Limitations of the Gini Coefficient

The Gini coefficient has several well-known limitations. First, two distributions can have identical Gini values but very different shapes. A society where the rich hold all the surplus and a society where the middle class holds it can produce the same number. For this reason, Gini is most informative when paired with other distributional statistics — mean, median, percentile ratios, or full Lorenz curves.

Second, the Gini coefficient is sensitive to the size and definition of the population. Comparing the income Gini of a small city to that of an entire country may not be meaningful because different populations have inherently different distributions. Similarly, the Gini is affected by household size adjustments (equivalization), whether capital gains are included in income, and whether data is based on surveys or tax records.

Third, the Gini coefficient is a static snapshot. It measures inequality at a point in time but says nothing about mobility — whether people can move between income levels over their lifetimes. A society with high income mobility might have a high annual Gini but still provide broad opportunity; a society with low mobility might show a moderate Gini while being relatively rigid.

Despite these limitations, the Gini coefficient remains one of the most practical summary measures of inequality. Its interpretability, comparability across contexts, and availability in international databases make it a standard tool in economics, social science, public policy, and development research.

Applications Beyond Income and Wealth

Although the Gini coefficient is most famous for measuring income inequality, its mathematical properties make it applicable to any non-negative distribution. Ecologists use it to measure species abundance — a forest where a single species dominates will have a higher ecological Gini than one with evenly distributed species. Epidemiologists apply it to health data, measuring inequality in disease burden, life expectancy, or access to care across regions or demographic groups.

In business and marketing, the Gini coefficient appears in analyses of customer revenue concentration. A high customer Gini means a small number of customers generate most of the revenue, a pattern related to the Pareto principle (the ‘80/20 rule’). Understanding this concentration helps businesses identify key accounts and assess customer-base risk.

In information science, the Gini coefficient is used in decision tree algorithms. The ‘Gini impurity’ used in classification trees is a related but distinct concept that measures the probability of incorrectly classifying a randomly chosen element. While the name is the same, Gini impurity and the Gini coefficient of inequality are mathematically different measures used in different contexts.

Related Inequality Measures

Several other measures complement or extend the Gini coefficient. The Palma ratio divides the income share of the top 10% by the income share of the bottom 40%, offering a view that focuses on the extremes. Some researchers argue the Palma ratio is more intuitive and policy-relevant than the Gini because middle-class shares of income tend to be relatively stable across countries.

The Theil index is an entropy-based inequality measure that has the advantage of being decomposable: the total Theil index for a population can be broken into within-group and between-group components. This is useful for analyzing where inequality originates — for example, separating inequality within regions from inequality between regions.

The Atkinson index allows researchers to specify an ‘inequality aversion’ parameter reflecting how much society cares about transfers at different income levels. A higher aversion parameter makes the index more sensitive to changes at the lower end of the distribution. This flexibility makes the Atkinson index useful for policy analysis where distributional preferences matter explicitly.

Each of these measures captures different aspects of inequality. The Gini coefficient’s advantage is its simplicity and universal familiarity, making it the default starting point for most inequality analyses.

Frequently Asked Questions

What is the Gini coefficient?

The Gini coefficient is a statistical measure of inequality in a distribution, originally developed by Corrado Gini in 1912. It ranges from 0 to 1: a value of 0 means every unit has an identical value (perfect equality), while a value of 1 means a single unit holds all the value (maximal inequality). It is most commonly applied to income and wealth data, but can be used for any non-negative distribution.

What Gini coefficient value indicates high inequality?

Thresholds vary by source and context. A commonly cited convention classifies Gini values below 0.30 as low inequality, 0.30 to 0.45 as moderate inequality, and above 0.45 as high inequality. Real-world national income Gini values range from roughly 0.24 for the most equal countries to above 0.60 for the most unequal. No threshold definitively marks where inequality becomes problematic — interpretation depends on context and policy goals.

Can the Gini coefficient be greater than 1?

No. For non-negative values, the Gini coefficient is bounded between 0 and 1. A value of 0 represents perfect equality and 1 represents perfect inequality (one unit holds everything, all others hold nothing). If negative values were included, the Gini could theoretically exceed 1, but this calculator filters out negative inputs to stay within the standard definition.

What is the difference between income Gini and wealth Gini?

Income Gini measures inequality in the flow of money people receive (wages, salaries, dividends) over a period, typically a year. Wealth Gini measures inequality in the stock of assets people own (real estate, savings, investments) at a point in time. Wealth is almost always more concentrated than income, so wealth Gini values tend to be substantially higher than income Gini values for the same population.

Does a lower Gini coefficient always mean a better outcome?

Not necessarily. The Gini coefficient measures the level of inequality in a distribution, not the absolute level of wellbeing. A society could have a low Gini because everyone is equally poor, which would not indicate a desirable outcome. The Gini coefficient is most meaningful when interpreted alongside measures of absolute income or wealth levels, poverty rates, and mobility data. It is a description of distribution, not a judgment about it.

Why do some sources report the Gini coefficient as a percentage?

Some sources multiply the Gini coefficient by 100 and express it as a percentage or ‘Gini index’ (e.g., 38.5 instead of 0.385). Both representations describe the same underlying value — they differ only in scale. This calculator displays the Gini as a decimal between 0 and 1, which is the more common format in statistical and academic contexts.