Arte SheetsLearn. Try. Understand.

Statistical

Gini Coefficient formula: measure income inequality & customer whale concentration

Calculate a rounded empirical Gini coefficient for five nonnegative observations and compare it with the largest observation share.

Quantify Lorenz-curve inequality and B2B customer concentration risk

Gini summarizes inequality among the included observations. Here every customer is one equally weighted observation. For n observations the uncorrected empirical formula has maximum (n-1)/n, so for five customers the maximum is 0.8, not 1.

For n non-negative values sorted ascending (x_1 <= x_2 <= ... <= x_n) with rank index i = 1..n, the exact algebraic Gini formula is G = (2 * SUM(i * x_i)) / (n * SUM(x)) - (n + 1) / n. Pairing SEQUENCE(n) with SORT(B2:B6) inside SUMPRODUCT computes Gini directly from unsorted raw data without a single helper column!

Distribution Scenario (n = 5, Total = $200k)Sorted Values ($k)SUM(i * x_i)Exact Gini Coefficient
Perfect Equality[40, 40, 40, 40, 40]600G = 0.0000 (Zero inequality)
Moderate Whale Skew[10, 20, 30, 40, 100]800G = 0.4000 (Top client = 50% ARR)
Single-Customer Monopoly[0, 0, 0, 0, 200]1000G = 0.8000 ((n-1)/n finite max)

Single-cell Gini Coefficient on unsorted values

B2:B6 can be in any order; SORT(B2:B6) aligns values ascending against ranks 1..n from SEQUENCE(n).

All five cells must be numeric and nonnegative, with positive total. This formula includes genuine zeros but rejects missing values. It uses the uncorrected empirical definition; multiplying by n/(n-1) gives a different finite-sample normalization and should be labeled separately.

=IF(OR(COUNT(B2:B6)<>5,MIN(B2:B6)<0,SUM(B2:B6)<=0),"Invalid distribution",LET(n, ROWS(B2:B6), ROUND((2 * SUMPRODUCT(SEQUENCE(n), SORT(B2:B6))) / (n * SUM(B2:B6)) - (n + 1) / n, 4)))

Top-1 customer revenue concentration share (%)

The largest share complements Gini but does not measure all business risk. There is no universal 20% threshold implied by this example. Customer grouping, contract duration and revenue definitions also matter.

=IF(OR(COUNT(B2:B6)<>5,MIN(B2:B6)<0,SUM(B2:B6)<=0),"Invalid distribution",ROUND(MAX(B2:B6) / SUM(B2:B6), 4))

Try the example

Use the original values or change them to test your understanding.

Further reading