Instant PDF download, name-and-email checkout. Complete bundle: every Economics, Statistics and Mathematics book
Mathematics

The Gini Coefficient Formula: Lorenz Curves and Area Between Curves

Measure inequality with calculus: find the Gini coefficient as the area between the line of equality and a Lorenz curve, step by step.

In 30 seconds
  • A Lorenz curve \( L(x) \) gives the share of total income earned by the poorest fraction \( x \) of people. Perfect equality is the straight line \( L(x) = x \).
  • The Gini coefficient measures the gap between the two: it is the area between \( y = x \) and \( L(x) \), divided by the area of the whole triangle under \( y = x \).
  • The Gini coefficient formula for a fitted curve is \( G = 1-2\displaystyle\int_0^1 L(x)\,dx \). It runs from 0 (everyone equal) to 1 (one person has everything).
  • For \( L(x) = x^2 \), \( G = \tfrac{1}{3} \); for \( L(x) = x^3 \), \( G = \tfrac{1}{2} \). In general \( L(x) = x^n \) gives \( G = \dfrac{n-1}{n+1} \).
  • Exam point: this is just “area between two curves” with an economics label. Set up top curve minus bottom curve, integrate, then double.

The case: did the island’s reform reduce inequality?

Imagine a small island economy (an invented example, with made-up curves). Its statistics office lines everyone up from poorest to richest and records what share of total income each cumulative group earns. Before a tax-and-transfer reform, the data fitted the Lorenz curve \( L(x) = x^3 \). Two years after the reform, the best fit is \( L(x) = x^2 \).

Reading the curves at \( x = 0.5 \): before the reform the poorest half earned \( 0.5^3 = 0.125 \), or 12.5% of all income. Afterwards they earn \( 0.5^2 = 0.25 \), or 25%. That looks like a big change, but one point on a curve is not the whole story. The finance minister wants a single number for the whole distribution: what was the Gini coefficient before and after, and by how much did it fall?

The concept: inequality as an area

Plot cumulative share of people on the horizontal axis and cumulative share of income on the vertical axis, both from 0 to 1. If everyone earned the same, the poorest 10% would earn 10% of income, the poorest 50% would earn 50%, and so on. That is the line of equality, \( y = x \).

Real Lorenz curves sag below that line, because the poorest 50% earn less than 50%. The more unequal the income, the further the curve sags. So the size of the gap between the line and the curve is a natural measure of inequality. Max Lorenz introduced the curve in 1905[1], and Corrado Gini turned the gap into a single number in 1912[2].

Every Lorenz curve has the same basic shape. It starts at \( (0, 0) \) and ends at \( (1, 1) \), it never goes down (adding more people cannot reduce the income they hold together), and it is concave up, because each extra person added is at least as rich as the last.

Key termGini coefficient: the area between the line of equality and the Lorenz curve, divided by the total area under the line of equality. It is 0 for perfect equality and approaches 1 when almost all income goes to one person.

The formula

Call the gap between the line and the curve \( A \), and the area under the curve \( B \). Together they fill the triangle under \( y = x \), which has area \( \tfrac{1}{2} \). So

\[ G = \frac{A}{A + B} = \frac{A}{1/2} = 2A \]

The gap \( A \) is an area between two curves, with \( y = x \) on top:

\[ A = \int_0^1 \big(x-L(x)\big)\,dx \]

Since \( \int_0^1 x\,dx = \tfrac{1}{2} \), the two lines combine into the version most people use:

\[ G = 1-2\int_0^1 L(x)\,dx \]

Here \( x \) is the cumulative share of the population (from 0 to 1), \( L(x) \) is the cumulative share of income held by that group, and \( \int_0^1 L(x)\,dx \) is the area \( B \) under the Lorenz curve[3].

Mathematics Made Simple textbook coverChapter 15 of Mathematics Made Simple covers areas between curves, with an economics appendix for welfare and inequality.Get the textbook · $12

Why this formula fits the case

The minister asked for a single number that reflects the whole distribution, not just the poorest half. An integral adds up the gap at every point from \( x = 0 \) to \( x = 1 \), so it does exactly that. Dividing by the triangle’s area makes the answer a pure number between 0 and 1, so countries, years or regions of very different sizes can be compared.

It is also an honest limitation. The Gini coefficient compresses a curve into one number, and two very different curves can enclose the same area. If the question is “how are the poorest 20% doing?”, read the Lorenz curve at \( x = 0.2 \) instead. And the formula needs a Lorenz curve: real data come in groups (deciles or quintiles), so you either fit a curve or estimate the area numerically, as in Q4 below.

