Skip to content
stokrio
All guides
Reports

ABC-XYZ inventory analysis, with a worked example

How to classify products by revenue contribution (ABC) and demand variability (XYZ), worked through with ten products, and what to do with each of the nine cells.

Stokrio Team · · 6 min read

Not every product deserves the same planning effort. A brand with 400 SKUs can't hand-tune 400 forecasts, and shouldn't try. ABC-XYZ analysis is a simple way to decide where attention, safety stock and cash should go. It combines two questions: how much does this product matter, and how predictable is it?

Key takeaways

  • ABC ranks products by cumulative share of revenue. A typical split is A = the top 80%, B = the next 15%, C = the last 5%.
  • XYZ ranks products by the coefficient of variation (CV) of weekly demand: X below 0.5, Y from 0.5 to 1.0, Z above 1.0.
  • AX products are your easiest wins: important and predictable. AZ products are your hardest problem: important and erratic.
  • Use the matrix to set service levels and review frequency, not to decide which products to discontinue on its own.
  • Seasonality and stockouts both distort XYZ. Correct for them before trusting the class.

Step 1: ABC by revenue

Take a period — twelve months is a good default because it covers a full season — and list each product's revenue, largest first. Work out each product's share and the running total. Products until the running total reaches 80% are A, the next 15% are B, and the rest are C.

Here are ten products with $100,000 of revenue between them:

ProductRevenueShareCumulativeClass
P1$40,00040%40%A
P2$25,00025%65%A
P3$15,00015%80%A
P4$6,0006%86%B
P5$5,0005%91%B
P6$4,0004%95%B
P7$2,0002%97%C
P8$1,5001.5%98.5%C
P9$1,0001%99.5%C
P10$5000.5%100%C

Three products — 30% of the range — bring in 80% of revenue. Your own catalogue may be more or less concentrated; the method is the same either way.

Revenue is the usual basis, but not the only one. If your margins vary widely, rank by gross margin instead; if warehouse handling is the constraint, rank by units. Pick one basis and stick with it, so classes are comparable from month to month.

Step 2: XYZ by demand variability

XYZ measures how much weekly demand jumps around relative to its average. The coefficient of variation is:

CV = standard deviation of weekly demand ÷ mean weekly demand

Using weekly rather than daily demand smooths out day-of-week noise that doesn't matter for ordering. Here are six weeks for three products (in practice use more weeks; six keeps the arithmetic readable). We use the population standard deviation.

Product P1: 100, 110, 90, 100, 105, 95 units.

  • Mean = 600 ÷ 6 = 100.
  • Deviations from the mean: 0, 10, −10, 0, 5, −5. Squared: 0, 100, 100, 0, 25, 25 = 250.
  • Variance = 250 ÷ 6 = 41.7. Standard deviation = √41.7 ≈ 6.5.
  • CV = 6.5 ÷ 100 = 0.065 → X.

Product P2: 20, 80, 0, 60, 10, 70 units.

  • Mean = 240 ÷ 6 = 40.
  • Deviations: −20, 40, −40, 20, −30, 30. Squared: 400, 1,600, 1,600, 400, 900, 900 = 5,800.
  • Variance = 5,800 ÷ 6 = 966.7. Standard deviation ≈ 31.1.
  • CV = 31.1 ÷ 40 ≈ 0.78 → Y.

Product P3: 0, 0, 90, 0, 0, 30 units.

  • Mean = 120 ÷ 6 = 20.
  • Deviations: −20, −20, 70, −20, −20, 10. Squared: 400, 400, 4,900, 400, 400, 100 = 6,600.
  • Variance = 6,600 ÷ 6 = 1,100. Standard deviation ≈ 33.2.
  • CV = 33.2 ÷ 20 ≈ 1.66 → Z.

So P1 is AX, P2 is AY and P3 is AZ. Three products, all class A, with completely different planning needs.

Step 3: the nine-cell matrix

