What is a time duration?
A duration is the length of time between a start and an end, written in days, hours and minutes or as one total, such as 80.5 hours. It doesn’t depend on the clock time itself: 9 AM to 5 PM and 9 PM to 5 AM the next day are both 8 hours.
This calculator counts wall-clock time in one place. It doesn’t apply time zones, and on the nights the clocks change for daylight saving time it counts the hours shown on the clock, the way a spreadsheet does. Leap days are counted: a year with February 29 has 366 days.
Source U.S. Naval Observatory · Leap years ↗
How to calculate the time between two dates and times
Count the days between the dates, turn both times into minutes after midnight, and subtract. A day has 1,440 minutes (24 × 60), and 12:00 AM is midnight, the start of the day.
Here it is with your numbers:
- Days between the dates = 3
- Minutes = 3 × 1,440 + 1,050 − 540
- Minutes = 4,830
- Hours = 4,830 ÷ 60
- Hours = 80.5
It means the time between them is 3 days 8 h 30 min, or 80.5 hours in all.
Source Microsoft Support · Calculate the difference between two times in Excel ↗NIST Time and Frequency Division · Times of Day FAQs (noon and midnight) ↗
Time duration examples
| From | To | Duration |
|---|---|---|
| Jun 9, 2007 10:35 AM | Jun 9, 2007 3:30 PM | 4 h 55 min |
| Mon 9:00 AM | Fri 5:00 PM | 4 days 8 h |
| Dec 31, 2026 10:00 PM | Jan 1, 2027 6:30 AM | 8 h 30 min |
| Feb 28, 2028 noon | Mar 1, 2028 noon | 2 days |
The last row crosses February 29, 2028, so it is 2 days, not 1.
FAQs
What is the formula for calculating hours between two times?
Subtract the start from the end. Write each time as minutes after midnight, add 1,440 minutes for each day between the dates, take away the start and divide by 60. From 10:35 AM to 3:30 PM on the same day: 930 − 635 = 295 minutes, which is 4 hours 55 minutes, or 4.92 hours.
Source Microsoft Support · Calculate the difference between two times in Excel ↗
How to calculate hours in Excel between two dates?
Put the start date and time in A2 and the end date and time in B2, then subtract. =(B2-A2)*1440 gives the total minutes and =INT((B2-A2)*24) the whole hours. Microsoft’s example, 6/9/2007 10:35 AM to 3:30 PM, gives 295 minutes and 4 hours.
Sources
- Microsoft Support: Calculate the difference between two times in Excel
- NIST Time and Frequency Division: Times of Day FAQs (noon and midnight)
- U.S. Naval Observatory: Leap years