Gini Coefficient Calculator
Enter Area A and Area B from a Lorenz curve diagram to see the Gini coefficient from G = A ÷ (A + B).
Updated
Gini Coefficient Calculator
Our Gini Coefficient Calculator measures how unequally income or wealth is spread, using the two areas of a Lorenz curve diagram. Type Area A (between the line of equality and the Lorenz curve) and Area B (under the Lorenz curve). It returns the Gini coefficient on the 0 to 1 scale, the Gini index on the 0 to 100 scale, the total area and a bar showing how the triangle splits between the two areas. It suits economics students working through inequality problems, teachers preparing examples, and researchers who want a quick check on a Lorenz curve reading.
Quick answer
The Gini coefficient is G = A ÷ (A + B). Divide the area between the line of equality and the Lorenz curve (A) by the whole area under the line of equality (A + B). With A = 0.12 and B = 0.38, the Gini coefficient is 0.12 ÷ 0.5 = 0.24.
- Area A: the gap between the line of equality and the Lorenz curve.
- Area B: the area under the Lorenz curve.
- G = 0: perfect equality, everyone has the same income.
- G = 1: maximum inequality, one person has all the income.
What Is the Gini Coefficient?
The Gini coefficient is a single number that sums up how evenly income, wealth or any other quantity is shared across a population. It runs from 0 to 1. A value of 0 means everyone has exactly the same amount. A value of 1 means one person has everything and everyone else has nothing. Real populations fall in between, and a higher number means a more unequal spread.
The measure is named after the Italian statistician Corrado Gini, who published it in 1912. It builds on the Lorenz curve, a chart introduced by the American economist Max Lorenz in 1905. Statistical offices, the World Bank and the OECD use it to compare inequality between countries and over time.
Gini Coefficient Formula
- G: the Gini coefficient, a number from 0 to 1 with no unit.
- A: the area between the line of equality and the Lorenz curve.
- B: the area under the Lorenz curve.
- A + B: the whole triangle under the line of equality.
Both areas must be measured in the same square units, and neither can be negative. The units cancel in the division, so the answer is the same whether the chart axes run from 0 to 1 or from 0 to 100.
Area A and Area B on the Lorenz Curve
A Lorenz curve ranks people from poorest to richest along the bottom axis and plots the share of total income they hold on the side axis. If income were shared equally, the poorest 20% would hold 20% of income, the poorest 50% would hold 50%, and the curve would be a straight diagonal: the line of equality. Real curves sag below that line, because the poorest half holds less than half of the income.
The more the curve sags, the larger Area A becomes and the smaller Area B becomes, so the Gini coefficient rises. When the curve lies on the diagonal, Area A is 0 and G is 0. When the curve hugs the bottom and right edges, Area B is 0 and G is 1.
How to Calculate the Gini Coefficient
A Lorenz diagram drawn on axes from 0 to 1 has 0.12 square units between the line of equality and the curve, and 0.38 square units under the curve:
G = 0.12 ÷ (0.12 + 0.38)
G = 0.12 ÷ 0.5
G = 0.24
- Find Area A. The gap between the diagonal and the Lorenz curve is 0.12.
- Find Area B. The area under the Lorenz curve is 0.38.
- Add the two areas. 0.12 + 0.38 = 0.5, the whole triangle under the diagonal.
- Divide Area A by the total. 0.12 ÷ 0.5 = 0.24.
The Gini coefficient is 0.24, which is a Gini index of 24. Area A fills 24% of the triangle and Area B fills the other 76%.
The Shortcut: G = 2A = 1 − 2B
When both axes run from 0 to 1, the triangle under the line of equality always has an area of ½ × 1 × 1 = 0.5. That fixes A + B at 0.5 and gives two shortcuts:
G = 1 − 2 × B
For the example above, 2 × 0.12 = 0.24 and 1 − 2 × 0.38 = 0.24. So you only need one of the two areas on a 0 to 1 chart. If you know only B, enter A as 0.5 − B.
On a chart with axes from 0 to 100 the triangle has an area of 5,000 square units. With A = 1,750 and B = 3,250, G = 1,750 ÷ 5,000 = 0.35. The calculator handles both scales because it always divides by A + B.
Finding Area B From Income Shares
Most real problems start with income shares, not areas. Join the points of the Lorenz curve with straight lines and add up the trapezoids under them. Suppose five equal groups (quintiles) hold 5%, 10%, 15%, 25% and 45% of income:
| Group | Share | Cumulative |
|---|---|---|
| Poorest 20% | 0.05 | 0.05 |
| Second 20% | 0.10 | 0.15 |
| Middle 20% | 0.15 | 0.30 |
| Fourth 20% | 0.25 | 0.55 |
| Richest 20% | 0.45 | 1.00 |
Each trapezoid is 0.2 wide, and its height is the average of the cumulative share at its two ends:
(0.05 + 0.15) ÷ 2 = 0.1
(0.15 + 0.30) ÷ 2 = 0.225
(0.30 + 0.55) ÷ 2 = 0.425
(0.55 + 1) ÷ 2 = 0.775
Sum of heights = 1.55
B = 0.2 × 1.55 = 0.31
A = 0.5 − 0.31 = 0.19
G = 0.19 ÷ 0.5 = 0.38
Enter 0.19 and 0.31 in the calculator to confirm the Gini coefficient of 0.38. Grouped data slightly understates inequality, because it ignores differences inside each group. More groups give a closer answer.
How to Read a Gini Coefficient
| G | Meaning |
|---|---|
| 0 | Perfect equality. Everyone has the same income. |
| 0.25 | Area A fills a quarter of the triangle. |
| 0.5 | Area A fills half of the triangle. |
| 1 | Maximum inequality. One person has all the income. |
There is no single cut-off between low and high inequality. As a reference, World Bank estimates of the Gini index for income or consumption run from about 25 in the most equal countries to above 60 in the most unequal. The United States Census Bureau has reported a Gini index close to 0.49 for household money income in recent years. Wealth is spread far less evenly than income, so wealth Gini coefficients are usually much higher.
Compare like with like. A Gini coefficient for income before taxes and benefits is higher than one for income after them, and figures for households differ from figures for individuals.
Gini Coefficient vs Gini Index
They are the same measure on two scales. The Gini coefficient runs from 0 to 1. The Gini index, used by the World Bank, multiplies it by 100 so that it runs from 0 to 100. A coefficient of 0.24 is an index of 24, and an index of 38 is a coefficient of 0.38. Some sources, including the United States Census Bureau, use the name Gini index for the 0 to 1 number, so check the scale before you compare two figures. The name Gini ratio means the same thing as Gini coefficient.
Gini Coefficient Examples
Four incomes. Four people earn 10, 20, 30 and 40. Their cumulative income shares are 0.1, 0.3, 0.6 and 1, so the trapezoid rule gives B = 0.375 and A = 0.125:
= 0.125 ÷ 0.5
= 0.25
The direct formula agrees. The absolute differences between every ordered pair of incomes add up to 200, and G = 200 ÷ (2 × 4² × 25) = 200 ÷ 800 = 0.25, where 4 is the number of people and 25 is the mean income.
A percent chart. On axes from 0 to 100, A = 1,750 and B = 3,250:
= 1,750 ÷ 5,000
= 0.35
A more unequal curve. A = 0.2 and B = 0.3:
= 0.2 ÷ 0.5
= 0.4
Limits of the Gini Coefficient
- One number hides the shape. Two different Lorenz curves can enclose the same Area A, so two very different income spreads can share one Gini coefficient.
- It says nothing about living standards. A poor country and a rich country can have the same value.
- Definitions change the answer. Income or wealth, before or after tax, households or individuals: each choice gives a different figure.
- Grouped data reads low. Quintile or decile data misses the inequality inside each group.
- It does not split by group. The Gini coefficient of a whole population is not a simple sum or average of the values for its regions or groups.
Read it next to other measures, such as income shares of the top 10% and the bottom 40%, for a fuller picture.
Key Terms
- Lorenz curve
- A curve showing the share of total income held by each cumulative share of the population, ranked from poorest to richest.
- Line of equality
- The straight diagonal a Lorenz curve would follow if everyone had the same income.
- Area A
- The area between the line of equality and the Lorenz curve.
- Area B
- The area under the Lorenz curve.
- Gini index
- The Gini coefficient multiplied by 100.
- Quintile
- One of five equal groups of a ranked population, each holding 20% of the people.
How to Use the Gini Coefficient Calculator
- Enter Area A. Type the area between the line of equality and the Lorenz curve, such as 0.12.
- Enter Area B. Type the area under the Lorenz curve, such as 0.38, in the same square units.
- Read and copy the result. The Gini coefficient appears as you type, with the working, the Gini index on the 0 to 100 scale, the total area and a bar showing the split between Area A and Area B. Press Copy to copy it, or Clear or Esc to start again.
Example: Area A = 0.19 and Area B = 0.31. The Gini coefficient is 0.19 ÷ 0.5 = 0.38.
Who Can Use This Calculator?
Frequently Asked Questions (FAQs)
What is the Gini coefficient?
The Gini coefficient is a number from 0 to 1 that measures how unequally income or wealth is shared in a population. 0 means everyone has the same amount and 1 means one person has everything.
How do you calculate the Gini coefficient?
Divide Area A, the area between the line of equality and the Lorenz curve, by the sum of Area A and Area B, the area under the Lorenz curve: G = A ÷ (A + B). With A = 0.12 and B = 0.38, G = 0.12 ÷ 0.5 = 0.24.
What are Area A and Area B in the Gini formula?
Area A is the area between the straight line of equality and the Lorenz curve. Area B is the area under the Lorenz curve. Together they make up the triangle under the line of equality.
Why does the Gini coefficient equal 2A?
On a Lorenz diagram with axes from 0 to 1, the triangle under the line of equality has an area of 0.5, so A + B = 0.5. Dividing A by 0.5 is the same as multiplying it by 2, which gives G = 2A = 1 − 2B.
What is the difference between the Gini coefficient and the Gini index?
They are the same measure on different scales. The Gini coefficient runs from 0 to 1 and the Gini index is usually the coefficient multiplied by 100, so a coefficient of 0.24 is an index of 24.
What does a Gini coefficient of 0 or 1 mean?
A Gini coefficient of 0 means perfect equality: the Lorenz curve lies on the line of equality and Area A is 0. A value of 1 means maximum inequality: one person holds all the income and Area B is 0.
Is a higher Gini coefficient better or worse?
A higher Gini coefficient means income or wealth is shared less equally. Whether that is good or bad is a judgement, and the number says nothing about how rich or poor the population is overall.
How do you find the Gini coefficient from income shares?
Plot the cumulative income shares as a Lorenz curve, add up the trapezoids under it to get Area B, subtract B from 0.5 to get Area A, then divide A by 0.5. Quintile shares of 5%, 10%, 15%, 25% and 45% give B = 0.31, A = 0.19 and G = 0.38.
Is the Gini Coefficient Calculator free?
Yes. It is free to use, with no sign-up and no limit on how many times you use it.
Sources
- Wikipedia. Gini coefficient.
- Wikipedia. Lorenz curve.
- Our World in Data. Measuring inequality: what is the Gini coefficient?.
- World Bank. Gini index.
- U.S. Census Bureau. Gini Index.
- OpenStax. Principles of Economics 3e, 15.4 Income Inequality: Measurement and Causes.
- Corporate Finance Institute. Gini Coefficient.
- WallStreetMojo. Lorenz Curve.
Try our Gini Coefficient Calculator to turn the two areas of a Lorenz curve into a Gini coefficient.