Tabellab

Return Rates by Category and Size with COUNTIFS

Lesson 1 of 20Lab

All lessons
  1. Return Rates by Category and Size with COUNTIFSLabFree
  2. Return Reasons: Shares, Cumulative Share and the Pareto ChartLab Locked
  3. Cost per Return: Shipping, Handling, Refurbishment and Write-offsLab Locked
  4. Refund vs Exchange vs Store Credit: the Resolution Mix and Its Margin EffectLab Locked
  5. Restock Rate and Value Recovery: New, Open Box or Write-offLab Locked
  6. Serial Returners: Returns per Customer, Thresholds and Review FlagsLab Locked
  7. Return Window and Time to Refund: Date Maths and Service LevelsLab Locked
  8. Policy Scenario: Paid Returns, Fewer Returns vs Lost Sales (with Chart)Lab Locked
  9. Return Lag: Cumulative Return Curves and the Expected Final Rate of Recent MonthsLab Locked
  10. Returns Reserve: Expected Refunds on Recent Sales, Recovered Value and the Net ReserveLab Locked
  11. Bracketing: Orders with Several Sizes of the Same Style and Their Return RateLab Locked
  12. Reasons by Category: Shares within Each Category, an Index vs the Shop and a Heat MapLab Locked
  13. SKU Watchlist: Return Rate Index vs Category, Minimum Volume and Excess ReturnsLab Locked
  14. Return Shipping Options by Zone: Drop-off, Pickup or a Consolidation Hub and Its Break-even VolumeLab Locked
  15. Post-Peak Returns Backlog: Daily Arrivals, Processing Capacity and the Day It ClearsLab Locked
  16. Refunds Without Return: When Taking a Cheap Item Back Costs More Than It RecoversLab Locked
  17. Net Sales After Returns by Marketing Channel: Net Revenue, Return Cost and Contribution per OrderLab Locked
  18. True Margin After Returns: a Per-Unit Bridge from List Margin to True Margin, with a WaterfallLab Locked
  19. Returns Forecast for the Next Quarter: Sales Plan × Return Rates, Seasonality, Lag and the BudgetLab Locked
  20. Final Project: Monthly Returns KPI Dashboard with Targets, Status Flags and a Trend ChartLab Locked

You are not signed in — the lab works, but your progress is not saved. Sign up

Lesson 1 of 20 is free. Unlock all 20 hands-on labs, the final exam and your certificate.

Buy course — $9.90
Loading the spreadsheet…

Why returns are the hidden cost every online shop needs to measure

If you run or analyse an online shop, returns are probably the largest cost that never appears as a single line in the profit and loss statement. A returned parcel costs outbound shipping that is not recovered, return shipping, handling in the warehouse, sometimes refurbishment, and often a markdown or a write-off. Apparel retailers in particular see a significant share of their orders come back. Yet when the operations team is asked "what is our return rate?", the answer is usually one number for the whole shop, and one number hides almost everything you need to act on.

This free first lesson teaches the analysis that every returns project starts with: what comes back, and how often, by category and by size? You will use COUNTIF, COUNTIFS and SUMIF to build return rates per category and per apparel size, compare the rate by units with the rate by value, and name the problem category with INDEX and MATCH. The example company is Brightloop, a fictional online shop selling apparel, electronics and accessories, about 6,500 orders a month. All data are illustrative. The lesson is written for e-commerce managers, operations and logistics analysts, category managers, and finance people who have to explain why margin is lower than the sales report suggests.

The core concept: a return rate is always "returned ÷ sold" for the same group

The definition sounds trivial, but most errors in returns reporting come from breaking it. Return rate = returned lines ÷ lines sold, and both numbers must describe the same group: the same category, the same size, the same month. If you divide apparel returns by all lines sold, you get apparel's share of total sales that came back, not apparel's return rate. If you divide September returns by September sales while many September returns belong to August orders, you mix two periods. In the lab, every line has a flag in column E (Yes or No), so the returns and the sales come from exactly the same rows.

