Gini Coefficient Calculator

Calculate inequality index and visualize the Lorenz Curve

unit²
unit²
% of Population Proportion of Income 0 100 0 100 A B Line of Equality Lorenz Curve

What is the Gini Coefficient?

Developed by Italian statistician Corrado Gini in 1912, the Gini coefficient (or Gini index) is the most widely used statistical measure of economic inequality. It gauges the dispersion of wealth or income across a population.

The index operates on a simple scale from 0 to 1 (or 0% to 100%):

  • 0 represents perfect equality: Every single person in the population has the exact same income.
  • 1 represents perfect inequality: One single person holds all the income, and everyone else has zero.

In the real world, no country operates at a strict 0 or 1. Most developed nations hover between 0.25 and 0.45, while countries with severe wealth gaps might push past 0.50.

The Lorenz Curve

Here is how the graph breaks down:

  1. The X-Axis: Represents the cumulative percentage of the population, from the poorest (0%) to the richest (100%).
  2. The Y-Axis: Represents the cumulative percentage of total income or wealth earned by that population.
  3. The Line of Equality (The Red Diagonal): A perfectly straight 45-degree line. This represents a utopian society where 10% of the people hold 10% of the wealth, 50% hold 50%, and so on.
  4. The Lorenz Curve (The Sagging Line): This is the actual distribution of wealth. It sags below the line of equality because, in reality, the bottom 50% of a population usually holds much less than 50% of the total wealth.

The area between the perfect equality line and the actual Lorenz curve is Area A. The area underneath the Lorenz curve is Area B. The larger Area A grows, the more unequal the society.

How to Use This Calculator

It allows you to explore the relationship between the areas and the index dynamically.

  • Forward Calculation: Input the known size of the Inequality Gap (Area A) and the Income Share Area (Area B). The tool will instantly generate the Gini Coefficient and plot the Lorenz curve.
  • Reverse Engineering: Because the tool acts as an active matrix, you can input a target Gini Coefficient alongside just one area (either A or B). The calculator will automatically reverse-engineer the missing variable.

The Mathematical Formulas

1. The Area Approach (Used in the graph) This is the fundamental definition of the Gini index based on the Lorenz curve geometry.

Gini Coefficient (G) = A / (A + B)

Because the total area of the triangle under the Line of Equality (A + B) is exactly 0.5, we can simplify the formula significantly if we only know one of the areas:

G = 2 * A
-- or --
G = 1 - (2 * B)

2. The Brown Formula (For discrete data) In real-world economics, we don’t always have a perfectly smooth curve. We usually have discrete data points (like income deciles or quintiles). To calculate the Gini coefficient from a table of cumulative population and income percentages, economists use the Brown Formula:

G = 1 - Σ [ (X_k - X_{k-1}) * (Y_k + Y_{k-1}) ]

Where:
X = Cumulative proportion of the population
Y = Cumulative proportion of income
k = The specific data interval or group
Σ = The sum of all intervals

Calculation Example

Let’s say you want to calculate the inequality of a small, simplified five-person economy using the Brown formula method.

  1. Gather Income Data: List the incomes from poorest to richest. (e.g., $10k, $20k, $30k, $40k, $100k). Total income = $200k.
  2. Calculate Cumulative Population Fractions (X): Since there are 5 people, each person represents 20% (0.2) of the population. The cumulative steps are 0.2, 0.4, 0.6, 0.8, 1.0.
  3. Calculate Cumulative Income Fractions (Y): * Person 1: 10/200 = 0.05
    • Person 2: (10+20)/200 = 0.15
    • Person 3: (10+20+30)/200 = 0.30
    • Person 4: (10+20+30+40)/200 = 0.50
    • Person 5: (All combined)/200 = 1.00
  4. Apply the Formula: Multiply the difference in population share by the sum of the current and previous income shares for each step, sum them all up, and subtract from 1.

Interpreting the Numbers

What does a specific coefficient actually tell us about a society? While context matters, economists generally categorize the results as follows:

  • Below 0.25: Exceptionally equal income distribution. Usually found in highly regulated or heavily taxed welfare states (e.g., historical Scandinavian models).
  • 0.25 to 0.35: Adequate equality. A strong middle class with manageable disparities between the lowest and highest earners (e.g., modern-day Germany, Canada).
  • 0.36 to 0.45: Noticeable inequality. The wealth gap is distinct, often characterized by a shrinking middle class and a concentration of wealth at the top (e.g., the United States).
  • Above 0.45: Severe inequality. Significant economic friction, often where a very small elite holds the vast majority of resources (e.g., South Africa, Brazil).

