Time Duration Calculator
Enter a start time and an end time to see elapsed hours and minutes. Tick the midnight option for overnight spans.
How it works
Times are clock times on a 24-hour face, not calendar dates. 09:00 to 17:30 is 8 hours 30 minutes. If the end is earlier than the start and you have not enabled midnight crossing, the duration is negative so the order is visible. With midnight crossing, 22:00 to 06:00 is 8 hours. Same start and end with midnight on is treated as a full 24-hour period.
Formula
Duration = end clock − start clock If crossing midnight and duration ≤ 0: add 24 hours
Worked examples
- 09:00 to 17:30 → 8 hours 30 minutes
- 22:00 to 06:00, crosses midnight → 8 hours
Useful notes
- This is clock duration, not a date range. Use Days Between Dates for calendar spans.
- Seconds on the input (if your browser provides them) are included in the total.
FAQ
- How do I calculate a night shift?
- Enter the start and end clock times and turn on “crosses midnight”. 22:00 to 06:00 is then 8 hours, not a negative figure.
- What if I forget the midnight option?
- The result will be negative when the end is earlier than the start. That is a signal to enable midnight crossing, not a crash.
- Does this include dates?
- No. Both times are on a single 24-hour clock. Multi-day spans belong on the date tools.
Related tools
See all Date & Time tools.