Time Duration Calculator
Enter a start time and an end time to get the elapsed duration, including shifts that cross midnight.
Elapsed time between two clock times
This calculator works with clock times only, not full dates, which makes it a fast way to check a shift length, a commute, or how long a task took when you only have the start and end time. If the end time is earlier than the start time, it is treated as happening the next day: 23:30 to 01:15 comes out as 1 hour 45 minutes, not a negative number.
Shifts longer than a day
For a shift or task that spans more than 24 hours, add the number of extra full days on top of the clock times. A 09:00-to-09:00 shift with 1 extra day, for example, comes out as exactly 1 day (24 hours), and the calculator supports any number of extra days.
Want the background? Read our comprehensive guide: Time Zones and DST for Developers.
How to use this tool
- Enter the start time.
- Enter the end time. If it is earlier than the start time, it is read as being on the next day.
- Add extra whole days if the duration spans more than one midnight.
- Select Calculate to see the duration in seconds, minutes, hours and days.
Examples
A shift that crosses midnight, and one that does not.
Crossing midnight
23:30 to 01:15
- Duration
- 1 hour 45 minutes
The end time is earlier than the start time, so it is read as being on the next day.
Same day
09:00 to 17:30
- Duration
- 8 hours 30 minutes
A full day, stated explicitly
09:00 to 09:00, plus 1 extra day
- Duration
- 1 day
Frequently Asked Questions
How is a shift that crosses midnight handled?
Can I calculate a duration longer than 24 hours?
What if the start and end time are the same?
Does this account for daylight saving time?
Related tools
- Date Difference CalculatorYears, months, weeks and days between two dates, leap years included.
- Timestamp DifferenceFind the time between two timestamps as a duration.
- Add Time CalculatorAdd seconds, minutes, hours, days or weeks to a date and time.
- Subtract Time CalculatorSubtract seconds, minutes, hours, days or weeks from a date and time.
- Current Unix TimestampLive Unix time in seconds and milliseconds. Copy, pause or refresh.