Calculate the duration between two times, add or subtract time from a start time, or sum multiple time durations.
If end < start, assumes next day (e.g. overnight shift).
| Property | Value |
|---|---|
| Start time | 08:30:00 |
| End time | 17:45:00 |
| Duration (H:M:S) | 09:15:00 |
| Total hours | 9.2500 |
| Total minutes | 555 |
| Total seconds | 33,300 |
| Unit | Equivalent |
|---|---|
| 1 minute | 60 seconds |
| 1 hour | 60 min = 3,600 sec |
| 1 day | 24 hrs = 1,440 min |
| 1 week | 168 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.
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.
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.
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.
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.
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.