Count dates shared by two periods

Turn November 4 to 10 and November 10 to 20, 2026 into 1 shared date.

What you'll make

In Excel: November 4–10, 2026 and November 10–20, 2026 becomes 1 shared date.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1MIN(B8,D8)The earlier of the two end dates.11/10/2026
2-MAX(A8,C8)Takes away the later of the two start dates.0
3+1Adds one so both end dates count.1
4MAX(0, … )Shows 0 when the periods share no dates.1

Read it left to right. MAX wraps everything, so it works last. Both end dates count.

=MAX(0,MIN(B8,D8)-MAX(A8,C8)+1)

How to use it

Yellow bar at the top? Click Enable Editing.

  1. See it work. The Example tab shows 20 made-up examples with the formula already in.
  2. Use your own dates. Paste each period's start and end dates into the green columns of the Template tab. The shared dates fill in by themselves.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

Put each start on or before its own end. If an end comes first, the count is wrong.

Microsoft's help: MIN function