Two functions do the counting. COUNTIF(range, criterion) counts the rows that meet one condition, such as "category is Apparel". COUNTIFS(range1, criterion1, range2, criterion2, …) counts the rows that meet all conditions at once, such as "category is Apparel and returned is Yes". The two conditions are tested on the same row, which is exactly what you want. Divide one by the other and you have the return rate for that group.

The second idea in this lesson is that units and value tell different stories. A rate by units treats a 15 USD scarf and a 349 USD speaker as one line each. A rate by value weights each line by its price: SUMIF(returned, "Yes", prices) ÷ SUM(prices). When the value rate is higher than the unit rate, expensive items come back more often than cheap ones, and the financial damage is bigger than the line count suggests. That is usually the number finance cares about.

Worked example: 30 order lines from September

The lab uses a sample of 30 order lines so the sheet stays readable. Column B holds the category, C the size (n/a for non-apparel items), D the price in USD and E whether the line was returned. The data run from row 4 to row 33. Below the data, the summary tables start in row 35 (categories) and row 40 (sizes). Here are the category results with the exact formulas you would enter in row 36 and copy down.

Brightloop, September 2026 sample (illustrative)
CategoryLines (B)Returns (C)Return rate (D)Value soldValue returnedRate by value
Apparel14642.9%USD 769USD 40052.0%
Electronics9222.2%USD 1,421USD 59842.1%
Accessories7114.3%USD 184USD 4524.5%
All lines30930.0%USD 2,374USD 1,04343.9%

The formulas used in the lab
CellFormulaResult
B36 (lines)=COUNTIF($B$4:$B$33,A36)14
C36 (returns)=COUNTIFS($B$4:$B$33,A36,$E$4:$E$33,"Yes")6
D36 (return rate)=C36/B3642.9%
B44 (XL lines)=COUNTIF($C$4:$C$33,A44)3
C44 (XL returns)=COUNTIFS($C$4:$C$33,A44,$E$4:$E$33,"Yes")2
D44 (XL rate)=C44/B4466.7%
D46 (rate by value)=SUMIF(E4:E33,"Yes",D4:D33)/SUM(D4:D33)43.9%
D47 (worst category)=INDEX(A36:A38,MATCH(MAX(D36:D38),D36:D38,0))Apparel

Read the numbers. Apparel returns 6 out of 14 lines, a rate of 42.9%, three times the accessories rate of 14.3%. Electronics looks moderate at 22.2% of lines, but its two returns are a 349 USD speaker and a 249 USD item, so by value 42.1% of electronics revenue came back. Across all 30 lines, 30% of lines but 43.9% of value was returned. That gap is the first insight to bring to a meeting: the problem is more expensive than the unit count shows, and it is concentrated in two places, apparel (by frequency) and high-priced electronics (by value).

Return rate by units vs by value0%20%40%60%43%52%Apparel22%42%Electronics14%25%Accessories30%44%All linesBy units (lines)By value (USD)
Figure 1. Return rate by units and by value per category in the Brightloop sample (illustrative). Electronics nearly doubles when you weight lines by price.

Cutting apparel by size: the size chart test

Inside apparel, the size split often explains a large part of the returns. When customers are unsure about fit, the edges of the size range come back more often, which can point to a size chart or a product description that does not match the actual garment. In the sample, M has the lowest rate (1 of 4 lines, 25%), S is at 33.3%, L at 50% and XL at 66.7%. The rising rate towards the larger sizes is the pattern a category manager would investigate first: check the measurements on the size chart against the garments, read the return reasons for L and XL, and compare with a competitor's chart.

One detail matters in the formula: for the size rate, divide by the lines of that size, not by all apparel lines. COUNTIF($C$4:$C$33,A44) counts only the XL lines. Because non-apparel rows hold n/a in the size column, they never match S, M, L or XL, so you do not need a third condition for the category. With only three or four lines per size, the sample is of course far too small for a decision. In practice you run the same formulas over thousands of lines, and the lesson on return reasons shows how to confirm a fit problem with the customers' own words.

