Utility calculator
Time Duration Calculator
Compare two times on a 24-hour clock, or add and subtract a duration. An earlier end time crosses midnight once. A longer shift reports the clock time and how many dates it moves.
Time duration
Compare or shift clock times
Use a 24-hour clock, such as 22:15 or 01:45:00. Hours run from 0 to 23. A duration can use more than 23 hours. Minutes and seconds run from 0 to 59.
Result
Duration
3 hours, 30 minutes
Midnight
Crosses midnight
Total seconds
12600
A difference uses the two clock times only. When the end time is earlier, the interval crosses midnight once and stays under 24 hours.
22:15:00 to 01:45:00 is 3 hours, 30 minutes. The interval crosses midnight.
How it works
Clock times use a 24-hour clock, from 00:00:00 through 23:59:59. You can type hh:mm or hh:mm:ss. 24:00 is not a clock time here. Midnight at the end of a date is 00:00:00 on the next date. Minutes and seconds run from 0 to 59.
A difference compares two clock times and does not know the calendar date. When the end is earlier than the start, the interval crosses midnight once. 22:15:00 to 01:45:00 is 3 hours and 30 minutes. The same clock time is 0 seconds and does not cross midnight. A difference of two clock times is under 24 hours.
Add and subtract apply a length you enter. Hours can be 24 or more. The result is a clock time plus a whole-day shift. 23:50:00 plus 2 hours and 15 minutes is 02:05:00, 1 day later. 00:10:00 minus 1 hour is 23:10:00, 1 day earlier.
Formulas
A difference that would be negative wraps by 24 hours. Add and subtract wrap the same way and keep the number of midnights crossed.
- Clock difference = end minus start, plus 24 hours when the end is earlier
- 22:15:00 to 01:45:00 = 3 hours, 30 minutes, crossing midnight
- Added clock time = start plus the duration, wrapped at 24 hours, with the day shift
- 23:50:00 + 2 hours 15 minutes = 02:05:00, 1 day later
Worked examples
22:15:00 to 01:45:00 is 3 hours, 30 minutes and crosses midnight.
22:15:00 to 01:45:00 is 3 hours, 30 minutes. The interval crosses midnight.
23:50:00 plus 2 hours, 15 minutes is 02:05:00, 1 day later.
23:50 plus 2 hours reaches 01:50, and 15 more minutes reaches 02:05 on the next date.
FAQ
How does a difference across midnight work?
When the end time is earlier than the start time, the interval crosses midnight once. 22:15:00 to 01:45:00 is 3 hours and 30 minutes. The calculator does not assume a second midnight. A difference of two clock times is under 24 hours.
What is 23:50 plus 2 hours and 15 minutes?
02:05:00, one day later. Add and subtract can move by more than 24 hours, and the result includes the whole-day shift.
Is 24:00 a valid clock time?
No. Use 00:00:00 for midnight. Hours on a clock time run from 0 to 23, and minutes and seconds run from 0 to 59.
Does this calculator convert time zones?
No. A difference uses the two clock times only. Add and subtract report a clock time and how many midnights the shift crosses.