Calculation Number Of Days

Instant date span, business days & live distribution

Overlapping Dates Calculator

Count days shared by two date ranges.

Result
—

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.

  1. Enter range A

    Enter the start and end date of the first period, such as a booking.

  2. Enter range B

    Enter the start and end date of the second period, such as a maintenance window.

  3. 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.

  4. 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 ARange BShared windowOverlap days
1–30 Jun20 Jun – 15 Jul20–30 Jun11
1–31 Mar10–15 Mar10–15 Mar6
1–10 Jan10–20 Jan10 Jan1
1–10 Jan11–20 JanNone0
1 Jan – 31 Dec1 Jul – 31 Dec1 Jul – 31 Dec184

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.