To count how many dates fall within a period — orders this month, sign-ups between two dates — use COUNTIFS with a start and end boundary. Two conditions on the same column fence the window.
The example
Order dates; count how many fall in February.
| A | B | D | E | ||
|---|---|---|---|---|---|
| 1 | Order date | Window | Count | ||
| 2 | 1/28 | Feb 1 | 2 | ||
| 3 | 2/05 | Feb 28 | |||
| 4 | 2/19 | ||||
| 5 | 3/02 |
The formula
Orders in February (between D2 and E2 dates):
How it works
Two date conditions create the window:
A2:A5, ">="&D2keeps dates on or after Feb 1. The&joins the operator to the date cell.A2:A5, "<="&E2keeps dates on or before Feb 28.- COUNTIFS counts rows passing both — the two February dates →
2. - Add another condition pair (e.g. region) to count dates in range and matching a category.
Try it: interactive demo
Pick a start and end date; count how many of the sample dates fall inside.
Variations
Count dates in a month with EOMONTH
One start cell drives the whole month:
Count dates after a date
Just one boundary:
Count dates in range AND a category
Add a third condition:
Pitfalls & errors
Operators must be quoted and joined. Write ">="&E1, not ">=E1" (which compares to the literal text “E1”).
Text dates won’t compare. If the date column is left-aligned text, COUNTIFS returns 0. Convert to real dates first.
Times can exclude the end day. A date with a time stamp like Feb 28 3pm is still ≤ Feb 28? Only if you compare to end-of-day. Use < next-day or strip the time if rows have timestamps.
Practice workbook
Frequently asked questions
How do I count dates between two dates in Excel?
How do I count dates in a specific month?
Why does my date count return 0?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class