Skip to main content

ABC Analysis: Formula, Worked Example and Actions per Class

How to run an ABC analysis on your products: the formula, a worked example ranked by revenue and by profit, XYZ for demand swings and actions per class.

ABC Analysis: Formula, Worked Example and Actions per Class

ABC analysis sorts products into three classes by how much of a chosen value they produce, usually revenue or gross profit over a fixed period. A items are the few that bring in about 80% of that value, B items the next 15% and C items the last 5%. It is the Pareto principle applied to a product list, and it shows where tight control and extra effort pay off.

Inventory teams use the classes to set reorder rules, safety stock and cycle counts. For an online store the same ranking also decides where product data work goes first: which listings get complete attributes, extra images and translations now, and which can wait or leave the range. This guide covers the formula, a worked example with 14 products ranked two ways, the XYZ extension for demand swings, and the traps that put a product in the wrong class.

The ABC classification formula, step by step

There is no single official cutoff. Shopify's ABC analysis by product report grades A products at around 80% of revenue, B at about 15% and C at about 5%, while the textbook example on Wikipedia uses 70%, 25% and 5%. Pick your cutoffs once and keep them, so a class means the same thing from one quarter to the next.

  1. Pick the value and the window. Revenue, gross profit or units sold, over a period long enough to smooth out single large orders: 8 to 13 weeks for a fast-moving range, 12 months for a seasonal one.
  2. Pull one row per product with that value from your store or order export. Net out returns and refunds where you can, or a product that comes back often looks stronger than it is.
  3. Sort the rows from highest to lowest value.
  4. Compute the cumulative share for each row: the running total of the value divided by the grand total.
  5. Assign the class. A while the cumulative share is at or below 80%, B up to 95%, C for everything after that.

In a spreadsheet that is three columns: share = value / SUM(value), cumulative = previous cumulative + share, and an IF on the cumulative column for the class. The class is only as good as the value column, so most of the effort goes into step 2.

Worked example: 14 outdoor products ranked by revenue and by profit

An illustrative outdoor gear store sold EUR 100,000 worth of 14 products in eight weeks. The table ranks them by revenue, then reruns the ranking on gross profit (revenue times gross margin, EUR 43,780 in total) with the same 80% and 95% cutoffs.

ABC classes for 14 outdoor products, by revenue and by gross profit

Merino base layer top24,00024.0%A55%13,200A
Waterproof hiking jacket19,50043.5%A45%8,775A
Trail running shoes15,00058.5%A30%4,500A
60 L trekking backpack12,50071.0%A40%5,000A
Down sleeping bag9,00080.0%A25%2,250B
Insulated bottle 1 L5,50085.5%B50%2,750A
Trekking poles (pair)4,00089.5%B45%1,800B
Headlamp 400 lm3,00092.5%B35%1,050B
Merino hiking socks 3-pack2,50095.0%B65%1,625B
Titanium camping mug1,80096.8%C55%990C
Dry bag 10 L1,40098.2%C60%840C
Gaiters90099.1%C50%450C
Folding spork50099.6%C70%350C
Baseplate compass400100.0%C50%200C
Showing 14 of 14 rows
Illustrative example: the down sleeping bag is A by revenue but B by profit, and the insulated bottle moves the other way.

By revenue, five products make 80% of sales. Ranked by gross profit, the 1 L insulated bottle moves up to A on its 50% margin, and the down sleeping bag drops to B: EUR 9,000 in sales at a 25% margin leaves EUR 2,250 of gross profit, less than the bottle's EUR 2,750. With only 14 products, A is more than a third of the range; in a catalog with a long tail of slow sellers it is a much smaller share of the SKU count.

Choosing the value: revenue, gross profit or units

Revenue is the default because every store has it. Shopify's report calculates it from the retail price of items, excludes discounts and does not look at item cost, according to its Help Center page. A heavily discounted product therefore looks stronger than the cash it brought in, and a low-margin bestseller ranks the same as a high-margin one.

  • Revenue fits stock and service decisions: an A item that runs out loses the most sales.
  • Gross profit fits decisions about effort and money: content work, ad budget and range reviews. It needs a cost price on every product. To include channel fees and other variable costs, rank on contribution margin instead.
  • Units sold fits warehouse work: which products get the closest pick locations and how often a location is counted.

Many teams run two rankings and act on where they disagree. A product that is A by revenue and C by profit is a pricing or sourcing question, not a content one. Ranking within each category, instead of across the whole store, gives assortment planning its shortlist of category winners and laggards.

Adding XYZ analysis for demand variability

ABC says how much a product is worth. XYZ says how predictable its demand is. Take weekly units sold, divide the standard deviation by the mean, and you have the coefficient of variation (CV). A low CV means steady demand; a high CV means spiky or intermittent sales.

There is no standard cutoff for XYZ either, and planning tools set their own. This example uses X below 0.5, Y from 0.5 to 1.0 and Z from 1.0 up. Treat those limits as a starting choice and test them on your own sales history: if almost every product lands in Z, they are too low for your range. Applied to three products from the example over the same eight weeks (population standard deviation, STDEV.P in Excel):

  • Merino base layer top: 40, 44, 38, 42, 41, 39, 43 and 41 units. Mean 41, standard deviation 1.9, CV 0.05: AX.
  • Headlamp 400 lm: 14, 2, 9, 17, 2, 10, 4 and 14 units. Mean 9, standard deviation 5.5, CV 0.61: BY.
  • Down sleeping bag: 2, 9, 0, 0, 14, 3, 0 and 4 units. Mean 4, standard deviation 4.7, CV 1.18: AZ on revenue, BZ on profit.

Take known seasonality out before you compute the CV, or every winter product lands in Z. Comparing each week with the same week last year, or computing the CV within the season only, keeps the class about volatility instead of the calendar.

The nine ABC-XYZ combinations and what each one needs

Crossing the two rankings gives nine cells. The stock rules below are the usual starting points; adjust them to your lead times and how much a stockout costs you.

ABC-XYZ matrix: stock approach per cell

AAutomated reorders, low safety stock, frequent countsForecast with seasonality, review stock weeklyBuffer stock or order against confirmed demand; find out what drives the spikes
BStandard reorder points, monthly reviewPeriodic review with a moderate bufferOrder on demand where supplier lead times allow
CBulk orders, little attentionMinimal stock, bundle candidatesOrder to demand, dropship or delist
Value decides how much attention a product gets; predictability decides whether that attention can be automated.

Product data follows the same logic. AX products sell every week, so a gap in their listing costs sales every week. AZ products need complete data before the spike, not after it: a sleeping bag that sells 14 in one week and none the next has to be listed, translated and in every feed before the cold weather arrives.

Treating A, B and C items differently in your catalog

Most inventory guides stop at reorder rules. For an online store the ranking is also a work order for product data, because a missing size chart or an empty material field costs the most on the products that sell the most.

A items: complete data on every channel, checked first

A items get the full treatment and a regular check, so nothing breaks unnoticed on the listings that carry the business.

Product data checklist for A items

0 of 7 done0%

B items: fill the attributes that filter and compare

B items are the next tier and the likeliest to move up. Fill the attributes your filters and comparison tables use, so the product appears when a shopper narrows a list, and make sure it reaches every channel. This is usually where the gap is largest: in WISEPIM's State of Product Data report, the median catalog that used attributes had them filled on 1.9% of products when it arrived.

C items: templates, bundles or retirement

C items share 5% of the value, so they get the cheapest treatment that is still correct: descriptions built from attributes with a template, one good image, and a place in feeds only if they pass basic checks. Before cutting one, check what it does for other products. A spork bought with half the sleeping bags may protect A sales. The rest are candidates for SKU rationalization.

Category Insights puts sales per category next to the quality score of the products that were ordered, which shows whether the categories that earn the most also have the best data.

What the outdoor store changes after ranking its 14 products

Back to the example. The ranking only pays off when it turns into a short list of changes, owned by someone, with a date. For this store, the list after one run looks like this:

  • Merino base layer top (AX): the steadiest seller and the biggest profit line. Check its size and fit data, care instructions and translations every month, and set automatic reorders. Nothing new to build, only to protect.
  • Insulated bottle (B by revenue, A by profit): promote it. Give it the A checklist, a channel title per marketplace, and consider it as an add-on next to the jacket and backpack.
  • Down sleeping bag (AZ by revenue, BZ by profit): list it complete before autumn, order against forecast for the cold months only, and review the 25% margin with the supplier before the next season.
  • Headlamp (BY): fill the attributes shoppers compare on, such as lumens, battery type, beam distance and water resistance rating, so it shows up in filters next to the competing models.
  • Spork and compass (C): keep the spork if order data shows it is bought with sleeping bags; give both a template description from attributes and one image, and stop spending time on them.

Five changes, each with an owner, is a better outcome of an ABC run than a colored spreadsheet. Next quarter, the same ranking shows whether the bottle stayed in A and whether the sleeping bag's margin improved.

Five ways an ABC ranking misleads

  • Stockouts. A product that was out of stock for three of the eight weeks sold less because it could not sell. Check sell-through rate and days in stock before you demote it.
  • New products. A launch with four weeks of history lands in C by default. Keep new items in a separate class until they have a full window.
  • Seasonality. An eight-week window in spring ranks sleeping bags low. Rank seasonal ranges over the full season or 12 months.
  • Parents vs variants. Ranking variants splits a strong style into many C sizes; ranking parents hides a color that does not sell. Rank at the level you decide on: the style for content, the variant for stock.
  • Complements. A C accessory that sits in many A orders keeps those orders whole. Look at which products are bought together before delisting it.

Storing ABC classes as product data

Rerun the ranking monthly or quarterly with the same value, window and cutoffs, and keep the previous class next to the new one. A product moving from B to A is a signal; one dropping from A to C is an alarm. A class that lives only in a spreadsheet gets used once. Stored as two product attributes, such as abc_class and xyz_class, it can drive filters, work queues and ad campaigns.

Google Shopping shows why. Custom labels group products for bidding and reporting in Performance Max, Shopping and Demand Gen campaigns: five labels, custom_label_0 to custom_label_4, each value 1 to 100 characters, up to 1,000 unique values per label. Map abc_class to one of them and you can bid harder on A products and cap spend on C. Shoppers never see the labels.

WISEPIM is not an inventory system: it does not hold stock, place purchase orders or calculate ABC classes. It is where the class can live next to the rest of the product data: import the class column from your spreadsheet with a CSV import set to update existing products only, filter the catalog on it to run enrichment and quality fixes on A items first, and map it to a custom label in a Feed Hub Google Shopping feed. For the category view, Category Insights shows sales per category next to the data quality of what was ordered.

On the stock side, the Reorder planning page in WISEPIM analytics reads orders and stock levels from connected stores, lists products by how many days of stock they have left at their recent sales pace, and suggests a reorder quantity from your lead time and safety stock. You still place the order. It ranks by urgency, not by value, so it sits next to an ABC class instead of replacing it: an A item marked to order now is the first call of the week. To turn a turnover figure into days of stock by hand, use the inventory turnover calculator.

Diego Nijboer

CTO and Co-Founder at WISEPIM, building AI-powered solutions that transform product data management for e-commerce businesses. Over 10 years of experience solving complex technical challenges in e-commerce and PIM systems.

Frequently asked questions

Still have questions?

Can't find the answer you're looking for? Please get in touch with our team.

Contact Support

ABC analysis is an application of the Pareto principle, the observation that a small share of items accounts for a large share of the effect. Pareto describes the pattern; ABC turns it into three working classes with fixed cutoffs, often 80%, 15% and 5% of revenue or profit, so each product gets a label you can act on in stock planning, content work and advertising.

Yes. Shopify's ABC analysis by product report sits with the inventory reports in the admin and grades products A, B or C at about 80%, 15% and 5% of revenue. Revenue is based on the retail price of items, excludes discounts and ignores item cost. Shopify points stores on the Basic or Lite plan to reporting apps in the Shopify App Store instead.

Monthly or quarterly works for most stores, using the same value, period length and cutoffs each time so the classes stay comparable. Seasonal ranges are better ranked over a full season or 12 months. Keep the previous class next to the new one: a product that moves between classes is more interesting than the classes themselves.

Yes. Export one row per product with revenue or gross profit, sort from high to low, add a column for each product's share of the total and a running cumulative share, then use an IF formula to assign A up to 80%, B up to 95% and C above that. For XYZ, add weekly units and divide STDEV.P by AVERAGE.

Use revenue for stock and availability decisions and gross profit for decisions about effort and spend, such as content work and ad budgets. The two rankings often disagree on low-margin bestsellers and high-margin accessories, and those disagreements point to pricing or sourcing questions. Gross profit needs a cost price on every product.

Keep exploring

Hand-picked next steps to go deeper.

Better product data, better results.Get more sales.

4.7