Time Duration Calculator
Measure elapsed hours and minutes between two clock times on a 24-hour face. This is a stopwatch-style gap, not a count of calendar days. Tick “crosses midnight” for night shifts such as 22:00 to 06:00.
How to use
- Enter the start clock time and the end clock time. Seconds count if your browser’s time control includes them.
- If the shift or flight goes past midnight, turn on “End time is the next day.” Leave it off for a same-day span.
- Read hours and leftover minutes. A negative result means the end is earlier than the start and midnight crossing is off.
- Use Days Between Dates or Business Days for multi-day calendar spans. This page will not add a second date.
How it works
A workday from 09:00 to 17:30 is 8 hours 30 minutes. That is subtraction on a clock, not “how many dates appear on the roster.” There is no start date and no end date. Two timestamps on different calendar days still need you to say whether the end is the next day. Without that flag, 22:00 to 06:00 is a negative duration — a signal that the fields look reversed, not a crash.
With midnight crossing on, 22:00 to 06:00 becomes 8 hours: the calculator adds 24 hours when the raw difference is zero or negative. The same start and end with the flag on is treated as a full 24-hour period, so 09:00 to 09:00 overnight is one day on the clock, not zero. That matches a 24-hour on-call block better than a same-instant duration of nothing.
Seconds on the input are included in the total, then the display splits the result into whole hours and leftover minutes. The page does not convert to decimal hours for payroll, does not subtract unpaid breaks, and does not know split shifts. Two separate spans need two runs.
Daylight saving is a calendar-day problem this tool does not see. A night that contains a 23-hour or 25-hour civil day still looks like clock faces here. If you need the number of midnights between two dates, use Days Between Dates. If you need Monday–Friday dates, use Business Days.
This is not Unix time and not a time-zone converter. For seconds since 1970, use the Unix Timestamp page. For “what date is 8 hours after a calendar day,” that is still a date-and-clock question this calculator will not answer.
Formula
Duration = end clock − start clock If crossing midnight and duration ≤ 0: add 24 hours
Worked examples
A workday
09:00 to 17:30 → 8 hours 30 minutes
Overnight
22:00 to 06:00, crosses midnight → 8 hours
Useful notes
- Clock duration only — 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.
- Same start and end with midnight crossing on counts as 24 hours, not zero.
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.
- What does 09:00 to 09:00 mean with midnight crossing on?
A full 24-hour period. With the option off, the same times are 0 hours.
- Does this handle daylight saving?
No. It subtracts clock faces. A civil day that is 23 or 25 hours long is not modelled.
Related tools
Days Between Dates
Count how many calendar days separate two dates, including the week-and-remainder breakdown.
Business Days
Count weekdays between two dates, excluding Saturday and Sunday. Public holidays are not removed.
Weeks Between Dates
See how many full weeks (and leftover days) separate two calendar dates.
See all Date & Time tools.