Home / Sheets questions cookbook / Best-selling products
Google Sheets · Question cookbook

How to Find Your Best-Selling Products in Google Sheets

The products that move the most units, with the revenue beside them so you can see when "best-selling" and "most valuable" disagree.

By · Published November 8, 2026

The short answer: =QUERY(Orders!A:K, "select F, sum(H), sum(J) where year(A) = 2026 group by F order by sum(H) desc limit 10 label sum(H) 'Units', sum(J) 'Revenue'", 1). In the sample data, House Blend 5 lb leads with 5,927 units in 2026.

The sample data

ABCDEFGHIJK
1DateOrder IDCustomerRegionChannelProductCategoryQtyUnit priceRevenueCost
22025-01-01SO-10001Tin Roof CaféNortheastSales repSip Lids (case of 1,000)Supplies654324198
32025-01-01SO-10001Tin Roof CaféNortheastSales repEspresso Roast 5 lbCoffee1068680370
42025-01-01SO-10002Foxglove CaféNortheastOnline storeSip Lids (case of 1,000)Supplies1545433
52025-01-01SO-10002Foxglove CaféNortheastOnline storeCold Brew Concentrate 1 galCoffee842336152
62025-01-01SO-10003Ember CaféMidwestOnline storeSip Lids (case of 1,000)Supplies454216132
…8,115 more rows
Orders

Sample data: a tab named Orders with 8,120 order lines from January 2025 to October 2026, one row per order line. Revenue is Qty × Unit price; Cost is the line's cost of goods (Qty × unit cost). Download orders.csv and import it (File → Import) to follow along. The business is fictional.

The classic way: QUERY on units

Column F is Product, H is Qty and J is Revenue. In A1 of a new tab:

=QUERY(Orders!A:K, "select F, sum(H), sum(J) where year(A) = 2026 group by F order by sum(H) desc limit 10 label sum(H) 'Units', sum(J) 'Revenue'", 1)

sum(H) adds the quantity on every line of each product, order by sum(H) desc ranks by units, and the revenue column comes along for context. To rank by revenue instead, change the order by to sum(J) desc.

Example on sample data
fx=QUERY(Orders!A:K, "select F, sum(H), sum(J) where year(A) = 2026 group by F order by sum(H) desc limit 10 label sum(H) 'Units', sum(J) 'Revenue'", 1)
ABC
1ProductUnitsRevenue
2House Blend 5 lb5,927$367,474
3Espresso Roast 5 lb4,758$323,544
4Oat Milk 32 oz (case of 12)2,208$86,112
5Cold Brew Concentrate 1 gal1,582$66,444
612 oz Hot Cups (case of 1,000)1,301$124,896
7Chai Concentrate 32 oz (case of 6)1,238$56,948
8Earl Grey Loose Leaf 1 lb1,095$30,660
9Sip Lids (case of 1,000)952$51,408
10Ethiopia Single Origin 5 lb892$74,928
11Vanilla Syrup 750 ml (6-pack)829$39,792
SummaryOrders

Computed from the sample CSV above. Cells formatted as currency and percent.

Look at both columns. On the sample data, Ethiopia Single Origin 5 lb ranks ninth by units (892) but fifth by revenue ($74,928) among these ten. Units tell you what to keep in stock; revenue tells you what pays the bills.

Gotchas

The one-cell way: =QUIRIZ

With the Quiriz add-on for Google Sheets, you type the question instead of building the formula. =QUIRIZ does not read the cells around it: it answers from the datasets in your Quiriz account. For this example, upload orders.csv as a dataset, or connect your Shopify store. You can also add a Google Sheet itself as a dataset that refreshes on a schedule. Then, in any empty cell:

=QUIRIZ("top 10 products by units sold in 2026, with their revenue", "table")

The "table" mode spills the answer down and to the right from that cell, header row first:

Example on sample data
fx=QUIRIZ("top 10 products by units sold in 2026, with their revenue", "table")
ABC
1ProductUnitsRevenue
2House Blend 5 lb5,927$367,474
3Espresso Roast 5 lb4,758$323,544
4Oat Milk 32 oz (case of 12)2,208$86,112
5Cold Brew Concentrate 1 gal1,582$66,444
612 oz Hot Cups (case of 1,000)1,301$124,896
7Chai Concentrate 32 oz (case of 6)1,238$56,948
8Earl Grey Loose Leaf 1 lb1,095$30,660
9Sip Lids (case of 1,000)952$51,408
10Ethiopia Single Origin 5 lb892$74,928
11Vanilla Syrup 750 ml (6-pack)829$39,792
Sheet1

Same figures as the formula result above, from the same sample data. The spilled cells are plain numbers, so you can format them, total them or chart them; here they are formatted as currency and percent. Column headings are written with each answer and may be worded differently.

The other modes: "verbose" (the default) answers in a sentence, "bullets" writes two to four points one per cell, and "notes" adds how the figure was calculated. Install Quiriz for Google Sheets and try the question on your own data.

Ask the question, get the table

Quiriz answers business questions in a Google Sheets cell, from your imported files, scheduled Google Sheets and connected tools. Free to start.

Install for Google Sheets →

Free on the Google Workspace Marketplace. Or try it on sample data first, no signup.

Frequently asked questions

How do I find the most sold item in Google Sheets?
Group by product and sum the quantity column: =QUERY(data, "select F, sum(H) group by F order by sum(H) desc limit 1", 1). Without QUERY, list the products with UNIQUE, total them with SUMIF, and sort.
Should I rank products by units or by revenue?
Both answer different questions. Units show what moves off the shelf, which matters for stock. Revenue shows what earns, which matters for priorities. Gross profit is better still if you have cost data.
How do I find slow-moving products?
Reverse the sort: order by sum(H) asc shows the fewest units first. Products with no sales at all will not appear in the QUERY, so compare against your full product list.