Gini Coefficient: Lorenz Curve, Formula, How to Calculate It, UK Figures, Limitations and Gini Impurity, with 10 Examples
The Gini coefficient explained for A level economics and university: the Lorenz curve, the formula, trapezium and mean difference calculations, UK figures, limitations, other measures and Gini impurity in decision trees.
The Gini coefficient is a single number that measures how unequally income or wealth is shared across a population. It runs from 0, where everyone has exactly the same income, to 1, where one person has everything. It comes from the Lorenz curve: the area between the line of equality and the curve, divided by the area under that line.
This guide from FLN Tutors (Freelancer Network) economics and statistics tutors is written for A level economics students, for university students handling inequality data in coursework or a dissertation, and for anyone who has met the Gini index in a news story. It covers the Lorenz curve, the formula, how to calculate and interpret the coefficient, its limits and the different Gini measure used in machine learning.
There are 10 worked examples with numbers. Every area, coefficient and ratio in them was recalculated by a short script before publishing, so you can follow each step and check your own working.
What is the Gini coefficient?
The Gini coefficient summarises a whole distribution of income, or of wealth, in one figure. A low value means income is spread fairly evenly; a high value means a large share goes to a small part of the population. It is named after the Italian statistician Corrado Gini, who set out his measure in a 1912 work, Variabilità e mutabilità.
| Key fact | Detail |
|---|---|
| What it measures | Inequality in a distribution, usually of income or wealth |
| Range | 0 (perfect equality) to 1 (perfect inequality) |
| Percentage form | Often written as 0 to 100, or as a percentage, so 0.327 becomes 32.7% |
| Based on | The Lorenz curve |
| Area formula | Gini = A ÷ (A + B), where A is the gap between the equality line and the Lorenz curve, and B is the area under the curve |
| Shortcut | Because A + B = 0.5, Gini = 2A = 1 − 2B |
| Recent UK figure | 32.7% for the financial year ending 2025 (ONS) |
| Main limitation | One number cannot show where in the distribution the inequality lies |
| Linked measures | Income share ratios such as top 20% ÷ bottom 20%, and the Palma ratio |
The same calculation can be applied to wealth, consumption, earnings or any other quantity that can be shared out. Wealth, which builds up over a lifetime and can be inherited, is usually shared out more unequally than income, so its Gini coefficient tends to be higher.
In the AQA A level Economics specification, the Lorenz curve and Gini coefficient sit within the distribution of income and wealth. The specification states that students will be expected to interpret measures such as the Gini coefficient but not to calculate it. You can read the full statements on the AQA A level Economics individuals, firms and markets page. Calculating it is still the clearest way to understand what the number means, and university courses often ask you to do it.
What is the Lorenz curve?
The Lorenz curve is the diagram behind the Gini coefficient. It was proposed by the American economist Max Lorenz in a 1905 paper on measuring the concentration of wealth. Picture it in words.
- The horizontal axis shows the cumulative percentage of the population, ranked from poorest to richest, running from 0% to 100%.
- The vertical axis shows the cumulative percentage of total income that those people receive, also from 0% to 100%.
- A straight diagonal line from the origin to the top right corner is the line of perfect equality. On it, the poorest 20% receive 20% of income, the poorest 50% receive 50%, and so on.
- The Lorenz curve itself sags below that diagonal. The further it bows away from the line, the more unequal the distribution.
- The curve always starts at (0%, 0%) and ends at (100%, 100%), because no people receive no income and all the people receive all of it.
Label the area between the diagonal and the curve as A, and the area under the curve as B. Those two labels are all you need for the formula.
How do you calculate the Gini coefficient from the Lorenz curve?
The definition is Gini = A ÷ (A + B). Because both axes run from 0 to 1, the triangle under the line of equality has area ½ × 1 × 1 = 0.5. So A + B = 0.5, which gives two handy shortcuts: Gini = 2A, and Gini = 1 − 2B.
In practice you are usually given income shares for groups, such as quintiles (fifths of the population), and you estimate B by splitting the area under the Lorenz curve into trapeziums.
Example 1: Gini from the two areas
A diagram shows that the area between the line of equality and the Lorenz curve is A = 0.15, and the area under the curve is B = 0.35.
- A + B = 0.15 + 0.35 = 0.5, as expected.
- Gini = A ÷ (A + B) = 0.15 ÷ 0.5 = 0.3.
- Check with the shortcut: 1 − 2B = 1 − 0.70 = 0.3.
A Gini coefficient of 0.3, or 30%, indicates moderate inequality.
Example 2: Gini from quintile income shares
In a country, the five quintiles receive these shares of total income, from poorest to richest: 5%, 10%, 15%, 25% and 45%.
First, build the cumulative shares, which give the points on the Lorenz curve.
| Population (cumulative) | Income share | Income (cumulative) |
|---|---|---|
| 20% | 5% | 5% |
| 40% | 10% | 15% |
| 60% | 15% | 30% |
| 80% | 25% | 55% |
| 100% | 45% | 100% |
Each trapezium has width 0.2, and its area is width × (left height + right height) ÷ 2.
- Sum of each pair of heights: (0 + 0.05) + (0.05 + 0.15) + (0.15 + 0.30) + (0.30 + 0.55) + (0.55 + 1.00) = 0.05 + 0.20 + 0.45 + 0.85 + 1.55 = 3.10.
- B = 0.2 × 3.10 ÷ 2 = 0.31.
- Gini = 1 − 2B = 1 − 0.62 = 0.38.
The trapezium method treats the curve as straight lines between the points, so it slightly underestimates the true curvature. With more groups, such as deciles, the estimate becomes more accurate.
What do Gini values of 0 and 1 actually mean?
The two ends of the scale are useful reference points, even though no real economy sits at either one.
Example 3: perfect equality and extreme inequality
Perfect equality: five people each earn £20,000.
- Each quintile receives 20%, so the cumulative shares are 20%, 40%, 60%, 80% and 100%.
- The Lorenz curve lies exactly on the line of equality, so A = 0 and Gini = 0.
Extreme inequality: five people, where four earn nothing and one earns £100,000.
- Using the mean difference formula explained below, the coefficient is 0.8.
- With five people, the maximum possible value is (5 − 1) ÷ 5 = 0.8.
The theoretical maximum of 1 is only approached as the population becomes very large. In a small group, even complete concentration in one person gives a value below 1, which is worth remembering when you work with small samples.
What is the formula for the Gini coefficient without a Lorenz curve?
When you have individual incomes rather than group shares, you can use the mean absolute difference. Compare every person's income with every other person's income, add up the size of all those differences, then scale the total.
In words: Gini = (sum of the absolute differences between every ordered pair of incomes) ÷ (2 × n² × mean income), where n is the number of people.
Counting ordered pairs means each pair is counted twice, once each way. If you prefer to count each pair once, double the total before dividing, or use n² × mean in the denominator instead of 2 × n² × mean.
Example 4: four incomes, two methods
Four people earn £10,000, £20,000, £30,000 and £40,000. Work in thousands.
Method 1, mean absolute difference:
- Differences for each pair counted once: 10, 20, 30, 10, 20 and 10, which add up to 100.
- Counting each pair both ways gives 200.
- Mean income = 100 ÷ 4 = 25.
- Gini = 200 ÷ (2 × 4² × 25) = 200 ÷ 800 = 0.25.
Method 2, Lorenz curve with quarters:
- Total income is 100, so shares are 10%, 20%, 30% and 40%, and cumulative shares are 10%, 30%, 60% and 100%.
- Sum of each pair of heights: (0 + 0.1) + (0.1 + 0.3) + (0.3 + 0.6) + (0.6 + 1.0) = 0.1 + 0.4 + 0.9 + 1.6 = 3.0.
- B = 0.25 × 3.0 ÷ 2 = 0.375, so Gini = 1 − 0.75 = 0.25.
Both methods give 0.25. With individual data and one point per person, they agree exactly. That makes a good self-check in coursework.
How do transfers and taxes change the Gini coefficient?
A transfer from a richer person to a poorer person, as long as it does not swap their positions in the ranking, always lowers the Gini coefficient. This is one of the properties that make it a sensible measure of inequality. Taxes and benefits work in the same way across a whole population.
Example 5: a single transfer from richer to poorer
Start from Example 4, with incomes of 10, 20, 30 and 40 thousand and a Gini of 0.25. Now £5,000 is transferred from the richest person to the poorest, giving 15, 20, 30 and 35.
- Differences for each pair counted once: 5, 15, 20, 10, 15 and 5, which add up to 70.
- Counting both ways gives 140. Mean income is still 25.
- Gini = 140 ÷ 800 = 0.175.
Total income has not changed, but the coefficient has fallen from 0.25 to 0.175 because the gaps between people are smaller.
Example 6: before and after taxes and benefits
A country's quintile shares of income before taxes and benefits are 3%, 8%, 14%, 25% and 50%. After taxes and benefits they are 7%, 12%, 16%, 23% and 42%.
Before:
- Cumulative shares: 3%, 11%, 25%, 50%, 100%.
- Sum of each pair of heights: 0.03 + 0.14 + 0.36 + 0.75 + 1.50 = 2.78.
- B = 0.2 × 2.78 ÷ 2 = 0.278, so Gini = 1 − 0.556 = 0.444.
After:
- Cumulative shares: 7%, 19%, 35%, 58%, 100%.
- Sum of each pair of heights: 0.07 + 0.26 + 0.54 + 0.93 + 1.58 = 3.38.
- B = 0.2 × 3.38 ÷ 2 = 0.338, so Gini = 1 − 0.676 = 0.324.
Taxes and benefits cut the Gini coefficient by 0.12, from 0.444 to 0.324. This is why statistical agencies often publish several Gini figures for the same year: one for original income, one for disposable income after cash benefits and direct taxes, and sometimes one after indirect taxes and benefits in kind.
What is the Gini coefficient in the UK?
The Office for National Statistics publishes UK income inequality figures from its household surveys. In its release of 2 October 2026, the ONS reported a Gini coefficient of 32.7% for the financial year ending 2025, a fall of 0.2 percentage points on the year before, and described inequality as relatively stable. You can read the release on the ONS average household income and inequality bulletin.
When you quote a figure, always state which income measure it uses, which year it covers and who published it. Government departments, the ONS and international bodies use different surveys and definitions, so their figures for the same country can differ slightly.
Example 7: percentage points versus per cent
The ONS Gini fell from 32.9% to 32.7%.
- Change in percentage points = 32.9 − 32.7 = 0.2 percentage points.
- Change in per cent = 0.2 ÷ 32.9 × 100 = about 0.61%.
In an essay, write that the Gini coefficient fell by 0.2 percentage points. Writing that it fell by 0.2% understates the change, and the two are easy to confuse. Also note that a very small change may be within the margin of error of a survey, so it may not be a meaningful shift.
What are the limitations of the Gini coefficient?
The Gini coefficient is popular because it is simple and comparable. It also has weaknesses that are worth knowing for evaluation questions.
- It hides the shape of inequality. Very different distributions can give the same Gini coefficient, as Example 8 shows.
- It is most sensitive to changes in the middle of the distribution and less sensitive to changes at the very top or bottom.
- It depends on the data. Household surveys can under-record the highest incomes, and results vary with the choice of income measure, the unit (individuals or households) and adjustments for household size.
- It says nothing about whether a distribution is fair. Measuring inequality is a positive question; judging whether it is acceptable involves value judgements.
- It does not show absolute living standards. A poor country and a rich country can share the same Gini coefficient while having very different levels of poverty.
- It can move for demographic reasons. An ageing population, more students or more single-person households can change measured inequality without any change in pay or policy.
Example 8: two distributions with the same Gini coefficient
Distribution X has four incomes of 10, 20, 30 and 40 thousand. Distribution Y has incomes of 5, 25, 35 and 35 thousand. Both have total income 100 and mean 25.
- X: pair differences add up to 100 counted once, so Gini = 200 ÷ 800 = 0.25.
- Y: pair differences are 20, 30, 30, 10, 10 and 0, which add up to 100 counted once, so Gini = 200 ÷ 800 = 0.25.
The coefficients are identical, yet the poorest person in Y has half the income of the poorest person in X. The Lorenz curves cross: Y's cumulative shares are 5%, 30%, 65% and 100%, compared with X's 10%, 30%, 60% and 100%, so Y is lower at the bottom but higher in the upper middle. When Lorenz curves cross, the Gini coefficient alone cannot tell you which distribution is more equal in every sense.
What other measures of inequality are there?
Because the Gini coefficient compresses everything into one number, economists often report it alongside simpler ratios that focus on particular groups.
- Quintile share ratio: the share of income received by the richest 20% divided by the share received by the poorest 20%, sometimes written S80/S20.
- Palma ratio: the share of the richest 10% divided by the share of the poorest 40%. It focuses on the two ends of the distribution, where much of the change in inequality often happens.
- Percentile ratios: for example, the income of the person at the 90th percentile divided by the income of the person at the 10th percentile.
- Poverty measures: the share of people below a set fraction of median income, which focuses on the bottom rather than on the whole spread.
Example 9: quintile and Palma ratios
Using the quintile shares from Example 2, the richest 20% receive 45% and the poorest 20% receive 5%.
- Quintile share ratio = 45 ÷ 5 = 9. The richest fifth receives nine times as much as the poorest fifth.
Suppose the richest 10% receive 30% of income and the poorest 40% receive 15%.
- Palma ratio = 30 ÷ 15 = 2. The top tenth receives twice as much as the bottom four tenths combined.
These ratios are easier to explain to a general reader, which is one reason they often appear in reports next to the Gini coefficient.
Is the Gini index in decision trees the same thing?
No, although the names overlap. In machine learning, decision tree algorithms often use Gini impurity, sometimes also called the Gini index, to choose where to split the data. It measures how mixed the classes are within one group, not how income is distributed across people.
In words: Gini impurity = 1 − (sum of the squared proportions of each class). A group containing only one class has impurity 0. A group split evenly between two classes has impurity 0.5.
Example 10: Gini impurity for a decision tree node
A node in a decision tree contains 10 observations: 6 labelled yes and 4 labelled no.
- Proportions: 6 ÷ 10 = 0.6 and 4 ÷ 10 = 0.4.
- Squares: 0.6² = 0.36 and 0.4² = 0.16.
- Gini impurity = 1 − (0.36 + 0.16) = 1 − 0.52 = 0.48.
A pure node with 10 yes and 0 no would score 1 − 1² = 0. The algorithm prefers splits that produce child nodes with lower impurity. If your search for the Gini index brought you here from a data science course, this is the measure you need, and it is unrelated to the Lorenz curve.
How do you calculate the Gini coefficient with calculus?
At university level, the Lorenz curve is often given as a function L(x), where x is the cumulative share of the population. The area under the curve is then the integral of L(x) from 0 to 1, and the Gini coefficient is 1 minus twice that integral.
For example, if L(x) = x², the integral of x² from 0 to 1 is ⅓, so B = ⅓ and the Gini coefficient is 1 − ⅔ = ⅓, or about 0.333. If L(x) = x³, B = ¼ and the Gini coefficient is ½. A higher power gives a curve that sags further below the line of equality, and so a higher coefficient. If integration techniques are rusty, the integration by parts guide is a useful refresher before you try curves that need more than the power rule.
How do you use the Gini coefficient in an economics essay?
Examiners want more than a definition. A strong answer explains what the number shows, applies it to the data in the question and evaluates what it cannot show.
- Define it precisely, with its range and its link to the Lorenz curve.
- Interpret any figures given: a rise means more inequality, a fall means less, and the size of the change matters.
- Compare carefully. State the year, the income measure and the source, and check that the figures you compare use the same method.
- Explain causes of changes, such as changes in wages, employment, taxes and benefits, asset prices or the make-up of households.
- Evaluate with the limitations above: same Gini but different shapes, survey problems, no judgement of fairness.
- Link to policy: progressive taxes, benefits, minimum wages and spending on education are common ways governments try to influence the distribution of income.
Inequality between and within countries is also a common theme in essays on international trade, where the globalisation guide covers how trade and capital flows can widen or narrow gaps. For wider theory, the economics subject page and the macroeconomics subject page cover distribution, growth and policy.
What mistakes do students make with the Gini coefficient?
- Saying a higher Gini coefficient means more equality. It is the opposite: higher means more unequal.
- Drawing the Lorenz curve above the line of equality. With people ranked from poorest to richest, it always sits on or below the diagonal.
- Forgetting that the triangle under the line of equality has area 0.5, then dividing A by 1 instead of 0.5.
- Mixing scales, for example comparing 0.33 with 35 without saying that one is a decimal and one is a percentage.
- Confusing percentage points with per cent when describing a change.
- Treating income and wealth Gini figures as the same thing.
- Claiming a distribution is unfair because its Gini is high, without recognising that fairness is a value judgement.
Can a tutor help with inequality data and the Gini coefficient?
Gini questions combine economic theory, diagrams and calculation, so students often lose marks in more than one place. An economics tutor can explain the Lorenz curve step by step, model calculations on fresh data sets and give feedback on how you interpret and evaluate figures in essays.
If you are analysing inequality data for a university project, a statistics tutor can show you how to organise the data, compute measures such as the Gini coefficient and quintile ratios, and check your results, while the analysis and write-up stay your own. The SPSS and statistics help page explains how tutors support data analysis, the coursework help page covers support with planning and assessment criteria, and the dissertation support page explains guidance for longer research projects. For the underlying methods, the statistics subject page covers distributions and summary measures.
Frequently asked questions
How should a Gini coefficient of 0.4 be interpreted?
It means income is shared quite unequally. On the Lorenz curve, the gap between the line of equality and the curve takes up 40% of the triangle beneath the line. A value of 0.4 is higher than the recent UK figure of about 0.33, so it would indicate more inequality than in the UK, though comparisons need data on the same income measure.
Is a high or low Gini coefficient better?
Neither is automatically better. A lower value means income is more evenly spread, which many people see as fairer and linked to social cohesion. Some inequality can reflect rewards for skills, effort and risk-taking, which may support growth. Deciding what level is acceptable involves value judgements, which is why economists separate measuring inequality from judging it.
Are the Gini coefficient and the Gini index the same measure?
In economics they usually describe the same measure on different scales. The coefficient is normally written between 0 and 1, while the index is often multiplied by 100, so a coefficient of 0.35 becomes an index of 35. In machine learning, however, the Gini index usually means Gini impurity, which is a different calculation used by decision trees.
Can the Gini coefficient ever be negative or above 1?
For incomes that are zero or positive, no. The value lies between 0 and 1. Negative incomes, such as business losses, can push the calculated value above 1 in unusual data sets, which is one reason analysts check how negative values are treated. For ordinary income data, a result outside 0 to 1 almost always means a calculation error.
Why is the area under the line of equality 0.5?
Both axes of the Lorenz diagram run from 0 to 1, so the line of equality forms a right-angled triangle with a base of 1 and a height of 1. The area of a triangle is half the base times the height, which is 0.5. That is why the Gini coefficient equals twice the area between the line of equality and the Lorenz curve.
Do I need to calculate the Gini coefficient for A level economics?
For AQA A level Economics, the specification says students should interpret measures of inequality such as the Gini coefficient but will not be asked to calculate it. You still need to draw and label a Lorenz curve, explain what changes in the coefficient mean and evaluate its usefulness. Check your own board's specification, because requirements differ, and university courses often do require calculation.
How do I calculate the Gini coefficient in Excel or SPSS?
Sort the incomes from lowest to highest, calculate each person's share and the running cumulative share, then estimate the area under the Lorenz curve with the trapezium rule and subtract twice that area from 1. In larger data sets, the mean absolute difference formula can also be built with formulas or syntax. Always test your method on a small example first.
Does a lower Gini coefficient mean less poverty?
Not necessarily. The Gini coefficient measures relative spread, not absolute living standards. A country can have a low Gini coefficient while most people are poor, and another can have a higher Gini coefficient while even its poorest households have relatively high incomes. Poverty is measured separately, for example by the share of people below a fraction of median income.
Why might the Gini coefficient rise when wages are growing?
If higher earners' pay grows faster than lower earners' pay, inequality rises even though everyone is better off in money terms. Changes in employment, investment income, housing costs and household make-up can also push the measure up. It tracks relative gaps, so it can rise during a period of growth and fall during a recession.
Which countries have the highest Gini coefficients?
Some of the highest measured income Gini coefficients are found in parts of southern Africa and Latin America, while many Nordic and central European countries have some of the lowest. Exact rankings change from year to year and depend on whether the figure uses income or consumption, so use the latest data from a single international source when making comparisons.
Who invented the Gini coefficient and the Lorenz curve?
The Lorenz curve was proposed by the American economist Max Lorenz in 1905, in a paper on measuring the concentration of wealth. The Italian statistician Corrado Gini published his measure of variability in 1912 and later connected it to the area between the Lorenz curve and the line of equality, which is how the two ideas are usually taught together.
Can two countries with the same Gini coefficient have different inequality?
Yes. Very different distributions can produce the same coefficient, especially when their Lorenz curves cross. One country might have a very poor bottom group but a compressed middle, while another has a richer bottom group but a very rich top. Looking at the full Lorenz curve or at ratios such as the Palma ratio shows these differences.
Is wealth inequality measured in the same way as income inequality?
The same Lorenz curve and Gini coefficient can be used, but the results are usually much higher for wealth. Wealth builds up over time through saving, property, pensions and inheritance, so it is concentrated more heavily than annual income. Some households also have negative net wealth because of debts, which needs careful handling in the calculation.
Want a subject expert to help with this?
Book a tutor →Money-Back Guarantee
Full refund if we miss the agreed deadline, can't find a suitable expert, or major errors can't be fixed by revision.
How the money-back guarantee works →100% Confidential
Your identity, order details and institution are never shared with any third party.
How we keep your order confidential →Deadline-Backed Delivery
Every order has an agreed deadline. If we don't deliver by it, you can claim a full refund.
Read the refund policy →Get started today
Ready to get expert help?
Tell us what you need and get matched with a tutor who teaches your subject. Delivered on time, every time.
