# How to count new customers per month in Excel

Count orders in the month whose customer has no earlier order: `=SUMPRODUCT(($B$2:$B$15>=E2)*($B$2:$B$15<=EOMONTH(E2,0))*(COUNTIFS($A$2:$A$15,$A$2:$A$15,$B$2:$B$15,"<"&$B$2:$B$15)=0))`.

**Excel:** `=SUMPRODUCT(($B$2:$B$15>=E2)*($B$2:$B$15<=EOMONTH(E2,0))*(COUNTIFS($A$2:$A$15,$A$2:$A$15,$B$2:$B$15,"<"&$B$2:$B$15)=0))` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E | F |
| --- | --- | --- | --- | --- | --- |
| Customer | Order date |  |  | Month | New customers |
| Northwind | 2026-01-04 |  |  | 2026-01-01 |  |
| Contoso | 2026-01-09 |  |  | 2026-02-01 |  |
| Northwind | 2026-01-20 |  |  | 2026-03-01 |  |
| Fabrikam | 2026-01-28 |  |  |  |  |
| Contoso | 2026-02-03 |  |  |  |  |
| Litware | 2026-02-11 |  |  |  |  |
| Northwind | 2026-02-17 |  |  |  |  |
| Adatum | 2026-02-25 |  |  |  |  |
| Fabrikam | 2026-03-02 |  |  |  |  |
| Proseware | 2026-03-06 |  |  |  |  |
| Litware | 2026-03-12 |  |  |  |  |
| Wingtip | 2026-03-19 |  |  |  |  |
| Contoso | 2026-03-23 |  |  |  |  |
| Tailspin | 2026-03-30 |  |  |  |  |

Formula in F2, filled to F4: `=SUMPRODUCT(($B$2:$B$15>=E2)*($B$2:$B$15<=EOMONTH(E2,0))*(COUNTIFS($A$2:$A$15,$A$2:$A$15,$B$2:$B$15,"<"&$B$2:$B$15)=0))`

Result: 3; 2; 3

## How it works

The COUNTIFS part asks, for every order, how many orders the same customer placed before that date. A result of 0 marks the customer's first order. The other two tests keep orders inside the month, and SUMPRODUCT counts the rows where all three are true.

January has three first orders (Northwind, Contoso, Fabrikam); Northwind's second January order is not new because an earlier one exists.

## Other ways

- `=LET(c,UNIQUE($A$2:$A$15),f,MINIFS($B$2:$B$15,$A$2:$A$15,c),SUM((f>=E2)*(f<=EOMONTH(E2,0))))`: Excel 365: finds each customer's first order date with MINIFS, then counts the first dates in the month. Easier to read, and it never counts a customer twice.

## Common mistakes

- If a new customer places two orders on their very first day, the main formula counts both. The LET version counts customers, so it doesn't.
- Customers who bought before the data starts look new. Include enough history, or a "first order date" from your CRM.

## Questions

**How do I flag each first order with a helper column?**

Sort by date and use `=COUNTIF($A$2:A2,A2)=1` filled down; TRUE marks a first order. Then COUNTIFS on that column and the month.

**How do I count returning customers instead?**

Count distinct customers in the month and subtract the new ones.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/count-new-customers-per-month
