Cellwise Start free

Excel guide · 4 min read

How to calculate average order value in Excel

Quick answerAverage order value (AOV) = total revenue / number of orders. If your export has one row per line item, count unique order IDs instead of rows: =SUM(E2:E14)/COUNTA(UNIQUE(A2:A14)) in Excel 365. Here that's $270 across 8 orders, an AOV of $33.75.

Sample data

Every result on this page was calculated from this sheet by the same spreadsheet engine the Cellwise app uses.

ABCDEFGH
1OrderDateChannelItemLine totalSettingValue
2#1001Oct 2, 2026OnlineMug18Month startOct 1, 2026
3#1001Oct 2, 2026OnlineCoaster set12Month endOct 31, 2026
4#1002Oct 3, 2026MarketPrint A425
5#1003Oct 5, 2026OnlineMug18
6#1003Oct 5, 2026OnlinePrint A425
7#1003Oct 5, 2026OnlineTote bag22
8#1004Oct 9, 2026MarketCoaster set12
9#1005Oct 12, 2026OnlinePrint A340
10#1006Oct 15, 2026MarketMug18
11#1006Oct 15, 2026MarketTote bag22
12#1007Oct 21, 2026OnlineMug (replacement)0
13#1008Nov 2, 2026OnlinePrint A340
14#1008Nov 2, 2026OnlineMug18

Download this sheet as an Excel practice file (.xlsx)

The formula, and why AVERAGE gives the wrong answer

AOV answers one question: when someone checks out, how much do they spend? So the bottom of the fraction is orders, not rows. Most shop exports (Shopify, Etsy, WooCommerce, Square) list one row per item, so order #1003 with a mug, a print and a tote bag takes three rows.

That's why =AVERAGE(E2:E14) is wrong here. It averages the 13 line items and gives $20.77, which is the average item price, not the average order. Real orders are bigger than that because people buy more than one thing.

UNIQUE(A2:A14) lists each order ID once, and COUNTA counts them: 8 orders. Divide total revenue by that and you get the real AOV.

=SUM(E2:E14)/COUNTA(UNIQUE(A2:A14))

Result: 33.75

33.75: $270 of revenue across 8 orders.

Counting orders in older Excel (2019 and earlier)

UNIQUE needs Excel 365 or 2021. In older versions, SUMPRODUCT(1/COUNTIF(A2:A14,A2:A14)) counts distinct values: each row of order #1003 counts as 1/3, so the three rows add up to 1. It gives 8 here, the same as COUNTA(UNIQUE()).

It fails if the ID column has a blank cell (COUNTIF returns 0 and you get #DIV/0!), so trim the range to the rows that have data. If your export already has one row per order with an order total column, skip all of this: =AVERAGE(order_total_column) is the AOV.

=SUM(E2:E14)/SUMPRODUCT(1/COUNTIF(A2:A14,A2:A14))

Result: 33.75

33.75 again: the same 8 orders, counted without UNIQUE.

$0 orders, refunds and test orders

Order #1007 is a free replacement mug. It's a real shipment but not a sale, and it pulls the AOV down. Decide once whether orders like that count, then write the rule next to the number. To leave out orders with no paid lines, count only IDs that have a line above $0: that gives 7 orders and an AOV of $38.57.

Refunds work best as their own negative lines with the same order ID, so revenue stays net and the order still counts once. If a whole order was refunded, most people take it out of both the revenue and the order count. Delete test orders before you start. One $1 test order can move a small shop's AOV by a few dollars.

=SUM(E2:E14)/COUNTA(UNIQUE(FILTER(A2:A14,E2:E14>0)))

Result: 38.571428571

About 38.57: $270 across the 7 orders that had something paid on them.

AOV by month and by channel

One overall number hides the trend. Put the month start and end in cells (H2 and H3) and use the same two dates in both halves: SUMIFS adds October's revenue, and FILTER keeps October's order IDs before UNIQUE counts them. October comes to $212 over 7 orders.

For channels, swap the date test for the channel: =SUMIFS(E2:E14,C2:C14,"Market")/COUNTA(UNIQUE(FILTER(A2:A14,C2:C14="Market"))) gives $25.67 for the market stall and the Online version gives $38.60. That gap is useful to know. It might mean adding a bundle at the stall, or it might just be what people buy on the spot.

Copy the formula down a table of month starts (and EOMONTH for the ends) to get AOV per month next to the order count. Revenue grows from more orders, bigger orders or both, and that table shows which one moved.

=SUMIFS(E2:E14,B2:B14,">="&H2,B2:B14,"<="&H3)/COUNTA(UNIQUE(FILTER(A2:A14,(B2:B14>=H2)*(B2:B14<=H3))))

Result: 30.285714286

About 30.29: $212 of October revenue across 7 October orders.

Median order value: the check on one big order

An average can be dragged by one large order. The median is the middle order, so it shows what a typical customer spends. To get it from line items, first total each order: SUMIFS(E2:E14,A2:A14,UNIQUE(A2:A14)) returns one total per order (30, 25, 65, 12, 40, 40, 0, 58). MEDIAN then picks the middle.

Here the median is $35 and the mean is $33.75, so they tell the same story. When the mean sits well above the median, a few big orders are carrying it. Report both and look at those orders before you plan around the average.

=MEDIAN(SUMIFS(E2:E14,A2:A14,UNIQUE(A2:A14)))

Result: 35

35: the middle of the 8 order totals.

Common mistakes

Averaging the line-item column

=AVERAGE of line totals gives the average item price. Divide revenue by the number of unique order IDs.

Mixing gross and net revenue

Decide whether shipping, tax and discounts are in or out, and use the same column every month. Compare like with like.

Order IDs that don't match

"#1003" and "1003 " count as two orders. Clean the column with TRIM, or Find and Replace, before counting.

Dates exported as text

Text dates never match ">="&H2, so the month AOV comes out #DIV/0! or 0. Check with =ISNUMBER(B2) and fix with DATEVALUE or Data > Text to Columns.

FAQ

What is the formula for average order value?

Total revenue divided by the number of orders in the same period. In Excel: =SUM(revenue)/COUNTA(UNIQUE(order_ids)) when each row is a line item, or =AVERAGE(order_totals) when each row is already one order.

Should average order value include shipping and tax?

Pick one definition and keep it. Many shops leave tax out, because it isn't theirs to keep, and report AOV on product revenue. Whatever you choose, use the same column for every month so the trend means something.

How do I calculate AOV in a pivot table?

Put revenue in Values as Sum, and the order ID in Values as a Distinct Count. Distinct Count only appears if you tick "Add this data to the Data Model" when you create the pivot. Then add a column next to it that divides one by the other.

What's the difference between AOV and average revenue per customer?

AOV divides by orders, revenue per customer divides by unique customers. A customer who orders three times counts three times in AOV and once per customer. Swap the order ID column for the customer column to get the second one.

Functions used

Related guides

Updated