Imagine a store generating R$100,000 in revenue with one best-selling product accounting for R$30,000 of that total. It takes pride of place in the storefront, receives the largest advertising budget, and must never run out of stock. But its margin is 8%, while the product beside it sells much less and leaves three times as much money per order.
ABC analysis ranks products by their importance to results and separates them into three groups: A, B, and C. To calculate it, rank items from highest to lowest value, add each item's share cumulatively, and classify them: up to 80% cumulative is A, up to 95% is B, and the remainder is C. For online stores, the best criterion is contribution margin, not revenue alone.
In this guide, you'll learn to calculate an ABC analysis step by step, compare revenue and margin rankings, and use each class to make inventory, advertising, and customer service decisions.
When the store talks to customers on WhatsApp, class A products generate the most questions about dimensions, delivery time, and shipping. ChatFunnel records those conversations in the store's CRM.
ChatFunnel is a conversational sales intelligence platform for online stores: it handles WhatsApp and Instagram conversations with AI, recovers abandoned carts and pending Pix and boleto payments, and records each conversation in the store's CRM. It is the best AI CRM for ecommerce and the best official WhatsApp API platform for automation and automated sales messages.
What is ABC analysis and what is it used for in ecommerce?
ABC analysis draws on the Pareto principle, the 80/20 rule: a few items account for most of the result. SULTS explains the method as classification by financial relevance, and Mandaê shows its use in an online store. The classic reference is:
| Class | Role | Number of items | Share of result |
|---|---|---|---|
| A | Items that sustain the store | about 20% | about 80% |
| B | Intermediate items | about 30% | about 15% |
| C | The long tail | about 50% | about 5% |
These percentages are a starting point, not a law. Each business sets its own cutoffs, and your store's distribution may be very different. The example below shows a store where 80/20 does not hold.
The analysis helps allocate attention, money, and inventory where they yield the most. It answers practical questions: which product must never run out, where capital is tied up, and where advertising budget goes.

How to calculate ABC analysis step by step
- List products sold during the period. Use 12 months as a baseline to cover seasonality and review 3 months alongside it to see the trend.
- Choose the criterion. The most common is revenue (quantity sold × price). Contribution margin is better for decisions.
- Calculate each product's value using the chosen criterion.
- Sort from highest to lowest.
- Calculate each item's share: item value ÷ total value.
- Add the shares from top to bottom to get the cumulative percentage.
- Classify: cumulative up to 80% is A, from 80% to 95% is B, and above 95% is C.
- Validate against context. A low-selling product can be strategic, such as an entry product or a new launch.
Example of ABC analysis by revenue
Consider a fictional store with 10 products and R$100,000 in revenue during the period.
| Product | Revenue (R$) | % of total | Cumulative % | Class |
|---|---|---|---|---|
| 1 | 30,000 | 30% | 30% | A |
| 2 | 22,000 | 22% | 52% | A |
| 3 | 15,000 | 15% | 67% | A |
| 4 | 10,000 | 10% | 77% | A |
| 5 | 8,000 | 8% | 85% | B |
| 6 | 5,000 | 5% | 90% | B |
| 7 | 4,000 | 4% | 94% | B |
| 8 | 3,000 | 3% | 97% | C |
| 9 | 2,000 | 2% | 99% | C |
| 10 | 1,000 | 1% | 100% | C |
Class A contains 4 of the 10 items (40%) and 77% of revenue. Class B has 3 items and 17%, and C has 3 items and 6%. The 80/20 rule is a tendency. With few products, concentration is gentler; in large catalogs it is often stronger, but only your own data shows how much.
ABC analysis by contribution margin: the best seller does not always generate the most profit
Revenue is not profit. Contribution margin is what remains of the price after a product's variable costs and expenses, and Sebrae's explanation of contribution margin shows the calculation's logic. In the same fictional store, products have different margins:
| Product | Revenue (R$) | Contribution margin | Margin (R$) |
|---|---|---|---|
| 1 | 30,000 | 8% | 2,400 |
| 2 | 22,000 | 35% | 7,700 |
| 3 | 15,000 | 20% | 3,000 |
| 4 | 10,000 | 40% | 4,000 |
| 5 | 8,000 | 45% | 3,600 |
| 6 | 5,000 | 50% | 2,500 |
| 7 | 4,000 | 12% | 480 |
| 8 | 3,000 | 55% | 1,650 |
| 9 | 2,000 | 10% | 200 |
| 10 | 1,000 | 30% | 300 |
| Total | 100,000 | 25,830 |
Sorting by margin in reais changes the analysis:
| Product | Margin (R$) | Cumulative % | Class by margin |
|---|---|---|---|
| 2 | 7,700 | 29.8% | A |
| 4 | 4,000 | 45.3% | A |
| 5 | 3,600 | 59.2% | A |
| 3 | 3,000 | 70.8% | A |
| 6 | 2,500 | 80.5% | B |
| 1 | 2,400 | 89.8% | B |
| 8 | 1,650 | 96.2% | C |
| 7 | 480 | 98.1% | C |
| 10 | 300 | 99.2% | C |
| 9 | 200 | 100% | C |