Apparel return rate by size0%20%40%60%80%33%S25%M50%L67%XLReturn rateApparel average 42.9%
Figure 2. Apparel return rate by size against the apparel average (illustrative sample). The larger sizes come back more often, a first hint at a fit issue.

Step by step: how to build return rates in Excel

  1. Export order lines, not orders, from your shop system or ERP: one row per item with order date, SKU, category, size, price and a returned flag (or the return date). One order with three items should become three rows.
  2. Convert the range into a table with Ctrl+T (Insert > Table). Tables grow automatically when you paste next month's data, and formulas can use names like Table1[Category] instead of fixed ranges.
  3. If your export has a return date instead of a flag, add a column with =IF(F4="","No","Yes") so every line is clearly Yes or No.
  4. List the categories below or beside the data. In Excel 365, =SORT(UNIQUE(B4:B33)) builds the list automatically; otherwise use Data > Remove Duplicates on a copy.
  5. Count lines per category with =COUNTIF($B$4:$B$33,A36). Press F4 to lock the data range so it stays fixed when you copy down.
  6. Count returns per category with =COUNTIFS($B$4:$B$33,A36,$E$4:$E$33,"Yes"). Text criteria go in double quotes; the cell reference A36 does not.
  7. Divide returns by lines and format as a percentage with Ctrl+Shift+5. Wrap it in IFERROR(…,"") if some groups can have zero lines.
  8. Repeat for sizes using column C, then add the rate by value with =SUMIF(E4:E33,"Yes",D4:D33)/SUM(D4:D33).
  9. Find the worst category with =INDEX(A36:A38,MATCH(MAX(D36:D38),D36:D38,0)), then highlight the rates with Home > Conditional Formatting > Color Scales so the problem stands out at a glance.
  10. Chart it: select the category names and both rates, Insert > Clustered Column. Put units and value side by side as in Figure 1.
Use a PivotTable as a cross-check. Insert > PivotTable, put Category in Rows, Returned in Columns and Line in Values (Count). The counts must match your COUNTIFS results. If they do not, look for trailing spaces or different spellings in the category column.

How to present the result so people act on it

A table of rates is only half the job. When you take the analysis to the operations or category team, lead with one sentence that combines frequency and money, for example: "Apparel returns most often, 43% of lines, but by value electronics is almost as exposed, because the items that come back are the expensive ones." Then show Figure 1 and Figure 2, and put the line counts next to every rate so nobody over-reads a group of three items.

Next, turn each finding into a question that the rest of the analysis can answer. Is the XL problem about fit, quality or customers ordering two sizes? That needs the return reasons. Is a 42% value rate in electronics expensive, or are most of those items resold as new? That needs grading and recovery data. And is apparel worth fixing first? That needs the cost per return. Writing these questions down early keeps a returns project focused on decisions instead of on ever more detailed reports.

Finally, agree on the definition before anyone compares numbers. Write down whether the rate is by line or by order, by units or by value, by order month or return month, and whether exchanges count as returns. Two teams using two definitions can both be correct and still argue for weeks. Put the definition in a short note directly under the table.

Excel lab for e-commerce returns analytics with order lines, categories, sizes and return rates
The E-commerce Returns Analytics course: one fictional shop, eight hands-on Excel labs.

Common mistakes and how to spot them

  • Wrong denominator. Dividing apparel returns by all 30 lines gives 20%, which is apparel's share of the lines that came back, not its return rate. If your category rates add up to the overall rate, you used the wrong denominator.
  • Mixing orders and lines. An order with three items of which one is returned is one returned order but only a 33% line return rate. Decide which unit you report and stick to it.
  • Unlocked ranges. If the counts for the second and third category are suspiciously small, the data range moved when you copied the formula. Use $B$4:$B$33.
  • Text that only looks the same. "Apparel " with a trailing space or "yes" vs "Yes" can break counts in some systems. Clean the columns with TRIM and use Data > Data Validation lists for new data. (COUNTIFS itself is not case-sensitive, but other tools and joins may be.)
  • Timing mismatch. Returns arrive weeks after the sale. Measure the rate per order month (cohort) and wait until the return window has closed, or recent months will look better than they are.
  • Ignoring value. A category with a low unit rate but expensive items can cost more than a high-rate category with cheap items. Always show the rate by value next to the rate by units.
  • Small samples. Three XL lines prove nothing. Before you act on a size or SKU rate, check how many lines it is based on, and show the line count next to every rate.

Quick reference: functions and shortcuts used

All functions below work in Excel 2010 and later, except UNIQUE, SORT and XLOOKUP, which need Excel 365 or Excel 2021.

Function / shortcutWhat it does hereExample
COUNTIFLines sold in one group=COUNTIF($B$4:$B$33,A36)
COUNTIFSReturned lines in one group (all conditions on the same row)=COUNTIFS($B$4:$B$33,A36,$E$4:$E$33,"Yes")
SUMIFValue of the returned lines=SUMIF(E4:E33,"Yes",D4:D33)
SUMIFSReturned value for one category=SUMIFS(D4:D33,B4:B33,A36,E4:E33,"Yes")
INDEX + MATCHName of the category with the highest rate=INDEX(A36:A38,MATCH(MAX(D36:D38),D36:D38,0))
UNIQUE, SORT (365)Automatic list of categories=SORT(UNIQUE(B4:B33))
IFERRORHide #DIV/0! for empty groups=IFERROR(C36/B36,"")
Ctrl+TConvert the range to a tableClick inside the data
F4Lock a range with $ signsClick the range in the formula
Ctrl+Shift+5Percentage formatSelect D36:D44

Real-world uses

  • Size chart fix. An apparel brand sees XL coming back far more often than M for one product line, checks the garment measurements against the chart, corrects them and tracks the XL rate over the next three months with the same COUNTIFS block.
  • Supplier review. A marketplace calculates return rates by supplier with COUNTIFS on a supplier column and brings the worst five, by value, to the next supplier meeting with the evidence.
  • Product page improvements. A shop finds that one electronics SKU has a high rate by value and adds a compatibility table to the product page, then compares the rate before and after.
  • Budgeting returns cost. Finance uses the rate by value per category to forecast refunds in next year's budget, instead of applying one flat percentage to all sales.
  • Marketing quality. By adding the traffic source as a third criterion in COUNTIFS, a growth team checks whether a discount campaign brought customers who return more often.

What you will build in the rest of this course

This first lesson is free. The lessons below belong to the paid course (USD 9.90 one-time) and continue with Brightloop, so you move from "what comes back" to "what it costs and what to do about it".

Return Reasons: Shares, Cumulative Share and the Pareto Chart. You turn reason codes from the returns portal into shares and a cumulative share, measure how much of the problem is fit, and build the Pareto chart that shows where to focus first.

Cost per Return: Shipping, Handling, Refurbishment and Write-offs. You build the full cost of one return per category, the monthly return cost, the weighted average cost per return and its share of net sales, the figure that turns returns from an operations topic into a board topic.

Refund vs Exchange vs Store Credit: the Resolution Mix and Its Margin Effect. You split returns by resolution, calculate the margin each one keeps and put a monthly value on shifting customers from refunds towards exchanges.

Restock Rate and Value Recovery: New, Open Box or Write-off. You follow returned units through grading and calculate the restock rate, the value recovered and the recovery rate per category, so you know what a return really costs after resale.

Serial Returners: Returns per Customer, Thresholds and Review Flags. You count orders and returns per customer, calculate individual return rates and flag customers above both thresholds for a fair, rule-based review.

Return Window and Time to Refund: Date Maths and Service Levels. You measure how long customers take to request a return, count requests outside the window, and check how many refunds meet the promised service level.

Policy Scenario: Paid Returns, Fewer Returns vs Lost Sales (with Chart). The decision lesson: you model what a 4.95 USD return fee does to orders, returns, margin, return costs and fee income, and chart both policies side by side.

Summary

A useful return rate is always returned ÷ sold for the same group. COUNTIF counts the lines, COUNTIFS counts the returned lines with both conditions on the same row, and SUMIF turns the rate into a value rate. In the Brightloop sample, 30% of lines but 43.9% of value came back, apparel is the worst category at 42.9%, and within apparel the larger sizes return most often. Now scroll up to the lab, fill in the category and size tables yourself and let the Coach check each step. It takes about 16 minutes, and the same block of formulas will work on your own export of thousands of lines.

Frequently asked questions

How do you calculate the return rate in Excel?

Divide the returned lines by the lines sold for the same group. For a category that is =COUNTIFS(categories,A36,returned,"Yes")/COUNTIF(categories,A36).

What is the difference between COUNTIF and COUNTIFS?

COUNTIF counts rows that meet one condition. COUNTIFS counts rows that meet several conditions at the same time, such as a category and a returned flag on the same row.

Should I measure returns by units or by value?

Both. The unit rate shows how often items come back, the value rate (returned value divided by sold value) shows how much revenue is at stake. If the value rate is higher, expensive items are returned more often.

How do I calculate the return rate by value in Excel?

Use =SUMIF(returned,"Yes",prices)/SUM(prices). It adds up the prices of the returned lines and divides by the total price of all lines.

Why do larger or smaller sizes have higher return rates?

Customers who are unsure about fit often order the edge sizes or several sizes at once. A rate that rises at the edges of the size range can point to a size chart that does not match the garments, which you should confirm with the return reasons.

Should return rates be measured by order month or return month?

For a clean rate, measure by order month and wait until the return window has closed, so returns are linked to the sales they belong to. Dividing one month's returns by the same month's sales mixes different orders.

Keep going: E-commerce Returns Analytics: Return Rates, Reasons, Reverse Logistics Cost

This free lab is lesson 1 of 20. Unlock the other 19 hands-on labs, the final exam and your certificate for a one-time $9.90.

  1. Return Reasons: Shares, Cumulative Share and the Pareto Chart
  2. Cost per Return: Shipping, Handling, Refurbishment and Write-offs
  3. Refund vs Exchange vs Store Credit: the Resolution Mix and Its Margin Effect
  4. Restock Rate and Value Recovery: New, Open Box or Write-off
  5. Serial Returners: Returns per Customer, Thresholds and Review Flags
  6. Return Window and Time to Refund: Date Maths and Service Levels
  7. Policy Scenario: Paid Returns, Fewer Returns vs Lost Sales (with Chart)
  8. Return Lag: Cumulative Return Curves and the Expected Final Rate of Recent Months
  9. Returns Reserve: Expected Refunds on Recent Sales, Recovered Value and the Net Reserve
  10. Bracketing: Orders with Several Sizes of the Same Style and Their Return Rate
  11. Reasons by Category: Shares within Each Category, an Index vs the Shop and a Heat Map
  12. SKU Watchlist: Return Rate Index vs Category, Minimum Volume and Excess Returns
  13. Return Shipping Options by Zone: Drop-off, Pickup or a Consolidation Hub and Its Break-even Volume
  14. Post-Peak Returns Backlog: Daily Arrivals, Processing Capacity and the Day It Clears
  15. Refunds Without Return: When Taking a Cheap Item Back Costs More Than It Recovers
  16. Net Sales After Returns by Marketing Channel: Net Revenue, Return Cost and Contribution per Order
  17. True Margin After Returns: a Per-Unit Bridge from List Margin to True Margin, with a Waterfall
  18. Returns Forecast for the Next Quarter: Sales Plan × Return Rates, Seasonality, Lag and the Budget
  19. Final Project: Monthly Returns KPI Dashboard with Targets, Status Flags and a Trend Chart

Buy course — $9.90 See the full course