Units per transaction (UPT), also called basket size, is the average number of items in each order: total units sold divided by total orders.
Units per transaction = Units sold ÷ Number of orders
On the sample data below, six months come to 1.68.
Why it matters
UPT tells you whether customers buy one thing or build a basket. It is the metric that bundles, "frequently bought together" blocks and quantity discounts are meant to move.
Worked example
The table shows the columns this metric needs from six months of a made-up subscription brand. Add each column up over the six months, then put the totals into the formula:
| Month | Orders | Units sold |
|---|---|---|
| 2026-01 | 702 | 1,180 |
| 2026-02 | 748 | 1,250 |
| 2026-03 | 812 | 1,370 |
| 2026-04 | 771 | 1,290 |
| 2026-05 | 846 | 1,420 |
| 2026-06 | 917 | 1,530 |
| Total | 4,796 | 8,040 |
8,040 ÷ 4,796 = 1.68
Add up first, then divide. Averaging the six monthly figures gives a slightly different answer, because it counts a small month the same as a large one.
Month by month
| Month | Units per transaction |
|---|---|
| 2026-01 | 1.68 |
| 2026-02 | 1.67 |
| 2026-03 | 1.69 |
| 2026-04 | 1.67 |
| 2026-05 | 1.68 |
| 2026-06 | 1.67 |
UPT calculator
How to read it
Read it with average selling price. Average order value is UPT multiplied by average selling price, so a change in AOV always comes from one of the two, or both.
Common mistakes
- Decide how a multipack counts. A pack of three sold as one SKU is one unit to the warehouse and three to the customer; pick one and keep it.
- Free gifts added to an order inflate units without adding revenue. Exclude them or track them separately.
- Returned units should come off the total if you report UPT after returns; otherwise say it is gross.
Calculate units per transaction in Excel, SQL or Python
The quickest version, for the sample sheet laid out as in the CSV (headers in row 1, months in rows 2 to 7):
=SUM(O2:O7) / SUM(N2:N7)- Units per transaction in Excel and Google Sheets — per-month formula and zero-safe version
- Units per transaction in SQL — query by month and for the period
- Units per transaction in Python (pandas) — pandas script with expected output
Related metrics
See all business metrics, or the statistics methods that sit behind them.
Questions people ask
- What is units per transaction?
- Units per transaction (UPT), also called basket size, is the average number of items in each order: total units sold divided by total orders.
- How do you calculate units per transaction?
- Units per transaction = Units sold ÷ Number of orders. For example, with six months of sample data: 8,040 ÷ 4,796 = 1.68.
- What is the UPT formula in Excel?
- With the sample data laid out as in the downloadable CSV, =SUM(O2:O7) / SUM(N2:N7) gives the figure for the whole period. For one month, use =O2 / N2 and fill it down.
- What is a good units per transaction?
- There is no figure that is right for every business: it depends on your products, prices and channels. Read it with average selling price. Average order value is UPT multiplied by average selling price, so a change in AOV always comes from one of the two, or both.
Check how stable it is
A metric moves for ordinary reasons as well as real ones. These methods separate the two: the spread shows what a normal month looks like, the moving average smooths it, the z-score flags a month that is out of line and the trend line shows the direction.
Guides
About the data on this page
The figures come from a small made-up dataset, printed above in full so you can check every number by hand. Download it as monthly.csv. The results are computed from those rows when the page is built, and the Excel formulas, SQL and Python on these pages are run against the same rows before publishing, so the code and the answers agree.
To get these numbers from your own data without writing formulas, try AnalyzeIt: ask in plain words and it shows the working behind every figure.
Legal entity
Devansh Yadav
Moradabad, Uttar Pradesh
Governing law: Courts at Moradabad, Uttar Pradesh
Phone: +91 8433475698
Legal: legal@analyzeit.in