Setting it up

  • Before the reform: \( L(x) = x^3 \) on \( 0 \le x \le 1 \). Check: \( L(0) = 0 \) and \( L(1) = 1 \).
  • After the reform: \( L(x) = x^2 \) on \( 0 \le x \le 1 \). Again \( L(0) = 0 \) and \( L(1) = 1 \).
  • Top and bottom curves: on \( 0 < x < 1 \), \( x^3 < x^2 < x \), so the line of equality is on top in both cases.
  • Units: both axes are fractions, so areas and \( G \) have no units.

Solving it

Worked example

Find the Gini coefficient of the island before and after the reform.

Step 1Before: area under the curve \( B = \displaystyle\int_0^1 x^3\,dx = \left[\tfrac{x^4}{4}\right]_0^1 = \tfrac{1}{4} \).
Step 2\( G_{\text{before}} = 1-2 \times \tfrac{1}{4} = \tfrac{1}{2} = 0.5 \).
Step 3After: \( B = \displaystyle\int_0^1 x^2\,dx = \left[\tfrac{x^3}{3}\right]_0^1 = \tfrac{1}{3} \).
Step 4\( G_{\text{after}} = 1-2 \times \tfrac{1}{3} = \tfrac{1}{3} \approx 0.333 \).
Step 5Check with the gap: \( A = \displaystyle\int_0^1 (x-x^2)\,dx = \tfrac{1}{2}-\tfrac{1}{3} = \tfrac{1}{6} \), and \( 2A = \tfrac{1}{3} \). It agrees.
Step 6Change: \( \tfrac{1}{2}-\tfrac{1}{3} = \tfrac{1}{6} \approx 0.167 \), which is a fall of one third of the original value.

The Gini coefficient fell from 0.5 to about 0.333. The same pattern gives a shortcut for any power curve: \( \int_0^1 x^n\,dx = \dfrac{1}{n+1} \), so \( G = 1-\dfrac{2}{n+1} = \dfrac{n-1}{n+1} \). With \( n = 3 \) that is \( \tfrac{2}{4} \) and with \( n = 2 \) it is \( \tfrac{1}{3} \).

Exam questions often use a curve that needs a proper integration technique. Here is one that needs integration by parts.

Worked example

A neighbouring island’s Lorenz curve is modelled by \( L(x) = xe^{x-1} \) for \( 0 \le x \le 1 \). Show that it behaves like a Lorenz curve, find the exact Gini coefficient, and find the income share of the poorest half.

