Home / Sheets questions cookbook / New vs returning customers
Google Sheets · Question cookbook

How to Count New vs Returning Customers in Google Sheets

Who bought for the first time this month, who came back, and how much of the revenue the regulars bring. Two helper columns and three formulas.

By · Published November 8, 2026

The short answer: give every order line its customer's first order date with =MINIFS($A$2:$A, $C$2:$C, C2), label it New or Returning, then count distinct customers of each kind per month. In the sample data, September 2026 had 2 new and 63 returning customers.

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: a first-order column, then COUNTUNIQUEIFS

Step 1, on the Orders tab. Type First order in L1 and, in L2 copied down, the earliest date this customer appears:

=MINIFS($A$2:$A, $C$2:$C, C2)

Type Type in M1 and, in M2 copied down, compare the order's month with the first order's month:

=IF(TEXT(A2,"yyyy-mm")=TEXT(L2,"yyyy-mm"), "New", "Returning")

A customer is new in the month of their first order, even if they order twice that month, and returning in every month after.

Step 2, on a summary tab. Months in column A from =DATE(2026,5,1) down with =EDATE(A2,1). Then in row 2, copied down:

=COUNTUNIQUEIFS(Orders!$C:$C, Orders!$M:$M, "New", Orders!$A:$A, ">="&$A2, Orders!$A:$A, "<"&EDATE($A2,1))
=COUNTUNIQUEIFS(Orders!$C:$C, Orders!$M:$M, "Returning", Orders!$A:$A, ">="&$A2, Orders!$A:$A, "<"&EDATE($A2,1))
=SUMIFS(Orders!$J:$J, Orders!$M:$M, "Returning", Orders!$A:$A, ">="&$A2, Orders!$A:$A, "<"&EDATE($A2,1)) / SUMIFS(Orders!$J:$J, Orders!$A:$A, ">="&$A2, Orders!$A:$A, "<"&EDATE($A2,1))

B counts new customers, C returning customers, D the share of the month's revenue from returning ones (format it as a percent).

Example on sample data
fx=COUNTUNIQUEIFS(Orders!$C:$C, Orders!$M:$M, "New", Orders!$A:$A, ">="&$A2, Orders!$A:$A, "<"&EDATE($A2,1))
ABCD
1MonthNew customersReturning customersRevenue from returning
2May 202616199.7%
3Jun 202615599.8%
4Jul 202635997.9%
5Aug 202616695.4%
6Sep 202626397.6%
7Oct 2026064100.0%
SummaryOrders

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

Big sheet? MINIFS on every row gets slow past a few thousand rows. One formula in L2 does the whole column: =ARRAYFORMULA(IF(C2:C="", , VLOOKUP(C2:C, SORT({C2:C, A2:A}, 2, TRUE), 2, FALSE))). It sorts customer and date by date, so VLOOKUP's first match is each customer's earliest order.

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("new vs returning customers by month from May to October 2026, where a new customer is one whose first order is in that month, and the share of revenue from returning customers", "table")

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

Example on sample data
fx=QUIRIZ("new vs returning customers by month from May to October 2026, where a new customer is one whose first order is in that month, and the share of revenue from returning customers", "table")
ABCD
1MonthNew customersReturning customersRevenue from returning
2May 202616199.7%
3Jun 202615599.8%
4Jul 202635997.9%
5Aug 202616695.4%
6Sep 202626397.6%
7Oct 2026064100.0%
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 a customer's first order date in Google Sheets?
MINIFS returns the earliest date for that customer: =MINIFS($A$2:$A, $C$2:$C, C2), where A is the order date and C the customer. For large sheets, a VLOOKUP over the data sorted by date does it in one ARRAYFORMULA.
How do I count unique customers per month?
COUNTUNIQUEIFS counts distinct values that meet conditions: =COUNTUNIQUEIFS(customer column, date column, ">="&month start, date column, "<"&EDATE(month start,1)).
What is a good repeat customer rate?
It depends on the business. A wholesale supplier, like the sample here, lives on repeat accounts, so most monthly revenue comes from returning customers. A gift shop may see mostly first-time buyers. Track your own trend rather than a benchmark.