Overlapping Dates Calculator
Count days shared by two date ranges.
How the Overlapping Dates Calculator Works
The Overlapping Dates Calculator compares two date ranges and returns the number of calendar days that both ranges share. Ranges with no common day return 0.
Enter range A
Enter the start and end date of the first period, such as a booking.
Enter range B
Enter the start and end date of the second period, such as a maintenance window.
Find the shared window
The overlap starts on the later of the 2 start dates and ends on the earlier of the 2 end dates.
Count shared days
The overlap is counted inclusively. A negative window means the ranges do not meet.
How the Count Is Calculated
The Overlapping Dates formula takes the later start and the earlier end of the two ranges.
Overlap = max(0, min(End A, End B) − max(Start A, Start B) + 1)- max(Start A, Start B)
- The first shared day: the later start date.
- min(End A, End B)
- The last shared day: the earlier end date.
- + 1
- Counts both shared boundary days.
- max(0, …)
- Returns 0 for ranges that do not overlap.
Example: Range A is 1–30 June 2026 and range B is 20 June – 15 July 2026. The shared window is 20–30 June, so the overlap is 11 days.
Worked Examples
The table shows overlap results for 5 pairs of ranges in 2026.
| Range A | Range B | Shared window | Overlap days |
|---|---|---|---|
| 1–30 Jun | 20 Jun – 15 Jul | 20–30 Jun | 11 |
| 1–31 Mar | 10–15 Mar | 10–15 Mar | 6 |
| 1–10 Jan | 10–20 Jan | 10 Jan | 1 |
| 1–10 Jan | 11–20 Jan | None | 0 |
| 1 Jan – 31 Dec | 1 Jul – 31 Dec | 1 Jul – 31 Dec | 184 |
What the Tool Measures
An Overlapping Dates Calculator is a tool that counts the days two date ranges have in common. The tool answers whether two periods clash and for how long.
Two ranges overlap only when each range starts on or before the end of the other range. Ranges that touch on 1 shared date overlap by exactly 1 day.
When to Use This Tool
There are 5 main uses of the Overlapping Dates Calculator, including booking conflicts and leave clashes.
Booking conflicts
Hotels and venues detect double bookings for the same room or hall.
Team leave clashes
Managers check how many days two employees are away at the same time.
Insurance overlap
Policy holders find days covered by 2 policies at once.
Prorated billing
Finance teams count the days a plan change overlaps a billing period.
Research periods
Analysts measure how long two study periods or campaigns ran together.