Get instant live expert help with Excel or Google Sheets
“My Excelchat expert helped me in less than 20 minutes, saving me what would have been 5 hours of work!”

Post your problem and you’ll get expert help in seconds.

Your message must be at least 40 characters
Our professional experts are available now. Your privacy is guaranteed.
All articles DATE AND TIME Calculate date overlap in days

Calculate date overlap in days

To effectively manage projects or activities we encounter a situation we need to determine how many days of project 1 fall into project 2. Using the same approach, we can also calculate how many days of a project date range (start date and end date) overlap with a specific date range (a given start and end date).

Figure 1. Calculation of Date Overlap in Days

Calculating Date Overlap in Days with Specific Date Range

When we have a list of projects’ date ranges and we want to see how many days of each project fall between a specific date range then we need to calculate date overlap in days. When we want to calculate the number of days between two dates then we simply subtract the start date from the end date, such as;

=End_Date - Start_Date +1

Note: To include both start date and end date, we offset the result by adding 1

Following the same rule, first we need to find out “End Date”, whichever is lower between two end dates, using the MIN function, and then we need to find out “Start Date”, whichever is higher between two start dates, using the MAX function. Finally, we subtract the “Start Date” from the earlier “End Date” in the following formula syntax;

=MAX(MIN(End1,End2)-MAX(Start1,Start2)+1,0)

Here, the outer MAX function is used to trap the negative value and returns zero instead. In our example, to calculate date overlap in days of each project’s date range with specific date range we need to apply the following formula in cell E2 and copy down to other cells in column E;

=MAX(MIN($H$3,D2)-MAX($H$2,C2)+1,0)

Figure 2. Calculating Date Overlap in Days with Specific Date Range

Calculating Date Overlap in Days Between Two Date Ranges

When we want to know how many days of one date range fall into another date range then we need to calculate date overlap in days between two date ranges or projects. Using the same approach, we will use the following formula in cell E3 to find out how many days of Project 1 fall into Project 2 and so on;

=MAX(MIN(D2,D3)-MAX(C2,C3)+1,0)

Copy down the formula to other cells.

Figure 3. Calculating Date Overlap in Days Between Two Date Ranges

Instant Connection to an Expert through our Excelchat Service

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.

Did this post not answer your question? Get a solution from connecting with the expert.

Another blog reader asked this question today on Excelchat:

Leave a Comment

avatar

Subscribe to Excelchat.co

Get updates on helpful Excel topics

Subscribe to Excelchat.co

Did this post not answer your question?
Get a solution from connecting with the expert

Another blog reader asked this question today on Excelchat:

Post your problem and you’ll get expert help in seconds.

Your message must be at least 40 characters
Our professional experts are available now. Your privacy is guaranteed.
Trusted by people who work at
Amazon.com, Inc
Facebook, Inc
Accenture PLC
Siemens AG
Macy's
The Allstate Corporation
United Parcel Service
Dell Inc