Examples
Two times on the same day
A driver logs on at 8:47 AM and off at 5:12 PM. 8:47 AM to 4:47 PM is 8 hours, plus 25 minutes to 5:12 PM: 8 hrs 25 min, or 8.42 decimal hours.
Several days, across a clock change
An on-call shift runs from Friday, March 6, 2026 at 6:00 PM to Monday, March 9 at 7:30 AM. On the calendar that’s 2 days 13 hours 30 minutes. But U.S. clocks sprang forward on Sunday, March 8, so an hour was skipped: the real time on duty is 2 days 12 hrs 30 min (60.5 hours). With Include dates ticked, the calculator measures this for your time zone and adds a note.
Common shift lengths
Durations for typical work shifts, including two overnight ones.
| Shift | Duration | Decimal | Less 30-min lunch |
|---|---|---|---|
| 6:00 AM – 2:30 PM | 8 h 30 min | 8.50 | 8.00 h |
| 7:00 AM – 3:00 PM | 8 h | 8.00 | 7.50 h |
| 7:00 AM – 3:30 PM | 8 h 30 min | 8.50 | 8.00 h |
| 8:00 AM – 4:30 PM | 8 h 30 min | 8.50 | 8.00 h |
| 8:00 AM – 5:00 PM | 9 h | 9.00 | 8.50 h |
| 8:30 AM – 5:00 PM | 8 h 30 min | 8.50 | 8.00 h |
| 9:00 AM – 5:00 PM | 8 h | 8.00 | 7.50 h |
| 9:00 AM – 5:30 PM | 8 h 30 min | 8.50 | 8.00 h |
| 3:00 PM – 11:00 PM | 8 h | 8.00 | 7.50 h |
| 11:00 PM – 7:00 AM | 8 h | 8.00 | 7.50 h |
| 7:00 PM – 7:00 AM | 12 h | 12.00 | 11.50 h |
How the duration is measured
duration = end − start
Without dates, both times are counted from midnight. If the end is earlier than the start, the span must have crossed midnight, so a day is added: 11:15 PM to 1:40 AM is 2 hours 25 minutes. That covers anything up to 24 hours.
With dates, the calculator measures the real time that passed between the two moments in your device’s time zone, which is why daylight-saving changes are counted correctly. An unpaid break, if entered, is taken off the total.
Frequently asked questions
How do I work out the time between two times by hand?
How many hours are there between 8 AM and 5 PM?
How do I calculate the time between two times in Excel?
=(B2-A2)*24 for decimal hours, or =B2-A2 formatted as [h]:mm. If the span can cross midnight, use =MOD(B2-A2,1)*24. Google Sheets uses the same formulas.