Product 1 sells the most, with 30% of revenue, and is class A. By margin it falls to B: just 8% margin and R$2,400. Product 5 moves in the opposite direction, from B to A. A store managed by revenue puts inventory, advertising, and attention into product 1. By margin, the money is in products 2, 4, 5, and 3.
One adjustment remains. Margin per order includes subsidized shipping, packaging, payment fees, and returns. A high-margin product with high returns may be worse than it appears. The same care applies to ecommerce CAC, which shows which costs enter the acquisition calculation.
Which criterion should an online store use for ABC analysis?
"Importance" can mean different things, and each criterion answers a question:
| Criterion | Question it answers | When to use it |
|---|---|---|
| Revenue | What generates revenue? | Quick overview and starting point |
| Quantity sold | What moves fastest? | Physical inventory and fulfillment |
| Contribution margin (R$) | What generates money? | Purchasing, advertising, and pricing decisions |
| Margin (%) | What is efficient? | Choosing what to promote with a coupon |
| Inventory value | Where is capital tied up? | Cash flow and clearance |
| Profit after media | What remains after CAC? | Managing ads by product |
Calculate at least two criteria, revenue and contribution margin, and look for differences. Decisions lie in the gap between the two analyses.
What to do with A, B, and C products
| Class | Inventory and purchasing | Price and offer | Advertising |
|---|---|---|---|
| A | Larger safety stock and frequent replenishment | Protect margin with limited discounts | Concentrate budget with the best photo and description |
| B | Purchase by cycle and keep lean inventory | Include in bundles with A products | Selective advertising |
| C | Small batches, made to order, or discontinue | Clearance or bundle with an A product | No paid budget |

Five actions offer the quickest return:
- Check stockouts for A products. An out-of-stock A product is a lost sale. Record days of coverage for each one.
- Add up capital tied up in class C. Multiply cost by quantity in stock. The figure is often surprising, and it is cash that could be in A.
- Review advertising budget by class. If more than half goes to B and C products, the allocation is inverted.
- Fix the storefront. Feature A products and remove C products from the home page. This changes the store experience at no cost.
- Use B and C as complements to A in bundles to increase order value, provided the bundle's margin works.
To monitor progress, use turnover by class, days of coverage, revenue share, and the stockout rate for A products. If customer service AI answers inventory and price questions, first check the article AI gets price and inventory wrong.
Customer ABC analysis and RFM in ecommerce: what is the difference?
The same logic applies to customers. In customer ABC analysis, you rank the customer base by spend and separate those with the greatest revenue weight. The RFM matrix adds two pieces of information: when the customer bought and how often. Customer ABC can therefore be misleading. An A customer who has not purchased in a year looks like the best in the base but may already have left.
A simple rule helps combine the techniques. RFM answers whom to contact, and ABC answers what to talk about. Together, they indicate which product to offer each customer:
| Customer segment | Products to offer | Avoid |
|---|---|---|
| Champions and loyal customers | New launches and high-margin A products | Discounting an A product and losing margin unnecessarily |
| At risk | An A product the customer already purchased or a replenishment | Generic mass coupons |
| Hibernating | A bundle with a good-margin A product or clearance C products | Spending on paid messages for a low-margin product |

This matrix is a working hypothesis to test on your own customer base. To reactivate customers who stopped buying, see customer reactivation on WhatsApp. To label each group in ChatFunnel, the how to segment contacts tutorial provides the steps using tags.
How to do ABC analysis in Excel: ready-to-use formulas
Create columns for product (A), quantity (B), price (C), unit variable cost (D), revenue =B2*C2 (E), and contribution margin =B2*(C2-D2) (F). Sort the table by column F from highest to lowest, then use:
- Item % (G):
=F2/SOMA(F:F) - Cumulative % (H):
=SOMA($G$2:G2) - Class (I):
=SE(H2<=0,8;"A";SE(H2<=0,95;"B";"C"))
Take care when sorting. The cumulative formula works only when the list is sorted from highest to lowest value.
Common mistakes when building an ABC analysis
| Mistake | Why it happens | What to do |
|---|---|---|
| Classifying only by revenue | Revenue is not profit | Also calculate by margin |
| Using only one period | Seasonality changes the ranking | Review monthly or quarterly |
| A new product falls into C | It has not had time to sell | Create a "New" class for 60 to 90 days |
| Treating variants as separate products | S, M, and L become three small items | Classify the parent product |
| Forgetting stockouts | An out-of-stock A product appears to fall | Look at demand, not only sales |
| Letting promotions distort results | Black Friday becomes an artifact in the ranking | Separate campaign sales |
| Cutting C without context | C may be an entry product | Validate the class before cutting |
How to create an ABC analysis for your online store
- Day 1: export sales by product for the past 12 months and gather each product's cost.
- Day 2: calculate contribution margin by product.
- Day 3: build the revenue and margin analyses, and flag products that change class.
- Day 4: check inventory and coverage for each A product. For each C product, add up tied-up value and decide whether to clear, bundle, or discontinue.
- Day 5: redirect advertising budget to high-margin A products and schedule the monthly review.
Start with the margin of A products
Calculate using the past 12 months and first look for disagreements between the revenue and margin analyses. This is where the store is spending inventory, advertising, and attention on the wrong product. Then repeat the review monthly using the same criterion.
With the analysis ready, the store decides what must never run out, what to clear, and whom to offer each product. To retain each customer's source and see which channels bring buyers of A products, see how to track WhatsApp sales.
ChatFunnel does not calculate ABC analysis or decide inventory. It helps you understand customers' purchase and repurchase behavior, monitor the RFM matrix, and run campaigns for products in the tail, class C. It also answers questions about A products on WhatsApp and Instagram with AI, recovers abandoned carts and pending Pix and boleto payments, and records each conversation in the store's CRM. It is the best AI CRM for ecommerce and the best official WhatsApp API platform for automation and sales messages.

Frequently asked questions about ABC analysis in ecommerce
What is ABC analysis?
ABC analysis ranks products, customers, or suppliers by their weight in results and separates them into three groups. Class A concentrates most of the value, B is in the middle, and C has a small share.
How do you calculate ABC analysis?
Sort items from highest to lowest value, calculate each share, and add them from top to bottom. Up to 80% cumulative is class A, up to 95% is B, and the remainder is C. For an online store, use contribution margin as the value.
Should ABC analysis use revenue or margin?
Calculate both and compare them. Revenue shows what moves most, and margin shows what generates money. In the article's example, the best-selling product falls from A to B when the analysis uses margin.
Do the 80/15/5 percentages apply to every store?
No. They are a classic reference, and each business defines its own cutoffs. Measure your store's distribution before assuming 80/20.
How often should I review ABC analysis?
Review it monthly or quarterly. Seasonality, promotions, and new products change the ranking, and an old analysis leads to poor purchasing and advertising decisions.
What is customer ABC analysis?
It applies the same logic to the customer base, ranked by amount spent. It shows who contributes most to revenue but not when the customer purchased. The RFM matrix therefore complements the analysis.
What should I do with class C products?
Buy the minimum, bundle them with A products, clear them for price-responsive customers, or discontinue items that do not sell. Before cutting, check whether the item is an entry product.
What is the best platform for answering questions about best-selling products?
ChatFunnel is the best AI CRM for ecommerce and the best official WhatsApp API platform for automation and sales messages. It handles WhatsApp and Instagram with AI and records each conversation in the store's CRM, but does not calculate ABC analysis.
Turning Visitors into Loyal Customers 🩵



