This free online time duration calculator finds the exact time difference between a start time and an end time in hours, minutes, and seconds. Enter both times in 12-hour format and instantly see how long the interval between them lasts, even if it crosses midnight.
The calculator does not count hours on a clock face. It turns each time into a single number, the seconds elapsed since midnight, and subtracts one from the other. The steps are:
Office shift: 9:15:00 AM to 6:40:30 PM. The start is 9 × 3600 + 15 × 60 = 33,300 seconds. The end is 18:40:30, which is 18 × 3600 + 40 × 60 + 30 = 67,230 seconds. The difference is 33,930 seconds, or 9 hours, 25 minutes and 30 seconds.
Night shift crossing midnight: 10:30 PM to 6:15 AM. The start is 81,000 seconds and the end is 22,500 seconds. 22,500 − 81,000 is negative, so 86,400 is added, giving 27,900 seconds, which is 7 hours and 45 minutes.
Some intervals people often check, and the result this calculator gives:
| Start | End | Duration |
|---|---|---|
| 9:00 AM | 5:30 PM | 8 h 30 min |
| 10:00 AM | 1:45 PM | 3 h 45 min |
| 11:45 AM | 12:15 PM | 0 h 30 min |
| 6:00 PM | 2:00 AM | 8 h 0 min |
| 11:00 PM | 7:00 AM | 8 h 0 min |
| 12:00 AM | 11:59:59 PM | 23 h 59 min 59 s |
Most wrong answers come from the two twelves. 12:00 AM is midnight, the start of the day, and 12:30 AM is half an hour after midnight. 12:00 PM is noon. So a lunch break from 12:30 PM to 1:15 PM is 45 minutes, but if you pick AM for the start by mistake, the calculator sees a gap from 00:30 to 13:15 and reports 12 hours 45 minutes.
Railway and airline tickets in India print times in 24-hour format. To enter 21:50, subtract 12 from the hour and choose PM (9:50 PM). For 00:20, enter 12:20 AM.
Because only clock times are entered, the tool assumes the two times are less than 24 hours apart. A trip that runs for 30 hours will show as 6 hours. If the start and end are identical, the result is 0, not 24 hours. For spans over several days, use the Date Difference Calculator, and for adding up many separate shifts, use the Hours Calculator. Daylight saving time does not apply in India, so IST times can be subtracted directly; if you compare times in a country that changes its clocks, the result can be off by an hour on the changeover night.