X (steady)Y (variable)Z (erratic)
A (high value)Automate and protectForecast carefully, review oftenManage by hand
B (medium value)AutomateStandard processOrder to demand, limit stock
C (low value)Automate, low effortLow safety stockQuestion whether to stock

What to do with each cell

AX: automate and protect

High revenue, predictable demand. These are the products where a stockout hurts most and is easiest to avoid. Give them a high service level, measure lead times precisely, and let the replenishment rules run. Review exceptions, not every line. If an AX product goes out of stock, treat it as a process failure and find out why.

AY and AZ: where planners earn their keep

These are the products worth a buyer's time. Ask why demand is variable. Often it's promotions, wholesale orders, influencer spikes or stockouts in the history, all of which can be explained and planned for. An AZ product whose spikes are all promotions is really an AX product with a promotional calendar on top.

For genuinely erratic A products, hold more safety stock, review them weekly, and consider shorter lead-time supply (a domestic supplier or air freight for top-ups) so you can react rather than predict.

BX, BY: the standard process

Run them on your normal replenishment rules with a moderate service level. BZ products deserve smaller, more frequent orders so you're not betting heavily on an unpredictable product.

CX and CY: minimal effort

Low value and reasonably steady. Automate, keep safety stock modest and order in convenient quantities. Don't spend meeting time on them.

CZ: the stocking question

Low value and erratic — often the products clogging your shelves. For each one, ask whether it needs to be stocked at all. Options include made-to-order, dropship, a minimum stock of one or two units, or discontinuing. Check the dead stock report before reordering any of them.

Setting service levels by class

A common approach is to give each ABC class a different target service level, then let safety stock follow from it. In standard safety stock formulas, a 95% service level uses a z-score of about 1.65, 90% uses about 1.28 and 85% about 1.04. If a product has a demand standard deviation of 20 units over its lead time, safety stock is roughly:

A at 95%: 1.65 × 20 = 33 units
B at 90%: 1.28 × 20 ≈ 26 units
C at 85%: 1.04 × 20 ≈ 21 units

The difference looks small per product but adds up across a long C tail. The point is to put your safety stock money where stockouts cost the most. Our guide to safety stock and reorder points covers the formulas in full.

Pitfalls that distort the classes

  • Seasonality looks like erratic demand. A swimwear line that sells all summer and nothing in winter will come out as Z on raw weekly data even though it's highly predictable. Measure variability against a seasonal forecast, or within the season, before classing it Z.
  • Stockouts look like volatility. Weeks of zero sales because you had nothing to sell inflate the standard deviation. Exclude stockout days from the history.
  • New products have no history. Don't class a product with six weeks of sales. Treat launches separately until they have a full window.
  • Classes flip-flop. Products near a boundary bounce between A and B each month. Re-run the analysis monthly or quarterly, and require a product to stay in a new class for two runs before changing its treatment.
  • ABC is not a discontinuation list. A C product may be the accessory customers buy with an A product, or a new line still building. Look at basket and margin data before cutting.

Where Stokrio fits

Stokrio's inventory reports include an ABC-XYZ matrix with a configurable window, built on stockout-adjusted demand. The class also feeds replenishment: A-class products get more safety stock protection and C-class less. You can run everything above in a spreadsheet; the value of a tool is that it stays current without anyone rebuilding the sheet.

Frequently asked questions

What are the usual ABC thresholds?
A common split is A for products making up the top 80% of revenue, B for the next 15% and C for the final 5%. Adjust them if your catalogue is unusually concentrated or flat, but keep them stable over time.
What CV thresholds define X, Y and Z?
A common convention is X for a coefficient of variation below 0.5, Y from 0.5 to 1.0 and Z above 1.0, measured on weekly demand.
Should seasonal products be class Z?
Not automatically. Raw weekly data makes seasonal products look erratic. Measure variability against a seasonal forecast or within the selling season before deciding.
How often should I re-run ABC-XYZ analysis?
Monthly or quarterly is enough. Running it weekly makes products near a boundary flip between classes and creates unnecessary changes to safety stock.

See Stokrio with your own data

Create a workspace in minutes. Connect Shopify or start with the API.