Share this free calculator
Send this tool to someone who needs the calculation.
How to Calculate Hours Between Two Times (Including Overnight)
How to use
The time duration calculator finds elapsed time between a start and end clock time on the same day or across midnight. If the end time is earlier than the start, it is automatically treated as the next day. An optional break can be subtracted, with output in hours and minutes, decimal hours and total minutes.
- Choose the start and end times.
- Enter an unpaid or excluded break in minutes if needed; leave it blank when there is no break.
- Calculate to see net elapsed time, total minutes and decimal hours.
How it is calculated
Example
Example: 22:30 to 06:15 is treated as an overnight span of 7 hours 45 minutes. Subtracting a 30-minute break gives 7 hours 15 minutes, or 7.25 decimal hours.
Important notes
This tool is for clock-time spans under 24 hours and assumes a next-day rollover only when the end is earlier than the start. Use the date difference calculator for multi-day periods. Decimal hours are not clock notation: 7.5 hours means 7 hours 30 minutes.
Worked examples and interpreting results
From 22:30 to 06:15 the next day is 465 minutes. After a 15-minute break, net duration is 450 minutes or 7.5 hours.
| Case | Calculation | Result |
|---|---|---|
| Net minutes | (24 × 60 − 22 × 60 − 30) + 6 × 60 + 15 − 15 | 450 min |
| Decimal hours | 450 ÷ 60 | 7.5 h |
How to check the result
An end time earlier than the start is treated as next day. For durations exceeding a full day, use complete dates rather than just two clock times.
Overnight shifts and decimal hours: two pitfalls
Worked case
A shift from 10:20 PM until 6:50 AM the next morning lasts 8 hours 30 minutes. A separate unpaid 30-minute break reduces paid work time to 8 hours.
Compare another scenario
Eight hours and 15 minutes is 8.25 decimal hours, not 8.15. Divide minutes by 60 when converting a timesheet to payroll hours.
How to interpret the result
Confirm whether the end is on the following calendar day. The calculation does not determine legal overtime rules, holiday pay or daylight-saving adjustments.
Calculate time between hours, including overnight shifts
Subtract start from end, enable the next-day option for an overnight shift, and deduct any unpaid break from the elapsed hours.
- 09:00–17:00: 17:00 − 09:00 = 8 h
- 22:00–06:00 the next day: 2 h + 6 h = 8 h
- 08:30–17:15 with 45-minute break: 8 h 45 min − 45 min = 8 h
Important note
8 hours 30 minutes equals 8.5 decimal hours, not 8.30. Any pay estimate excludes local overtime rules.
Related calculators
Frequently asked questions
Does it handle overnight shifts?
Yes. If the end time is earlier than the start, 24 hours are added and the end is treated as the next day.
Why show decimal hours?
They are useful for timesheets and billing. For example, 8 hours 30 minutes equals 8.5 hours.
Can the break be longer than the elapsed period?
No. The calculator rejects a break that equals or exceeds the elapsed duration because net time would be zero or negative.