Date & time Time

Time duration calculator

From
To
Subtract
Duration in hours 8.5
Hours and minutes 8:30
Total minutes 510
Local · spans past midnight are read as the next day
12-hour24-hourMilitaryMinutes past midnight
12:00 am, midnight00:0000000
7:00 am07:000700420
12:00 pm, noon12:001200720
1:00 pm13:001300780
5:45 pm17:4517451,065
6:00 pm18:0018001,080
11:59 pm23:5923591,439

Enter two times and get the gap as a decimal, as hours and minutes, and as total minutes. An end time earlier than the start is read as the next day, so 22:00 to 06:00 is eight hours. The same page converts decimal hours — 7.75 is 7:45 — totals a week of shifts, and reads 1745 as 5:45 pm.

How to calculate a duration

1 Enter the two times. Either 24-hour or am/pm is accepted, and the subtract field takes off a break or an interruption.
2 Read whichever unit you need: decimal for arithmetic, h:mm for people.
3 Switch modes for the rest: a decimal figure back to hours and minutes, a week of shifts with the overtime split out, or a military time read as a 12-hour one.

Crossing midnight is the case worth being careful about. Subtracting clock times directly gives a negative number when the end falls on the next day, which is why so many spreadsheets show a stream of hashes for a night shift. Adding twenty-four hours to a negative result is the fix, and it happens here automatically. One ambiguity survives and is genuinely unresolvable: 09:00 to 09:00 could be zero hours or twenty-four. This reads it as twenty-four, on the grounds that nobody asks how long it is between a time and itself.

The decimal mode runs the other way, and that direction is where people get stuck. A decimal hour is a fraction of an hour, never a count of minutes: 7.75 is seven hours and 45 minutes, while 7.45 is seven hours and 27. Quarter, half and three-quarter hours land tidily on 0.25, 0.5 and 0.75; everything else is minutes over sixty, so twenty minutes is 0.33 and fifty is 0.83. Adding a week up brings in one more rule worth stating: under US federal law overtime is weekly, meaning hours beyond forty in a workweek, though several states add a daily threshold at eight hours and contracts elsewhere set their own.

The military mode is a different job on the same clock. Military time is the 24-hour clock written without a colon, so 5:45 pm is 17:45 and 1745, and one rule covers nearly all of it: after noon, add twelve to the hour. The exceptions are the two that catch everybody. Midnight is 12:00 am but 0000, and noon is 12:00 pm but 1200, so twelve is the single hour where the label and the number move in opposite directions. That one ambiguity is why hospitals, airlines and the military use the 24-hour clock at all. Written properly it is four digits with the leading zero kept, 0700 and never 700, and it is often spoken in hundreds, so 1700 is "seventeen hundred".

What people use it for

  • Timing a shift that runs past midnight
  • Converting a timesheet decimal like 7.75 back to hours and minutes
  • Doing the payroll conversion between minutes and decimal hours
  • Totalling the hours worked across a week of shifts, overtime split out
  • Working out how long a booking or a lesson actually ran
  • Reading a military or 24-hour time as a 12-hour one

Questions

Yes. An end time earlier than the start is treated as the following day, so 22:00 to 06:00 gives eight hours.

US Department of Labor — overtime payUS Department of Labor: breaks and meal periodsNIST. Times of day FAQs
Was this tool any good?
Internal signal only · I use it to find the tools worth rebuilding