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

Data Analysis

  • Get column name from index in Excel Table
  • How To Create Frequency Distribution in Excel
  • How to Create One and Two Variable Data Tables in Excel
  • Example of COUNTIFS with variable table column in Excel
  • How to count table rows in Excel

References

  • To count total rows in a range in Excel
  • VLOOKUP function: Description, Usage, Syntax, Examples and Explanation
  • Count rows with at least n matching values
  • Perform case-sensitive Lookup in Excel
  • How to use Excel OFFSET function

Data Validations

  • Excel Data validation don’t exceed total
  • Excel Data validation allow weekday only
  • Excel Data validation must not contain
  • Excel Data validation must begin with
  • How To Create Drop-down List in Excel

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

  • Complete List of Excel Logical Functions, References and Examples
  • XOR function: Description, Usage, Syntax, Examples and Explanation
  • Excel If, Nested If, And/Or Criteria Examples
  • Not Equal To ‘<>‘ operator in Excel
  • How to use Excel FALSE Function

Date Time

  • DATE function: Description, Usage, Syntax, Examples and Explanation
  • Count times in a specific range in Excel
  • DATEDIF function: Description, Usage, Syntax, Examples and Explanation
  • Get month from date in Excel
  • Get days before a date in Excel

Grouping

  • Group times into 3 hour buckets in Excel
  • Running count group by n size in Excel
  • Map inputs to arbitrary values in Excel
  • Map text to numbers in Excel
  • Group numbers with VLOOKUP in Excel

General

  • How to generate random date between two dates in Excel
  • Basic error trapping example in Excel
  • Convert column letter to number in Excel
  • AutoFit Column Width, AutoFit Row Height in Excel
  • Count cells less than in Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning