Draw the poorest-to-richest income share as a curve. Perfect equality is the diagonal; real distributions sag below it, and the sag — the area between the curve and the line — IS the Gini coefficient. Slide (or tap) to level the distribution and watch the curve rise to meet the line and the Gini fall to zero.
The Lorenz curve and the exact Gini coefficient, computed live. Sort n incomes ascending; the Gini is G = (2·Σ i·xᵢ)/(n·Σxᵢ) − (n+1)/n — twice the area between the Lorenz curve and the equality diagonal. G=0 is perfect equality (curve on the line), G→1 is one person owning everything. The slider levels every income toward the mean (a chain of rich→poor transfers); a fail-loud self-check throws unless G≈0 at full equality and G>0.4 for the unequal base.
The 10-person base distribution is a fixed illustrative sample; real Gini is estimated from binned survey data with its own error. The Lorenz area and the Gini formula are exact.