A simple idea: what if the math used to measure income inequality could help a grocery store decide which products deserve more shelf space — and which ones should be cut? This is that idea, fully worked out.
Imagine you work at a grocery store and you manage the Snack Aisle. You carry 10 different chip brands. At the end of the month, your boss asks: "Is your category healthy? Are we making money? Should we add more products or cut some?"
The obvious answer is to look at total sales. But here's the problem — total sales hide the story underneath. What if 9 out of your 10 chip brands barely sold anything, and all your sales came from just one brand?
"Think of it like a class where one student aces every test and everyone else fails. The class average might look okay — but the class is not healthy."
That's the problem I wanted to solve. And the tool I used to solve it? An economics concept called the Gini coefficient.
The Gini coefficient was invented by an Italian statistician named Corrado Gini in 1912. Economists use it to measure inequality — specifically, how evenly or unevenly something is distributed across a group.
It gives you a number between 0 and 1:
The key ideaIn income economics, a Gini of 1.0 means one person earns all the money. In retail, a Gini of 1.0 means one SKU (product) drives all your sales. Both are risky — you're dangerously dependent on just one thing.
The formula looks like this:
Don't worry if the formula looks intimidating — we're going to walk through it step by step with real example data in the next section.
Let's pretend you manage the Salty Snacks category at a grocery store. You carry 8 products (SKUs). Here is one month of data for each product:
| SKU | Product | Sales ($) | Units Sold | Gross Profit ($) |
|---|---|---|---|---|
| A | Doritos Nacho Cheese 9.75oz | $14,200 | 3,840 | $4,260 |
| B | Lays Classic Potato Chips 8oz | $9,800 | 2,650 | $2,940 |
| C | Cheetos Crunchy 8.5oz | $7,100 | 1,920 | $2,130 |
| D | Pringles Original 5.2oz | $4,900 | 1,320 | $1,470 |
| E | Ruffles Cheddar & Sour Cream 8.5oz | $3,200 | 865 | $960 |
| F | Popcorners Kettle Corn 7oz | $1,600 | 432 | $480 |
| G | Store Brand Chips 10oz | $620 | 168 | $186 |
| H | Artisan Trail Mix 6oz | $280 | 76 | $84 |
| TOTAL | $41,700 | 11,271 | $12,510 | |
Notice anything? SKU A (Doritos) and SKU B (Lays) together account for about 58% of total sales. SKUs G and H together? Less than 3%. This imbalance is exactly what the Gini coefficient will measure for us.
We'll calculate the Sales Gini for our Snack category. Let's walk through it exactly the way a spreadsheet or Python script would.
First, sort all SKUs by sales from the smallest to the largest value. Then assign each a rank (1 = lowest, 8 = highest):
| Rank (i) | SKU | Sales ($) | Rank × Sales | Cumulative % |
|---|---|---|---|---|
| 1 | H – Artisan Trail Mix | $280 | $280 | 0.7% |
| 2 | G – Store Brand Chips | $620 | $1,240 | 2.2% |
| 3 | F – Popcorners | $1,600 | $4,800 | 6.0% |
| 4 | E – Ruffles | $3,200 | $12,800 | 13.7% |
| 5 | D – Pringles | $4,900 | $24,500 | 25.4% |
| 6 | C – Cheetos | $7,100 | $42,600 | 42.5% |
| 7 | B – Lays | $9,800 | $68,600 | 65.9% |
| 8 | A – Doritos | $14,200 | $113,600 | 100% |
| TOTAL | $41,700 | $268,420 | — | |
Rank 1 × $280 = $280 | Rank 2 × $620 = $1,240 | … | Rank 8 × $14,200 = $113,600
Sum of all (rank × sales) = $268,420
n = 8 | Total sales = $41,700 | Σ(rank × value) = $268,420
G = [2 × 268,420 / (8 × 41,700)] − (8+1)/8
G = [536,840 / 333,600] − 1.125
G = 1.610 − 1.125
G = 0.485
A Sales Gini of 0.485 means moderate concentration — close to the classic Pareto 80/20 zone. The top 2 SKUs (Doritos + Lays) drive 57.7% of sales. That's not catastrophic, but it signals that the bottom 3–4 SKUs are barely contributing. They're worth reviewing.
We run the exact same calculation for units sold and gross profit (AGP). Here are the results:
Good news for Snacks! All three Gini values are very close to each other (~0.48). This means the same products that drive sales are also driving units AND profit. That's healthy alignment. If profit Gini were much higher than sales Gini, it would mean a different set of SKUs is making money vs. selling volume — a warning sign.
The Lorenz curve is the chart that visualizes what the Gini coefficient measures. It was invented by Max Lorenz in 1905 and is traditionally used to show income inequality — we're adapting it for retail categories.
How to read it: The X-axis shows the cumulative % of SKUs (sorted cheapest to most expensive sellers). The Y-axis shows the cumulative % of total sales they represent. A perfectly equal category would follow the diagonal "Line of Equality." The further the curve bows away from that diagonal, the higher the Gini coefficient.
Each point shows: "The bottom X% of my SKUs account for Y% of total sales." The gray diagonal is perfect equality. The shaded area between them is directly related to the Gini coefficient.
Plotting all three metrics on the same chart reveals whether your best-selling SKUs are also your most-profitable ones. When the curves track closely together, your category is well-aligned.
The real power of this framework is in comparing categories side by side. Let's look at three categories your store manages: Snacks, Dairy, and Produce. Here's what their Gini profiles look like:
| Category | Sales Gini | Units Gini | Profit Gini | Profit vs. Sales | Signal |
|---|---|---|---|---|---|
| Snacks | 0.485 | 0.481 | 0.479 | Aligned ✓ | Healthy. Same SKUs drive all three metrics. |
| Dairy | 0.550 | 0.540 | 0.620 | Gap ⚠ | Profit is more concentrated than sales — some top-selling items may be low margin. |
| Produce | 0.420 | 0.430 | 0.380 | Good ✓ | Profit is spread more evenly than sales — a healthy, broad contributor base. |
Each group of bars shows the three Gini values for one category. Categories where all bars are roughly the same height have good internal alignment. A tall Profit bar relative to the Sales bar is a warning sign.
Now we bring it all together. The Gini-Adjusted Category Score (GACS) is a single number that ranks your categories from healthiest to most at-risk — combining raw performance with the Gini efficiency insight.
Two categories can have the same total sales. GACS tells you which one is built on a solid foundation — and which one is one bad week away from collapse.
First, we calculate the GER — the ratio between Sales concentration and Profit concentration:
| Category | Sales Gini | Profit Gini | GER | What It Means |
|---|---|---|---|---|
| Snacks | 0.485 | 0.479 | 1.01 | Nearly perfect — same SKUs drive both |
| Dairy | 0.550 | 0.620 | 0.89 | Profit more concentrated → top sellers are lower margin |
| Produce | 0.420 | 0.380 | 1.11 | Excellent — sales more concentrated than profit (top sellers are profitable) |
| Category | Raw Score | GER | Adjustment | GACS (Final) |
|---|---|---|---|---|
| Snacks | 78 | 1.01 | +0.2% ≈ +0 | 78.2 |
| Produce | 71 | 1.11 | +2.2% = +1.6 | 72.6 |
| Dairy | 74 | 0.89 | −2.2% = −1.6 | 72.4 |
The Produce vs. Dairy insight: Both scored 72.4–72.6 after adjustment — nearly tied. But they got there differently. Produce earned its score through efficient concentration (top sellers = top profit makers). Dairy got penalized because its profit is misaligned with its sales. A standard ranking by raw sales alone would show Dairy ahead of Produce. GACS reveals the truth hidden underneath.
The gold bars show raw sales performance. The navy bars show the Gini-adjusted final score. Categories with a GER > 1 see their score go up; categories with GER < 1 see their score go down.
This framework is designed to help category managers ask better questions and make more confident decisions. Here's how the Gini profile translates into concrete actions:
If concentration is high AND you carry lots of SKUs, your bottom items are just taking up space. Trim them and give shelf space to your proven winners.
When GER is below 1, your top revenue items aren't your top profit items. Find out why. Are you over-promoting low-margin products? Are high-margin items getting enough facings?
A very flat distribution isn't always healthy. It can mean no clear winners — which often means customers have no strong preference and the category lacks identity. Consider building up a hero SKU.
When your top sellers are also your top profit drivers, that category deserves investment: prime shelf placement, promotional support, and innovation pipeline. Don't let competitors crowd it out.
If you're a category management leader, retail executive, or hiring manager evaluating how I think about analytics — I'd enjoy the conversation.
Connect on LinkedIn