Time Duration Calculator

Calculate the duration between two times, add or subtract time from a start time, or sum multiple time durations.

Mode

::HH:MM:SS
::HH:MM:SS

If end < start, assumes next day (e.g. overnight shift).

Duration
09:15:00
9 hrs, 15 mins

Results

PropertyValue
Start time08:30:00
End time17:45:00
Duration (H:M:S)09:15:00
Total hours9.2500
Total minutes555
Total seconds33,300

Time Conversions

UnitEquivalent
1 minute60 seconds
1 hour60 min = 3,600 sec
1 day24 hrs = 1,440 min
1 week168 hrs = 10,080 min

You have a night shift on the roster that reads 22:15 to 06:40, and the payroll sheet wants hours, not clock times. Subtracting 22:15 from 06:40 on paper gives you a negative number and a headache. This page does three related jobs in one place: the gap between two times, a start time moved forward or back by a duration, and the total of a list of durations.

Everything runs on seconds

Every entry is first converted with seconds = hours x 3,600 + minutes x 60 + seconds. Between two times, difference = end - start, and if that is negative 86,400 (one day) is added. Add or subtract takes start +/- duration and wraps the result into a single day with ((x mod 86,400) + 86,400) mod 86,400. Summing just adds up the seconds, then h = floor(total / 3,600), m = floor((total mod 3,600) / 60), s = total mod 60.

Worked example. Start 22:15:00 is 80,100 seconds and end 06:40:00 is 24,000. The difference is 24,000 - 80,100 = -56,100, so add 86,400 to get 30,300 seconds. That is 8 hours 25 minutes 0 seconds, 505 minutes, and 30,300 / 3,600 = 8.4167 hours (shown to four decimals, so 8.4167 is rounded from 8.41666...). In Add / Subtract mode, 23:30:00 + 2:00:00 is 25:30, which wraps to 01:30:00. In Sum mode the three starting rows 1:30, 0:45 and 2:15 give 4:30:00, or 4.5 hours.

What it does not do. There are no dates, so 01:30:00 gives no hint that it falls on the next day. Identical start and end times return 0, not 24 hours, and the between mode cannot report more than 23:59:59. Daylight saving changes are ignored, so a night when clocks move will be an hour out in real life. Fields use whole numbers only, and blanks count as zero.

How to Use This Calculator

  1. Choose a mode: Between Two Times, Add / Subtract or Sum Durations.
  2. In the first mode, enter a start and an end time as hours, minutes and seconds. If the end is earlier than the start it is treated as the next day.
  3. In Add / Subtract, enter the start time, pick Add or Subtract, then enter the duration.
  4. In Sum Durations, fill each row and press '+ Add Duration' for more, or Remove to drop one. The result and a table of total hours, minutes and seconds appear beside the inputs.

Frequently Asked Questions

I typed 7.5 in the hours box and got 7 hours. Why?

The fields read whole numbers only, so the .5 is cut off. Enter 7 hours and 30 minutes instead, or convert a decimal first: 0.5 hours x 60 = 30 minutes.

Why does 09:00 to 09:00 return zero instead of 24 hours?

The page only adds a day when the end is earlier than the start. Equal times are read as no time passing. If you really mean a full day, use the Hours Calculator, which treats equal times as 24 hours.

Can I get decimal hours for payroll?

Yes, the Total hours row shows four decimals. 8 hours 25 minutes is 8.4167, and at $22 an hour that is $185.17 after rounding to the cent. Round the hours the way your payroll policy says before multiplying.

Is there a way to see more than 24 hours between two times?

Not in the between mode, because it has no dates. Use Sum Durations for lengths of time you already know, or the Day Counter and Hours Calculator when dates are involved.