TimeDurationFinder Excel Date Time Difference Formulas

Excel Date Time Difference Formulas

Excel date and time difference formulas with examples. Calculate days, hours, minutes, months, years, business days, and more.

Date rule: Cells must contain real Excel dates, not text.
Recommended format: 01-Jan-2025  ·  Check with: =ISNUMBER(A2)

Click a case to reveal the formula and example.

Days between two dates +
=B2 - A2
A B
1 StartDate EndDate
2 01-Jan-2025 10-Jan-2025

Result: 9 days

Hours between date and time +
=(B2 - A2) * 24
A B
1 StartTime EndTime
2 01-Jan-2025 08:00 02-Jan-2025 14:00

Result: 30 hours

Minutes between two times +
=(B2 - A2) * 1440
A B
1 StartTime EndTime
2 01-Jan-2025 09:00 01-Jan-2025 12:00

Result: 180 minutes

Years, months, days, hours, minutes, seconds (exact) +
=DATEDIF(A2,B2,"Y") & " years " & DATEDIF(A2,B2,"YM") & " months " & DATEDIF(A2,B2,"MD") & " days " & HOUR(MOD(B2-A2,1)) & " hours " & MINUTE(MOD(B2-A2,1)) & " minutes " & SECOND(MOD(B2-A2,1)) & " seconds"
A B
1 StartDate EndDate
2 15-Mar-2020 18:25:10 20-Jun-2022 10:35:15

Result: 2 years 3 months 5 days 16 hours 10 minutes 5 seconds

Total months between dates +
=DATEDIF(A2,B2,"M")
A B
1 StartDate EndDate
2 01-Jan-2024 01-Apr-2025

Result: 15 months

Business days (exclude weekends) +
=NETWORKDAYS(A2,B2)
A B
1 StartDate EndDate
2 01-Jan-2025 10-Jan-2025

Result: 8 business days

Business days excluding holidays +
=NETWORKDAYS(A2,B2,E2:E3)
A B E
1 Start End Holidays
2 01-Jan-2025 10-Jan-2025 01-Jan-2025
3 06-Jan-2025

Result: 6 business days

Business hours (simple estimate) +
=NETWORKDAYS(A2,B2) * 8
A B
1 StartDate EndDate
2 01-Jan-2025 05-Jan-2025

Result: 24 hours

Time difference as text (hh:mm) +
=TEXT(B2-A2,"h:mm")
A B
1 StartTime EndTime
2 01-Jan-2025 09:30 01-Jan-2025 15:00

Result: 5:30

Prevent negative result +
=IF(B2<A2,"Invalid date",B2-A2)
A B
1 StartDate EndDate
2 10-Jan-2025 01-Jan-2025

Result: Invalid date