Finds the elapsed time between two clock times on a single day, or overnight if the end time is earlier than the start.
How it works
The start time is subtracted from the end time; if the result is negative, a full day is added to correctly handle spans that cross midnight.
What this does not include
This does not include calendar dates — for a duration spanning multiple calendar days, use this site’s time between dates calculator instead.
How to use this calculator
- Enter a start time and an end time.
A worked example
Start 9:00, end 17:30 → duration = 8 hours 30 minutes (510 total minutes).
Start 22:00, end 6:00 the next morning → the span crosses midnight, giving 8 hours 0 minutes (480 total minutes) rather than a negative result.
What the variables mean
| Variable | Meaning |
|---|---|
| Start time | Beginning of the span |
| End time | End of the span |
Edge cases worth knowing
An end time earlier than the start time is treated as crossing into the next day, not as an error — the calculator adds a full day before computing the difference, correctly handling overnight shifts.
This measures clock time only, not calendar dates. A span crossing multiple calendar days needs this site’s separate time-between-dates calculator instead.
Frequently asked questions
What happens if the end time is earlier than the start time?
The calculator assumes the span crosses midnight into the next day, and adjusts the duration accordingly rather than returning a negative result.
Where is this calculation commonly used?
Tracking work shift lengths, appointment durations, or any span measured purely by clock time rather than calendar dates.
Does this handle overnight shifts correctly?
Yes — a start time later in the day than the end time is automatically treated as spanning into the next day.