Quick Answer: From 9:00 to 17:30 with a 30 minute break is 8 hr, which is 480 minutes or 8 decimal hours. The time duration calculator works it out for any two clock times, including shifts that run past midnight.
What does this calculator do?
This time duration calculator gives the hours and minutes between a start time and an end time, takes off a break if you enter one, and shows the result three ways: as hours and minutes, as a single number of minutes, and as decimal hours for a timesheet.
It also writes both times on the 12-hour clock and tells you whether the span crossed midnight.
It is built for the everyday cases: how long a shift was, how long a meeting or a drive took, how much time passed between two readings on a clock. You type two times, and if the end is earlier than the start, the calculator reads the end as the next day, so a night shift from 22:00 to 06:00 comes out as 8 hours rather than a negative number.
Times are entered on the 24-hour clock, which some people call military time: 1:30 PM is 13:30 and midnight is 00:00. Most phones and browsers show a time picker for these boxes, which may use your usual 12-hour format with AM and PM; either way, the calculator receives the same 24-hour time.
Using the Time Duration Calculator
- Enter the Start time.
- Enter the End time. If it is earlier than the start, it is taken as the next day.
- Enter a Break to subtract in minutes, or 0 for plain elapsed time.
- Read the result at the top. Below it are the total minutes, decimal hours, the span before the break, both times in 12-hour form, and whether midnight was crossed.
The presets load four common cases: an office day with a 30 minute lunch, a night shift with a 45 minute break, a plain elapsed time of an afternoon, and a morning shift with a 15 minute break.
How is this calculated?
- Turn each time into minutes after midnight. 09:00 is 540 and 17:30 is 1,050. A time of 24:00 is accepted as the end of the day, 1,440 minutes.
- Find the span. If the end is the same as or later than the start, the span is end minus start. If the end is earlier, the end is on the next day, so a full day of 1,440 minutes is added to it first.
span = end − start, end ≥ start; end + 1440 − start, end < start
- Take off the break. The break in minutes is subtracted from the span. If the break is longer than the span, the result is held at zero rather than going negative.
- Write it out. The net minutes are split into whole hours and leftover minutes. Decimal hours are the net minutes divided by 60, rounded half up to two decimal places.
decimal hours = (net minutes)/60
Worked Example
The default, 09:00 to 17:30 with a 30 minute break:
- Start is 540 minutes after midnight and end is 1,050.
- The span is 1,050 minus 540, or 8 hr 30 min.
- Less 30 minutes of break leaves 8 hr, which is 480 min.
- In decimal hours that is 8.
A night shift, 22:00 to 06:00 with a 45 minute break:
- The end, 360 minutes, is earlier than the start, 1,320, so it is on the next day: 360 plus 1,440 minus 1,320 gives 8 hr.
- Less 45 minutes leaves 7 hr 15 min, or 435 min.
- In decimal hours, 7.25.
How Do You Calculate Elapsed Time?
Subtract the start from the end, borrowing an hour when the minutes would go negative. From 13:47 to 16:05: 16:05 is 15:65 after borrowing an hour, and 15:65 minus 13:47 is 2 hours 18 minutes. Enter 13:47 and 16:05 with no break and the calculator gives the same 2 hr 18 min, or 2.3 decimal hours.
How Do You Convert Hours and Minutes to Minutes?
Multiply the hours by 60 and add the minutes. 2 hours 18 minutes is 120 plus 18, or 138 minutes, which is what the "In minutes" card shows for the elapsed time example. To turn minutes into decimal hours, divide by 60; the table below has the common values a timesheet needs.
What does this calculator not account for?
- Spans longer than a day. Two clock times with no dates can only describe up to 24 hours. A span of 30 hours needs dates; use the days until calculator for whole days and add the hours.
- Daylight saving changes. On the night clocks go forward an hour, a shift from 22:00 to 06:00 is really 7 hours long, and on the night they go back it is 9. The calculator reads the clock times as written and does not know the date.
- Seconds. Times are to the minute.
- Pay rules. Rounding to the nearest quarter hour, paid breaks, overtime and minimum shift lengths depend on your employer and local law. The decimal hours here are exact to two places, not rounded to any pay rule.
- Equal start and end times. If the start and end are the same, the answer is zero, not 24 hours. Enter 00:00 to 24:00 for a full day.
What mistakes do people make with this?
- Reading decimal hours as hours and minutes. 7.25 hours is 7 hours 15 minutes, not 7 hours 25 minutes. The decimal is a fraction of 60 minutes. Likewise 4.17 hours, from the morning shift preset, is 4 hours 10 minutes.
- Mixing up AM and PM. 12:30 AM is just after midnight (00:30) and 12:30 PM is just after noon (12:30). If a shift looks far too long, check the AM and PM.
- Subtracting times like decimals. 16:05 minus 13:47 is not 2.58 of anything. Minutes run to 60, so you have to borrow an hour.
- Forgetting an unpaid break. A 9 to 5:30 day is 8 hours 30 minutes on the clock and 8 hours worked once a half-hour lunch is taken off.
- Overnight spans entered the wrong way round. If you swap start and end for a night shift, 06:00 to 22:00 gives 16 hours instead of 8.
Frequently Asked Questions
How many hours is 9 to 5:30?
How do I convert military time to minutes?
How do I calculate hours worked across midnight?
What is 15 minutes in decimal hours?
Can I add up several shifts?
Why does 10:00 to 10:20 with a 30 minute break show zero?
Sources
- NIST Special Publication 811, Guide for the Use of the International System of Units, Table 6: the minute (60 s), hour (3,600 s) and day (86,400 s) accepted for use with the SI. nist.gov/pml/special-publication-811/nist-guide-si-chapter-5-units-outside-si
- NIST Time and Frequency Division, Time and Frequency from A to Z, Daylight Saving Time: when US clocks change. nist.gov/pml/time-and-frequency-division/popular-links/time-frequency-z/time-and-frequency-z-d