Step 1Endpoints: \( L(0) = 0 \times e^{-1} = 0 \) and \( L(1) = 1 \times e^{0} = 1 \).
Step 2Shape: \( L'(x) = e^{x-1}(1 + x) > 0 \) and \( L”(x) = e^{x-1}(x + 2) > 0 \), so the curve rises and is concave up.
Step 3By parts with \( u = x \), \( dv = e^{x-1}dx \): \( \displaystyle\int_0^1 xe^{x-1}\,dx \) equals \( \Big[xe^{x-1}\Big]_0^1-\displaystyle\int_0^1 e^{x-1}\,dx \).
Step 4\( = 1-\Big[e^{x-1}\Big]_0^1 = 1-\left(1-e^{-1}\right) = \dfrac{1}{e} \).
Step 5\( G = 1-\dfrac{2}{e} \approx 1-0.7358 = 0.264 \) (3 s.f.).
Step 6Poorest half: \( L(0.5) = 0.5e^{-0.5} \approx 0.303 \), so about 30.3% of income.

With \( G \approx 0.264 \) and the poorest half on about 30%, this island is more equal than our first island even after its reform.

Mathematics Made Simple Practice Questions coverPractise areas between curves and fitted Lorenz curves with 1,565 fully worked questions and two mock papers.Get 1,565 questions · $9

What the answer tells us

The reform cut the Gini coefficient from 0.5 to about 0.33. In the picture, the gap between the line of equality and the curve shrank from \( \tfrac{1}{4} \) to \( \tfrac{1}{6} \) of the unit square. The poorest half doubled its share from 12.5% to 25%, and at the top end the richest 10% now hold \( 1-0.9^2 = 0.19 \), or 19% of income, down from \( 1-0.9^3 = 0.271 \), or 27.1%.

Reasonableness checks. Both answers lie between 0 and 1, as any Gini coefficient must. The curve \( x^3 \) sits below \( x^2 \) everywhere, so it should give the larger Gini, and it does. If you ever get a negative Gini, you have the curves the wrong way round; if you get more than 1, you have probably forgotten that the triangle’s area is \( \tfrac{1}{2} \), not 1.

Sensitivity. The formula \( G = \dfrac{n-1}{n+1} \) shows how quickly inequality rises with the power. \( n = 1 \) gives 0 (equality), \( n = 4 \) gives 0.6, and as \( n \) grows the curve hugs the bottom and right edges and \( G \) approaches 1.

Lorenz curves L(x) = x² and L(x) = x³ against the line of equality
line of equality y = xafter reform: L(x) = x² (G = 1/3)before reform: L(x) = x³ (G = 1/2)
0.20.40.60.810.20.40.60.810x (cumulative share of people)L (share of income)(0.5, 0.25)(0.5, 0.125)area A
Figure 1. The shaded gap between the line of equality and L(x) = x² has area 1/6. The Gini coefficient is that gap divided by the whole triangle (area ½), so G = 1/3. Illustrative island economy.
Common mistakeReporting the area \( A \) as the Gini coefficient. For \( L(x) = x^2 \), \( A = \tfrac{1}{6} \approx 0.167 \), but \( G = \tfrac{1}{3} \). The Gini coefficient compares the gap with the triangle of area \( \tfrac{1}{2} \), so you must double \( A \). Writing \( G = 1-2\int_0^1 L(x)\,dx \) at the start of your answer makes this hard to forget.
Common mistakeAssuming the same Gini means the same distribution. The curve \( L(x) = \tfrac{4}{9}x + \tfrac{5}{9}x^4 \) also has \( G = \tfrac{1}{3} \), because \( \int_0^1 L(x)\,dx = \tfrac{2}{9} + \tfrac{1}{9} = \tfrac{1}{3} \). Yet it crosses \( x^2 \) at about \( x = 0.525 \). Under it the poorest 20% hold about 9.0% (against 4% under \( x^2 \)), and the richest 20% hold about 41.7% (against 36%). The middle is squeezed. One number cannot show that.
Exam tipArea between curves is AP Calculus topic 8.4[4], Cambridge 9709 Paper 1 section 1.8 (with harder integrals such as by parts in Paper 3)[5], and IB Mathematics: analysis and approaches SL 5.11. Examiners rarely say “Lorenz curve”, but they love a context question. Always state which curve is on top on the interval, write the integral of (top − bottom) before integrating, and give an exact answer such as \( 1-\tfrac{2}{e} \) before the decimal.

The full method, from Riemann sums to areas, volumes and economics applications, is developed in the Mathematics Made Simple textbook, with Appendix B covering mathematics for economists.

Mathematics Made Simple bundle coverGet both Mathematics Made Simple books for $16 and save $5: every integration topic, explained and drilled.Both books · $16

Practice questions

Try each on paper first. For hundreds more integration questions at exam standard, see the Mathematics Made Simple practice book.

EasyQ1. Find the Gini coefficient for the Lorenz curve \( L(x) = x^4 \). Show worked answer
\( \displaystyle\int_0^1 x^4\,dx = \left[\tfrac{x^5}{5}\right]_0^1 = \tfrac{1}{5} \).
\( G = 1-2 \times \tfrac{1}{5} = \tfrac{3}{5} = 0.6 \).
Check with the shortcut: \( \dfrac{n-1}{n+1} = \dfrac{3}{5} \).
EasyQ2. For the Lorenz curve \( L(x) = x^2 \), what share of income goes to the richest 10% of people? Show worked answer
The poorest 90% hold \( L(0.9) = 0.9^2 = 0.81 \), or 81%.
So the richest 10% hold \( 1-0.81 = 0.19 \), or 19% of income.
MediumQ3. A Lorenz curve is \( L(x) = \tfrac{1}{2}(x + x^2) \). Find the Gini coefficient and the share of income held by the poorest half. Show worked answer
Check: \( L(0) = 0 \), \( L(1) = \tfrac{1}{2}(1 + 1) = 1 \).
\( \displaystyle\int_0^1 \tfrac{1}{2}(x + x^2)\,dx = \tfrac{1}{2}\left(\tfrac{1}{2} + \tfrac{1}{3}\right) = \tfrac{5}{12} \).
\( G = 1-2 \times \tfrac{5}{12} = \tfrac{1}{6} \approx 0.167 \).
Poorest half: \( L(0.5) = \tfrac{1}{2}(0.5 + 0.25) = 0.375 \), or 37.5%.
MediumQ4. Illustrative survey data: the poorest 20%, 40%, 60% and 80% of households earn 6%, 17%, 33% and 55% of income. Use the trapezium rule with these five strips to estimate the Gini coefficient. Is your estimate too high or too low? Show worked answer
Points: \( L = 0, 0.06, 0.17, 0.33, 0.55, 1 \) at \( x = 0, 0.2, \dots, 1 \), with \( h = 0.2 \).
Area \( \approx \tfrac{0.2}{2}\big[0 + 2(1.11) + 1\big] \), where \( 1.11 = 0.06 + 0.17 + 0.33 + 0.55 \).
So the area is \( 0.1 \times 3.22 = 0.322 \).
\( G \approx 1-2 \times 0.322 = 0.356 \).
A Lorenz curve is concave up, so each straight chord lies above it and the trapezium rule overestimates the area under the curve. The Gini estimate is therefore slightly too low.
ExamQ5. A Lorenz curve is modelled by \( L(x) = \dfrac{e^{2x}-1}{e^{2}-1} \) for \( 0 \le x \le 1 \). (a) Verify that \( L(0) = 0 \) and \( L(1) = 1 \). [1] (b) Show that the Gini coefficient is \( \dfrac{2}{e^2-1} \), and evaluate it to 3 significant figures. [4] (c) Show that the poorest half of the population earns a fraction \( \dfrac{1}{e + 1} \) of income. [2] (d) For the model \( L(x) = \dfrac{e^{kx}-1}{e^{k}-1} \), the Gini coefficient is \( 1-\dfrac{2}{k} + \dfrac{2}{e^k-1} \). Find it for \( k = 4 \) and comment. [2] Show worked answer
(a) \( L(0) = \dfrac{1-1}{e^2-1} = 0 \) and \( L(1) = \dfrac{e^2-1}{e^2-1} = 1 \) [1].
(b) \( \displaystyle\int_0^1 (e^{2x}-1)\,dx = \left[\tfrac{1}{2}e^{2x}-x\right]_0^1 \) [1] \( = \tfrac{1}{2}e^2-1-\tfrac{1}{2} \), which is \( \dfrac{e^2-3}{2} \) [1]. So \( \displaystyle\int_0^1 L\,dx = \dfrac{e^2-3}{2(e^2-1)} \) and \( G = 1-\dfrac{e^2-3}{e^2-1} = \dfrac{2}{e^2-1} \) [1]. Numerically \( G \approx 0.313 \) [1].
(c) \( L(0.5) = \dfrac{e-1}{e^2-1} \) [1], and since \( e^2-1 = (e-1)(e + 1) \), this is \( \dfrac{1}{e + 1} \approx 0.269 \) [1].
(d) \( G = 1-0.5 + \dfrac{2}{e^4-1} \approx 0.537 \) [1]. A larger \( k \) bends the curve further below the line of equality, so it describes a more unequal distribution [1].

Frequently asked questions

What is the Gini coefficient formula?

For a Lorenz curve \( L(x) \) on \( [0, 1] \), \( G = 1-2\int_0^1 L(x)\,dx \). Equivalently, \( G \) is twice the area between the line of equality \( y = x \) and the Lorenz curve.

Why do we multiply the area by 2?

The Gini coefficient compares the gap with the largest possible gap, which is the whole triangle under \( y = x \). That triangle has area \( \tfrac{1}{2} \), and dividing by \( \tfrac{1}{2} \) is the same as multiplying by 2.

Can the Gini coefficient be negative or bigger than 1?

Not for a genuine Lorenz curve, which always lies on or below \( y = x \). A negative answer means the curves are the wrong way round in your integral; an answer above 1 usually means the factor of 2 has been applied twice or the curve does not end at \( (1, 1) \).

Is a lower Gini coefficient always better?

It always means a more equal distribution of the measured quantity, but whether that is “better” is a question of values and policy, not mathematics. As the second common mistake shows, two societies with the same Gini can treat their poorest and richest groups very differently.

References

  1. Lorenz, M. O. (1905) ‘Methods of measuring the concentration of wealth’, Publications of the American Statistical Association, 9(70), pp. 209–219.
  2. Gini, C. (1912) Variabilità e mutabilità. Bologna: Tipografia di Paolo Cuppini.
  3. Strang, G. and Herman, E. (2016) Calculus Volume 1, Section 6.1 Areas between Curves. Houston: OpenStax. https://openstax.org/details/books/calculus-volume-1
  4. College Board. AP Calculus AB and AP Calculus BC Course and Exam Description. apcentral.collegeboard.org
  5. Cambridge International. Cambridge International AS & A Level Mathematics 9709: Syllabus for 2026 and 2027. cambridgeinternational.org
Mathematics Made Simple complete bundle cover
This topic has a full chapter in Mathematics Made Simple, with 1,565 fully worked practice questions in the bundle.Mathematics Made Simple Complete Bundle — Textbook + 1,565 Practice Questions
Get it for $16
E

The EconTutorials team writes clear, exam-focused lessons in economics and statistics for A-Level, IB, AP and university students, with more than 13 years of classroom teaching behind every guide and book in the Made Simple series.