Income Inequality vs. Wealth Inequality

When reading Gini coefficient data, it is vital to know exactly what is being measured. The index is most commonly used to measure Income, but it can also measure Wealth and the two paint very different pictures.

  • The Income Gini Coefficient: This measures the distribution of money earned over a specific period (usually a year) through salaries, wages, and investments.
  • The Wealth Gini Coefficient: This measures the distribution of total assets owned (property, stocks, cash reserves, minus debts) at a single point in time.

Why does this matter? Wealth inequality is almost always significantly higher than income inequality. A country might have a relatively reasonable Income Gini of 0.35, but a severe Wealth Gini of 0.80. This happens because while middle-class workers might earn decent annual salaries, the ultra-rich hold vast amounts of generational assets and equity that compound over decades.

The Limitations of the Gini Index

While it is a powerful tool, relying entirely on the Gini coefficient can lead to blind spots. As someone who builds data tools, I always recommend understanding what a metric cannot do.

It ignores absolute wealth. A wealthy nation where the poorest citizen makes $40,000 a year could have the exact same Gini coefficient as a developing nation where the poorest citizen makes $400 a year. It measures distribution, not living standards.

Different curves, same number. Two entirely different Lorenz curves can intersect and result in the exact same Area A and Area B. A country with massive poverty and a tiny ultra-rich class might score the same as a country where the middle class is completely absent but poverty is less extreme.

Data sensitivity. The index is highly sensitive to outliers at the very top and very bottom. Furthermore, it relies on reported income. Because the ultra-wealthy often shield their assets or hold wealth in unrealized capital gains rather than traditional “income,” the Gini index frequently underreports true structural inequality.

Why Economists Still Rely on the Gini Index

Despite its limitations, the Gini coefficient remains the global gold standard for a few highly specific, mathematical reasons:

  1. Anonymity Principle: It does not matter who the high and low earners are. The index doesn’t care about demographics, location, or professions; it looks purely at the mathematical distribution, making it an objective baseline.
  2. Scale Independence: The Gini index does not change if an economy grows or shrinks proportionally. If a country experiences rapid inflation and everyone’s income doubles overnight, the Gini coefficient remains exactly the same because the share of the pie hasn’t shifted.
  3. Population Independence: It allows us to compare massive countries against tiny ones. You can mathematically compare the wealth distribution of India (population 1.4 billion) with Iceland (population 380,000) on the exact same scale.

FAQs

Q1. What is considered a “good” or “healthy” Gini coefficient?

A: Most economists agree that a “healthy” economy one that rewards innovation and hard work without leaving the vulnerable behind typically lands between 0.25 and 0.35. A score of exactly 0.0 (perfect equality) is often considered detrimental, as it implies a lack of financial incentive for career advancement or entrepreneurship.

Q2. Can a Gini coefficient be higher than 1 (or 100%)?

A: In standard theoretical models, no; the scale caps at 1. However, in real-world wealth calculations (not income), it is mathematically possible to exceed 1 if a significant portion of the population has negative wealth (meaning they are deeply in debt).

Q3. How does the Gini Index differ from the Palma Ratio?

A: The Palma Ratio is an alternative inequality metric that divides the income share of the top 10% by the income share of the bottom 40%. While the Gini index looks at the entire population’s curve, the Palma Ratio ignores the middle class (the middle 50%) entirely, focusing strictly on the extremes where inequality is most intensely felt.

Q4. Does taxation affect the Gini coefficient?

A: Absolutely. You will often see two different Gini scores for the same country: Pre-tax (market income) and Post-tax (disposable income). Post-tax Gini coefficients are almost always lower (more equal) because progressive tax systems and social welfare transfers redistribute wealth from the top earners to the bottom.

Sources: Good Calculators, Omni Calculator, EDUCBA, Wikipedia, Golden Door Asset, National Chengchi University (NCCU), Statology, MiniWebtool, EconGraphs.