Gini Coefficient Simulator: Lorenz Curve & Income Inequality Visualization

simulator intermediate ~10 min
Loading simulation...
Gini ≈ 0.33 — moderate inequality with Pareto α=2

With default parameters (Pareto α=2, 1000 population, no redistribution), the Gini coefficient is approximately 0.33, indicating moderate inequality. The top 1% holds roughly 10% of total income, while the bottom 50% holds about 30%. Adding redistribution compresses the Lorenz curve toward the equality line.

Formula

Gini = 1 - 2·∫₀¹ L(x)dx
For Pareto distribution: Gini = 1/(2α - 1)
Pareto CDF: F(x) = 1 - (x_m/x)^α for x ≥ x_m
Lorenz curve: L(F) = 1 - (1-F)^(1-1/α)

Measuring Inequality

How unequal is a society? The Gini coefficient, introduced by Corrado Gini in 1912, provides a single number answer on a scale from 0 (perfect equality) to 1 (perfect inequality). It is derived from the Lorenz curve, first proposed by Max O. Lorenz in 1905, which plots the cumulative share of income against the cumulative share of population ranked from poorest to richest.

The Lorenz Curve

The 45-degree diagonal represents perfect equality — each percentage of the population holds the same percentage of total income. The actual income distribution creates a curve that bows below this line. The area between the equality line and the Lorenz curve (shaded red in the visualization) is the basis for the Gini coefficient: Gini = 2 times this area. A deeper bow means more inequality.

Pareto's Power Law

Italian economist Vilfredo Pareto observed in 1896 that income distributions follow a power law — now called the Pareto distribution. The shape parameter alpha (α) controls inequality: when α = 2, the Gini coefficient is 1/(2·2-1) = 0.33 (moderate inequality). When α approaches 1, inequality becomes extreme; as α increases, the distribution becomes more equal. This mathematical relationship connects a fundamental distributional assumption to measurable inequality.

The Effect of Redistribution

The redistribution slider models a simplified tax-and-transfer system: a fraction of total income is collected and redistributed equally to all citizens. Even modest redistribution significantly compresses the Lorenz curve toward equality. In practice, countries use progressive income taxes, wealth taxes, and social transfers (healthcare, education, pensions) to redistribute. The Nordic countries achieve Gini coefficients around 0.25 through redistribution rates of roughly 25-30% of GDP.

Wealth by Quintile

The bar chart on the right breaks the population into five equal groups (quintiles). In highly unequal societies, the top 20% may hold 60% or more of total income, while the bottom 20% holds less than 5%. Thomas Piketty's landmark work Capital in the Twenty-First Century (2014) documented how inequality has been rising in most developed nations since the 1980s, with the top 1% share of income reaching levels not seen since the Gilded Age.

FAQ

What is the Gini coefficient?

The Gini coefficient is a measure of statistical dispersion that represents income or wealth inequality on a scale from 0 (perfect equality — everyone has the same income) to 1 (perfect inequality — one person has all income). Developed by Italian statistician Corrado Gini in 1912, it is calculated as twice the area between the Lorenz curve and the line of perfect equality.

What is a Lorenz curve?

Developed by Max O. Lorenz in 1905, the Lorenz curve plots the cumulative share of income (y-axis) against the cumulative share of population ordered from poorest to richest (x-axis). If income were perfectly equal, the curve would be a 45° diagonal line. The further the curve bows below this line, the greater the inequality. The Gini coefficient equals twice the area between the Lorenz curve and the equality line.

What is a Pareto distribution?

The Pareto distribution, named after Vilfredo Pareto (1896), models the empirical observation that income and wealth tend to follow a 'power law' — a small fraction of people hold a disproportionately large share. The shape parameter α controls the degree of inequality: lower α means heavier tails and more extreme inequality. For a Pareto distribution, the Gini coefficient equals 1/(2α-1).

What Gini coefficients do real countries have?

As of recent data: Nordic countries (Denmark, Sweden, Norway) have Gini coefficients around 0.25-0.28. Germany and France are around 0.30-0.33. The United States is approximately 0.39-0.41. Brazil is around 0.53. South Africa has one of the highest at approximately 0.63. These differences reflect varying levels of market income inequality and redistribution through taxes and transfers.

Sources

Embed

<iframe src="https://homo-deus.com/lab/economics/gini-inequality/embed" width="100%" height="400" frameborder="0"></iframe>
View source on GitHub