Skip to content

Gini Coefficient Calculator

Calculate the Gini coefficient from a list of incomes or from quintile or decile shares, with the Lorenz curve, Palma ratio and the top 10% and bottom 40% shares.

Calculator Details

Gini coefficient:0.299See results ↓

Income shares of equal-sized groups (quintiles or deciles), or a list of individual incomes

From the poorest group to the richest, e.g. 5 quintile or 10 decile shares; they are rescaled to total 100%.

Your Results

Gini coefficient: 0.299

Gini coefficient

0.299

10 groups

Palma ratio

1.12

Top 10% share ÷ bottom 40% share

Top 10% share

23.3%

Top 20%: 38.1%

Bottom 40% share

20.8%

Bottom 20%: 7.5%

S80/S20 ratio

5.08

Top 20% ÷ bottom 20%

Canada’s 2024 after-tax income deciles (Statistics Canada). The official Gini from the full survey data is 0.305; a Gini from 10 groups is a little lower because it ignores differences within each decile.
The shares add up to 99.9%; they were rescaled to 100%.

The Gini coefficient is 0.299 (0 = everyone has the same, 1 = one person has everything). The top 10% receive 23.3% of income and the bottom 40% 20.8%, a Palma ratio of 1.12.

Compare scenarios

Save these inputs as a scenario, change them, and compare the results side by side.

Loading, available in a moment

Lorenz curve

Lorenz curve

Detailed Breakdown

Income shares and the Lorenz curve
Group (poorest first)Share of incomeCumulative peopleCumulative income
Group 1 of 102.7%10%2.7%
Group 2 of 104.8%20%7.5%
Group 3 of 106.1%30%13.6%
Group 4 of 107.2%40%20.8%
Group 5 of 108.3%50%29.1%
Group 6 of 109.5%60%38.6%
Group 7 of 1010.8%70%49.4%
Group 8 of 1012.4%80%61.9%
Group 9 of 1014.8%90%76.7%
Group 10 of 1023.3%100%100%

How This Calculator Works

How it's calculated

G = 1 − Σ (Xⱼ − Xⱼ₋₁)(Yⱼ + Yⱼ₋₁) over the Lorenz points

Palma = top 10% share ÷ bottom 40% share

Your numbers: 10 groups, each 10% of people. Adding the trapezoids under the Lorenz curve and subtracting from 1 gives G = 0.2992. Palma = 23.3% ÷ 20.8% = 1.12.

Frequently Asked Questions

What is the Gini coefficient?

A number from 0 to 1 that measures how unequally income (or wealth) is shared. 0 means everyone has the same; 1 means one person has everything. It equals twice the area between the Lorenz curve and the line of equality, or the average difference between every pair of incomes divided by twice the mean.

What is Canada’s Gini coefficient?

Statistics Canada puts it at 0.305 for adjusted after-tax income in 2024, 0.351 for total income (after transfers, before tax) and 0.436 for market income (before taxes and transfers). Taxes and transfers such as the Canada Child Benefit and GST/HST credit lower measured inequality by about 0.13.

Why does the calculator show a lower Gini than Statistics Canada for the same year?

The default uses the ten published decile shares, so it treats everyone inside a decile as having the same income. That hides the inequality within each decile, so the grouped Gini (0.299) is a little below the official 0.305, which Statistics Canada computes from the survey’s individual records.

What is a Lorenz curve?

A plot of the share of total income received by the poorest x% of people. With perfect equality it is the diagonal line; the more unequal the distribution, the further it sags below. In Canada’s 2024 after-tax data, the poorest 40% received 20.8% of income.

What is the Palma ratio?

The income share of the richest 10% divided by the share of the poorest 40%. It focuses on the two ends of the distribution, where most changes in inequality happen, while the middle’s share tends to be stable. Canada’s 2024 decile data give 1.12.

Should I use the n ÷ (n − 1) correction?

Use it when your incomes are a small sample from a larger population: the basic formula can never reach 1 with n people (its maximum is (n − 1)/n), and the correction removes that bias. For a whole population, or for grouped shares, leave it off. With large samples the difference is negligible.

Can the Gini coefficient measure wealth?

Yes, the formula works for any non-negative amounts: wealth, sales by firm or employees’ pay. Wealth is much more unequal than income, so wealth Ginis are typically 0.6 or more. This calculator needs values of 0 or more; negative net worth needs a different treatment.

The Gini coefficient from a list of non-negative values (mean absolute difference form, with an optional n ÷ (n − 1) correction) or from the income shares of equal-sized groups (trapezoid rule on the Lorenz curve, a lower bound because within-group inequality is ignored), with shares read off the Lorenz curve by linear interpolation (Cowell, Measuring Inequality). The default is Canada's 2024 adjusted after-tax income deciles from Statistics Canada, a dated example. Not included: weights or equivalence scales, negative incomes, groups of unequal size, confidence intervals, and other indices (Theil, Atkinson, coefficient of variation).

Gini Coefficient Calculator: Incomes, Quintiles, Lorenz Curve

By FindMySum · Last reviewed

The Gini coefficient is the most widely used single measure of inequality. It condenses a whole distribution of incomes, or of wealth, into one number between 0 and 1. At 0 everyone has the same income; at 1 one person has it all. This calculator works it out either from a list of individual incomes or from the income shares of equal-sized groups such as quintiles or deciles, the form in which statistical agencies publish distributions. It draws the Lorenz curve and gives the shares held by the bottom 40% and the top 10%, the Palma ratio and the S80/S20 ratio.

The Lorenz curve

Line everyone up from the lowest income to the highest. The Lorenz curve plots, for each share of people counted from the bottom, the share of total income they receive. If incomes were equal, the poorest 40% would have 40% of income and the curve would be the diagonal line of equality. In practice it sags below the diagonal: the bottom 40% have less than 40%, and the top 10% more than 10%.

The Gini coefficient is the area between the line of equality and the Lorenz curve, divided by the whole area under the diagonal. Since that triangle has an area of one half, the Gini is twice the area between the two lines.

Gini from a list of incomes

For individual values the calculator uses the mean absolute difference: take the absolute difference between every pair of incomes, average it, and divide by twice the mean.

G = Σᵢ Σⱼ |xᵢ − xⱼ| ÷ (2 n² μ)

For the incomes 1, 2, 3, 4 and 5, the differences between all 25 ordered pairs add up to 40, and the mean is 3, so G = 40 ÷ (2 × 25 × 3) = 0.267. With this formula even total inequality only reaches (n − 1) ÷ n, 0.75 for four people, so analysts working with small samples multiply by n ÷ (n − 1). That correction is in the advanced options; it makes the five-income example 0.333.

Gini from quintile or decile shares

Agencies rarely release individual data. Instead they publish the share of income going to each fifth (quintile) or tenth (decile) of the population. Those shares give points on the Lorenz curve, and the calculator joins them with straight lines and measures the area with the trapezoid rule:

G = 1 − Σ (Xⱼ − Xⱼ₋₁)(Yⱼ + Yⱼ₋₁)

where X is the cumulative share of people and Y the cumulative share of income. Because it treats everyone inside a group as equal, a Gini from grouped data is a little lower than one from the underlying records. With more groups, the difference shrinks.

Worked example: Canada's after-tax income, 2024

The calculator opens on Statistics Canada's decile shares of adjusted after-tax income for 2024, from the poorest tenth to the richest: 2.7, 4.8, 6.1, 7.2, 8.3, 9.5, 10.8, 12.4, 14.8 and 23.3%. The published shares add up to 99.9% because of rounding, so the calculator rescales them to 100%.

  • Bottom 40%: 2.7 + 4.8 + 6.1 + 7.2 = 20.8%, or 20.82% after rescaling.
  • Top 10%: 23.3%, or 23.32% after rescaling.
  • Palma ratio: 23.32 ÷ 20.82 = 1.12. The richest tenth receive slightly more income than the poorest four tenths combined.
  • S80/S20: the top fifth's 38.1% divided by the bottom fifth's 7.5% gives 5.08.
  • Gini from the ten deciles: 0.299. Statistics Canada's official after-tax Gini for 2024, computed from the survey records, is 0.305.

Before taxes and government transfers, the market-income Gini is 0.436. The tax and transfer system narrows it to 0.305, one of the clearest measures of what redistribution does.

Choosing a measure

The Gini coefficient is most sensitive to changes in the middle of the distribution. The Palma ratio was proposed because the middle half of the population tends to receive about half of income in most countries, so differences in inequality come mainly from the top 10% and the bottom 40%. The OECD publishes the Gini, S80/S20 and Palma ratios side by side. When comparing figures, check that they use the same income concept (market, total or after-tax income), the same unit (persons, families or households) and the same adjustment for household size, because each choice changes the result.

More questions

What is the difference between the Gini coefficient and the Gini index?

They are the same measure on different scales. The coefficient runs from 0 to 1; the index is the coefficient times 100, so a Gini coefficient of 0.30 is a Gini index of 30. The World Bank publishes the index; Statistics Canada and the OECD publish the coefficient.

Is a lower Gini coefficient always better?

It depends on what you value. A low Gini means income is shared evenly, but it says nothing about how high incomes are: two countries can have the same Gini at very different living standards. Most economists read it alongside median income and poverty rates.

Why do Gini coefficients for Canada differ between sources?

They use different income concepts (market, total or after-tax), units (individuals, families or households), equivalence scales and surveys. Statistics Canada's official series adjusts household income for household size and counts every person. The OECD's figure for Canada uses a similar method, but other sources can give values a few hundredths apart.

Can two different distributions have the same Gini coefficient?

Yes. Lorenz curves that cross can enclose the same area: one society may have a poorer bottom and a less dominant top than another, yet both score the same. That is why the calculator also shows the shares of the bottom 40% and top 10%, and the Palma ratio.

How do I calculate a Gini coefficient in Excel?

Sort the incomes from smallest to largest in A1:A(n), put 1 to n in B1:B(n), and use = 2 * SUMPRODUCT(A1:An, B1:Bn) / (n * SUM(A1:An)) - (n + 1) / n, with n replaced by the number of incomes. That is the sorted form of the mean absolute difference formula and gives the same result as this calculator in list mode without the correction.

Sources

This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy