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

Data Analysis

  • How to create dynamic reference table name in Excel
  • What-If Analysis: Scenarios and Goal Seek in Excel
  • Data Series in Excel
  • Excel Pie Chart
  • Move chart to a separate worksheet in Excel

References

  • Left Lookup in Excel
  • How to reference named range different sheet in Excel
  • How to use Excel ROW Function
  • Two-way lookup with VLOOKUP in Excel
  • To count total rows in a range in Excel

Data Validations

  • Excel Data validation only dates between
  • Excel Data validation date in next 30 days
  • Excel Data validation require unique number
  • Excel Data validation must begin with
  • 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

  • OR function: Description, Usage, Syntax, Examples and Explanation
  • IFS function: Description, Usage, Syntax, Examples and Explanation
  • Excel If, Nested If, And/Or Criteria Examples
  • How to use Excel NOT Function
  • FALSE function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • TIME function: Description, Usage, Syntax, Examples and Explanation
  • Add decimal minutes to time in Excel
  • MINUTE function: Description, Usage, Syntax, Examples and Explanation
  • Count birthdays by month in Excel
  • DATEVALUE function: Description, Usage, Syntax, Examples and Explanation

Grouping

  • If cell contains one of many things in Excel
  • Categorize text with keywords in Excel
  • Group times into 3 hour buckets in Excel
  • Calculate conditional mode with criteria in Excel
  • How to randomly assign data to groups in Excel

General

  • Count cells less than in Excel
  • Cell References: Relative, Absolute and Mixed Referencing Examples
  • How to calculate percentage discount in Excel
  • Convert column letter to number in Excel
  • How to increase by percentage in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning