Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • How to calculate correlation coefficient Correlation in Excel
  • Conditional Formatting Data bars Examples in Excel
  • Conditional Formatting New Rule with Formulas in Excel
  • How to add Trendline to a chart in Excel
  • How to Create Gantt Chart in Excel

References

  • How to get address of first cell in range in Excel
  • How to get last row in mixed data with blanks in Excel
  • Extract data with helper column in Excel
  • Last row number in range
  • How to use Excel ROW Function

Data Validations

  • Excel Data validation specific characters only
  • Excel Data validation number multiple 100
  • Excel Data validation exists in list
  • Excel Data validation with conditional list
  • Excel Data validation unique values only

Calculate date overlap in days in Excel

by

If you need to calculate the number of days that overlap in two date ranges, then this tutorials is for you.

You can use basic date arithmetic, together with the the MIN and MAX functions. See example below;

Formula

=MAX(MIN(end1,end2)-MAX(start1,start2)+1,0)

Explanation

In the example shown, the formula in D6 is:

=MAX(MIN(end,C6)-MAX(start,B6)+1,0)

How this formula works

Excel dates are just serial numbers, so you can calculate durations by subtracting the earlier date from the later date.

This is what happens at the core of the formula here:

MIN(end,C6)-MAX(start,B6)+1

Here are are simply subtracting an earlier date from a later date. To figure out what dates to use for each date range comparison, we use MIN to get the earliest end date, and MAX to get the latest end date.

Finally, we use the MAX function to trap negative values and return zero instead. Using MAX this way is a clever way to avoid using IF.

Post navigation

Previous Post:

COSH function: Description, Usage, Syntax, Examples and Explanation

Next Post:

Excel Data validation require unique number

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • How to use IFS function in Excel
  • How to use Excel XOR Function
  • How to use Excel TRUE Function
  • How to use Excel NOT Function
  • How to use Excel AND Function

Date Time

  • How to calculate quarter from date in Excel
  • Calculate total hours that fall between two times in Excel
  • Calculate retirement date in Excel
  • Convert date to text in Excel
  • Convert Excel time to decimal seconds

Grouping

  • If cell contains one of many things in Excel
  • Group numbers with VLOOKUP in Excel
  • Group times into 3 hour buckets in Excel
  • Categorize text with keywords in Excel
  • How to randomly assign people to groups in Excel

General

  • How to create dynamic named range with INDEX in Excel
  • Mark Workbook as Final in Excel
  • How to Delete Cells, Row and Rows in Excel
  • Create dynamic workbook reference to another workbook in Excel
  • Count cells that do not contain errors in Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning