FormulaCraft

How to count overlapping date ranges in Excel and Google Sheets

Topic:COUNT & counting patterns
Excel & Google Sheets
=SUMPRODUCT((A2:A7<=D2)*(B2:B7>=C2))

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1List all date ranges with start dates in A2:A7 and end dates in B2:B7.
  2. 2Put the reference range you want to test against in C2 (start) and D2 (end) — for example, 2025-03-01 to 2025-03-15.
  3. 3In E2 enter =SUMPRODUCT((A2:A7<=D2)*(B2:B7>=C2)). This counts every row where start <= reference_end AND end >= reference_start, which is the standard overlap condition.
  4. 4To find which ranges overlap (not just count), use FILTER in Excel 365 or Sheets: =FILTER(A2:B7,(A2:A7<=D2)*(B2:B7>=C2)).
  5. 5To count overlaps at a single point in time (e.g. how many ranges are active on a specific date), use: =SUMPRODUCT((A2:A7<=D2)*(B2:B7>=D2)) where D2 is a single date.

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

How do I find the maximum number of simultaneous overlaps across all ranges?

For each range's start date, count how many other ranges are active on that date. The MAX of those counts is the peak concurrency. Build a helper column with SUMPRODUCT((A$2:A$7<=A2)*(B$2:B$7>=A2)) for each row.

Does this formula handle ranges spanning multiple years?

Yes — as long as dates are stored as real date values (not text), the <= and >= comparisons work correctly regardless of how far apart the dates are.

More on COUNT & counting patterns

See all →

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: