ABC-XYZ Inventory Analysis for Ecommerce
ABC grades SKUs by revenue, XYZ by how predictable demand is. How to calculate both from your Shopify data, and what policy each of the nine cells earns.
Two SKUs in the same catalog sell an average of 35 units a week each. One sells between 33 and 37 every single week. The other sells 4 one week and 96 the next. Give both the same buffer, the same forecast method, and the same reorder rule, and one of those decisions is going to be wrong in a way no amount of care in the arithmetic will fix.
ABC-XYZ analysis is how you stop making that mistake at catalog scale. This post is about the calculation: how to produce an A, B, or C grade and an X, Y, or Z grade for every product from data you already have, and what planning policy each combination earns.
Why one policy fails
A single planning policy applied across a catalog is not a simplification, it is a mismatch. The buffer that protects an erratic seller is waste on a steady one. The weekly forecast review that keeps your top product in stock is time you never get back when you spend it on a SKU that sells four units a quarter. And a forecasting method that works on a smooth series produces confident nonsense on a spiky one.
Our guide to inventory forecasting methods already argues this from the demand-pattern side, that a real catalog is never one demand shape and applying one method to all of them is a mismatch rather than a shortcut. What that argument needs to become actionable is a way to sort products into groups. That is the whole job of ABC-XYZ: two cheap gradings that tell you which policy each SKU has earned.
ABC by revenue contribution
ABC classification dates to a 1951 article by H. Ford Dickie of General Electric, which applied Pareto's work on income distribution to stock. The idea has not changed since: sort by contribution, and treat the top of the list differently from the bottom. Our inventory management fundamentals guide covers where it sits among the standard stock-control methods; what follows is how to actually produce the grades.
The procedure is four steps and runs in a spreadsheet. Pull each SKU's revenue over a consistent recent window. Sort descending. Compute each SKU's share of total revenue. Then run a cumulative total down the sorted list, and cut it into three groups.
Here it is on a deliberately tiny catalog, using trailing 90-day revenue:
| SKU | 90-day revenue | Share | Cumulative |
|---|---|---|---|
| Cedar & Fig 250g | 18,000 | 51.4% | 51.4% |
| Cedar & Fig gift box | 9,000 | 25.7% | 77.1% |
| Sandalwood 250g | 4,500 | 12.9% | 90.0% |
| Wick trimmer | 2,000 | 5.7% | 95.7% |
| Candle snuffer | 1,500 | 4.3% | 100% |
Total revenue is 35,000. Now the part most explanations skip: where do you cut? Shopify's own ABC analysis by product report uses 80% of revenue for the A grade, the next 15% for B, and the last 5% for C. Applied here, the first two SKUs carry 77.1% between them, and adding the third takes you to 90%. So Sandalwood is either the last A or the first B depending on which side of the line you put the SKU that crosses it.
That ambiguity is not a flaw in the example. The cut points are a convention, not a law. Reference sources give the common textbook splits as 70/25/5 or 80/15/5 and state plainly that there are no fixed thresholds. They also define the classes differently: some by share of items and share of value together, while Shopify's report uses share of revenue only and lets the item count fall where it may. A post that quotes 80/15/5 and then explains it as "20% of your products drive 80% of revenue" has silently welded two different operations together.
The practical version: cumulate down your own sorted list and look at where the curve actually bends. A catalog where one SKU is 51% of revenue has a different natural break than one where the top ten are 8% each. Grade against your own distribution, not a borrowed ratio.
One more decision worth making on purpose: ABC by revenue is not ABC by profit. Shopify's report says outright that cost does not factor into the grade. A high-revenue, thin-margin SKU and a mid-revenue, fat-margin one can land in different tiers than they deserve. If margin data is in your export, grading on gross profit instead of revenue takes the same four steps and usually tells you something different. The same goes for grading on how many times a year each SKU's stock turns over or on the gross margin a SKU returns for every dollar tied up in it, both of which answer the capital question a revenue ranking hides.
XYZ by demand variability
The XYZ axis grades the same products on a completely different question: how predictable is this SKU's demand? X is stable, Y varies for a knowable reason such as a season or a promotion, and Z is erratic.
The measure is the coefficient of variation: the standard deviation of a SKU's periodic sales divided by its average. Dividing by the average is the important bit, because it makes variability comparable across SKUs of different sizes. A product selling 35 a week that swings by 3 units and a product selling 3 a week that swings by 3 units are not equally unpredictable, and only the ratio shows that.
Take the two SKUs from the top of this post. Eight weeks of units sold:
- Cedar & Fig 250g: 34, 36, 33, 35, 36, 34, 35, 37. Total 280, average 35.0, standard deviation about 1.2 units, coefficient of variation about 0.035.
- Cedar & Fig gift box: 8, 72, 15, 4, 96, 11, 68, 6. Total 280, average 35.0, standard deviation about 34.8 units, coefficient of variation about 0.99.
Identical totals, identical averages, and one number that separates them by a factor of roughly thirty. In a spreadsheet this is two cells: the population standard deviation of the eight weekly figures, then that divided by the average of the same eight cells. Nothing more sophisticated is required, and doing it on a whole catalog is one formula filled down.
Then the cut points, and this is where honesty matters more than tidiness: there is no standardised numeric threshold for X, Y, and Z. Independent searches for this site turned up mutually inconsistent threshold sets, and nothing that two credible sources agreed on. Anyone quoting a specific cut-off as the industry standard is quoting one convention among several.
What works instead is to sort the whole catalog by coefficient of variation and read your own list. Look for natural gaps, or split into thirds if there are none, and check the result against products you know well. If a SKU you know is steady lands in Z, your window is probably too short or the series contains a bulk order that should have been cleaned out first.
Two traps worth naming. Weeks with zero sales are data, not gaps, and deleting them will make an intermittent SKU look far steadier than it is. And on very low-volume products, the coefficient of variation stops being informative: a SKU that sold 0, 0, 1, 0, 2, 0, 0, 1 has a mathematically valid ratio and a meaningless one. A Z grade on a SKU like that is really a statement that its demand is intermittent, and planning a SKU that sells a handful of times a quarter is a different job from grading it.
Combining the two axes
Crossing three revenue grades with three variability grades gives nine cells, from AX at one corner to CZ at the other. The grid itself, and how much review attention each cell earns, is already laid out with a diagram in our guide to prioritizing products for reordering, which owns the review-cadence side of this. Read the grid there; this post stays on the calculation and on what each segment implies for planning rather than for scheduling.
The useful thing about two axes is that they disagree, and the disagreements are where the money is. A high-revenue SKU with erratic demand is not a problem you can solve by caring more about it. Neither that nor its opposite is visible from a revenue ranking alone, which is why a plain ABC grading tends to produce a list of bestsellers everyone already knew about.
Policy by segment
What each grade combination changes about how you plan the SKU. Read these as a starting position to argue with, not a rule: the mapping from cells to policies is a reasonable synthesis rather than an established standard, and no source this site could verify publishes an authoritative version.
- AX, high value and predictable. The one place a precise, formula-driven approach genuinely pays. Full reorder point, a buffer sized from the SKU's own variability, and a safe candidate for automatic reorder suggestions, because the forecast has something real to work with.
- AY, high value and seasonal or promotion-driven. The fix is a forecast that knows about the pattern, not a bigger buffer. Padding a seasonal SKU with extra stock treats a predictable swing as if it were random and pays for it twice, once in cash and once in the post-season markdown.
- AZ, high value and erratic. The expensive corner. The forecast will not be confident and no buffer size is obviously right, so buy shorter: order more often in smaller quantities rather than committing to one large order against a number you do not trust. This is the segment that most deserves a human looking at it.
- BX and BY. The formula still earns its keep, applied with less precision. This is where a min/max style rule usually beats a bespoke calculation per SKU.
- CX, low value and predictable. The cheapest segment to automate and the easiest to forget. A simple days-of-cover rule, set once, is defensible here precisely because the demand is stable.
- CZ, low value and erratic. Do not spend a formula on this. A rule of thumb, a supplier minimum, or a decision to stop stocking it are all more honest than a standard deviation computed from four sales.
The pattern across all nine: the X column is where precision pays, the Y column is where a smarter forecast pays, and the Z column is where nothing pays and the right response is to reduce your exposure instead of improving your estimate.
Segmentation is not an end in itself. It exists so that the levers in our inventory optimization guide get pulled where they are cheapest, because buying availability costs far less on an X SKU than on a Z one and a blanket policy pays the worst rate available across the whole catalog.
Running it on your own data
Everything above runs on one export. Pull order line items over a consistent window: 90 days is enough for the ABC axis on most catalogs, but the XYZ axis wants at least three or four times as many periods as you have patience for, and a full year if seasonality is in play. Our guide to pulling and cleaning Shopify sales data covers which report to use and what to strip out before you average anything, and the cleaning step matters more here than usual: a single wholesale order left in the series will push a stable SKU into Z on its own.
From there it is two pivots: revenue by SKU, which gives you ABC, and units by SKU by week, which gives you the average, the standard deviation, and the coefficient of variation for XYZ. Join them on SKU and you have a nine-way grading of the catalog in an afternoon.
Shopify's native ABC analysis by product report hands you the revenue axis without the spreadsheet, with the caveats already noted: 28 days, revenue only, cost excluded, and Shopify's own documentation hedging that depending on your plan you might need an app for it. There is no native XYZ equivalent, so the variability half is yours to build or to buy.
The reason most stores do this once and never again is the re-run rather than the calculation. Grades drift as the catalog changes, and a segmentation from last spring describes a store that has moved on. StockCue works from up to 24 months of order history and computes ABC analysis, including a margin-weighted version that grades on profit rather than revenue, on its Scale plan. Forecasting, which is what the variability axis ultimately feeds, runs on every plan including Free.
STOCKCUE
If the spreadsheet version of this survives one quarter and then quietly stops being re-run, StockCue computes ABC and margin-weighted ABC from your own sales history on Scale, and forecasts every SKU's demand on every plan including Free.
Install StockCue on Shopify →Frequently Asked Questions
What is ABC-XYZ analysis?
ABC-XYZ analysis grades every SKU twice. The ABC axis ranks products by how much they contribute, usually revenue, and splits them into a small top group, a middle group, and a long tail. The XYZ axis grades the same products by how predictable their demand is, from steady sellers through seasonal or promotion-driven ones to genuinely erratic ones. Crossing the two gives nine segments, and the point of the exercise is that each segment earns a different planning policy.
How do you calculate XYZ classification?
Take each SKU's units sold per period, usually weekly, over a consistent window. Compute the average and the standard deviation of that series, then divide the standard deviation by the average. That ratio is the coefficient of variation, and it measures variability relative to the SKU's own size, which is what lets you compare a product selling 35 a week against one selling 3. Sort your catalog by that ratio and set your cut points from your own distribution: there is no standardised numeric threshold for X, Y, and Z that independent sources agree on.
How often should you re-run ABC-XYZ analysis?
Quarterly suits most small catalogs, plus an extra run after anything that changes the mix, such as a product launch, a range being discontinued, or a season turning. Re-running it monthly tends to produce churn rather than insight, because a SKU that flips between grades on small movements will flip back. What matters more than the frequency is that the window you measure is consistent each time.
Does Shopify do ABC analysis natively?
Yes, in the form of an ABC analysis by product report. It grades products so that the A grade collectively accounts for 80% of revenue, B the next 15%, and C the last 5%, measured over the last 28 days and updated daily. Two details matter before you rely on it: cost is explicitly excluded from the calculation, so it grades revenue rather than profit or capital tied up, and the 28-day window is short enough to misgrade a seasonal catalog. Shopify's own documentation also notes that depending on your plan you might need an app for ABC analysis, so check it against the plan you are on.
