How the duration is calculated
Both times are turned into seconds after midnight and subtracted. If the end is earlier than the start, 24 hours are added because the span crosses midnight. Any break is then subtracted.
Formula: duration = (end − start, + 24 h if negative) − break
Worked example: 9:00 to 17:30 with a 30-minute break
- 17:30 − 9:00 = 8 h 30 min.
- Subtract the break: 8 h 30 min − 30 min = 8 h.
- As decimal hours: 8.00.
Practical uses
- Filling in timesheets with decimal hours.
- Checking shift lengths, including night shifts that cross midnight.
- Timing a meeting, class or cooking session.
- Subtracting unpaid breaks to find paid time.
Limitations
- Spans are limited to under 24 hours.
- Daylight-saving clock changes during the span are not taken into account; a night when clocks change will be an hour off.
To convert hours into other units, use the Time Converter.
Frequently asked questions
How do I calculate hours worked overnight?
Enter the start and end times and keep “ends next day” on. A shift from 22:00 to 06:00 is 8 hours.
How do I turn minutes into decimal hours for a timesheet?
Divide the minutes by 60. 7 hours 45 minutes is 7 + 45/60 = 7.75 hours.
Can a span be longer than 24 hours?
Not with clock times alone. For multi-day spans, use the Date Difference Calculator or the Time Converter.
What is 8:45 to 17:15 with a 45-minute break?
8 hours 30 minutes minus 45 minutes = 7 hours 45 minutes, or 7.75 decimal hours.