Whether income is shared fairly is a question an economist asks of a household survey, an HR specialist asks of a pay scale and a policymaker asks of a support programme. The Gini coefficient is the best-known measure of that inequality, but on its own it does not show where the gap sits, so this tool reports quintile shares and the Palma ratio alongside it.
The coefficient is computed with the mean-difference formula on values sorted from lowest to highest: G = (2 × Σ rank × value) ÷ (n × Σ values) − (n + 1) ÷ n, as set out in the World Bank handbook on poverty and inequality by Haughton and Khandker. Zero means everyone has the same income; values near 1 mean income is held by a few. Shares come from the Lorenz curve, and the Palma ratio proposed by Cobham and Sumner divides the top 10% share by the bottom 40% share.
The default list has ten incomes: 2,500, 3,200, 4,100, 4,800, 5,200, 6,100, 7,400, 9,000, 12,500 and 25,000, totalling 79,800. The Gini comes out at 0.3769. The poorest fifth receives 7.14% of income, followed by 11.15%, 14.16% and 20.55%, while the richest fifth takes 46.99%. The bottom 40% hold 18.3%; the top 10%, here just the single highest income, hold 31.33%, so the Palma ratio is 1.71.
Read the two figures together. The Gini summarises inequality across the whole distribution, while the Palma ratio looks at the tails, where most real-world change happens. In the example the top tenth earns roughly 1.7 times what the bottom 40% earn combined, a picture that speaks to decision-makers more clearly than an abstract 0.38.
Small samples are very sensitive: one extreme value, like the 25,000 in the example, moves the coefficient a great deal. Do not compare a company pay Gini with a national figure, pre-tax income with post-transfer income, or household with individual income. The tool drops negative values, so treat any losses in your data before you paste them.