Calc Garden

Plot No. 37 · Everyday & Shopping

Time Duration Calculator

Work out how much time passes between two clock times. Enter a start time and an end time and the calculator subtracts one from the other in minutes, wrapping past midnight when the end is earlier, then shows the gap as hours and minutes, total minutes and decimal hours.

Inputs

If the end time is before the start time, the gap is treated as crossing midnight.

Results
Duration8h 30m
Total minutes510
Decimal hours8.50

Times are read on a 24 hour clock. The result is the elapsed time, so a shift ending at the same time the next day reads as 24 hours.

The link saves your inputs so you can bookmark or share this exact result.

How many hours between common start and end times

Every row is the same single subtraction the calculator above does: convert both times to minutes since midnight and take the difference. The last two rows run past midnight, where a plain subtraction would give a negative number, so a day is added instead. These are elapsed clock times and do not have a break taken off. If you need breaks removed and the result multiplied by an hourly rate, the hours calculator does that part.

StartEndDurationTotal minutesDecimal hours
9:00 am (09:00)5:00 pm (17:00)8h 0m4808.00
9:00 am (09:00)5:30 pm (17:30)8h 30m5108.50
8:00 am (08:00)4:00 pm (16:00)8h 0m4808.00
8:00 am (08:00)5:00 pm (17:00)9h 0m5409.00
8:30 am (08:30)5:00 pm (17:00)8h 30m5108.50
7:00 am (07:00)3:00 pm (15:00)8h 0m4808.00
7:00 am (07:00)3:30 pm (15:30)8h 30m5108.50
6:00 am (06:00)2:00 pm (14:00)8h 0m4808.00
10:00 am (10:00)6:00 pm (18:00)8h 0m4808.00
12:00 pm (12:00)8:00 pm (20:00)8h 0m4808.00
2:00 pm (14:00)10:00 pm (22:00)8h 0m4808.00
9:00 am (09:00)12:30 pm (12:30)3h 30m2103.50
1:00 pm (13:00)5:00 pm (17:00)4h 0m2404.00
10:00 pm (22:00)6:00 am (06:00)8h 0m4808.00
11:00 pm (23:00)7:00 am (07:00)8h 0m4808.00

A span that ends earlier on the clock than it starts is treated as finishing the next day, so 11:00 pm to 7:00 am reads as 8 hours rather than minus 16.

Minutes converted to decimal hours

Payroll, billing and timesheet systems usually want hours to two decimal places rather than hours and minutes, and the two are easy to confuse: 8 hours 30 minutes is 8.50 hours, not 8.30. Divide the minutes by 60 to convert. The quarter hours are the ones worth memorising, since 15, 30 and 45 minutes give the exact figures 0.25, 0.50 and 0.75.

MinutesDecimal hoursFraction of an hour
50.081/12
100.171/6
150.251/4
200.331/3
250.425/12
300.501/2
350.587/12
400.672/3
450.753/4
500.835/6
550.9211/12

Decimal hours are rounded to two places for display, so a third of an hour shows as 0.33 rather than a recurring figure. Minute values that are not a multiple of five follow the same rule: divide by 60.

How the time duration is worked out

The calculator converts each time you enter into the number of minutes since midnight, then subtracts the start from the end. A start of 09:00 is 540 minutes and an end of 17:30 is 1050 minutes, so the gap is 510 minutes. That total is then split into whole hours and leftover minutes, giving 8 hours and 30 minutes.

When the end time is earlier than the start time the raw subtraction is negative, so the calculator adds 24 hours (1440 minutes) and treats the period as crossing midnight. That is why 22:00 to 06:00 returns 8 hours rather than a minus figure. Decimal hours are simply the total minutes divided by 60, rounded to two places, which is the format payroll and billing systems expect.

How to use the time duration calculator

  1. Set the start time using the 24 hour time picker.
  2. Set the end time. If it is earlier than the start, the gap is counted as running past midnight.
  3. Read the duration as hours and minutes, the total minutes and the decimal hours.

Worked examples

A standard working day

Inputs: Start 09:00, end 17:30

Result: 8h 30m, which is 510 total minutes and 8.50 decimal hours. A full day minus a half hour at the end.

An overnight shift

Inputs: Start 22:00, end 06:00

Result: 8h 0m, because the end is earlier than the start the calculator adds 24 hours and reports 480 minutes, or 8.00 decimal hours.

Limitations and common mistakes

Edge cases and limitations

  • It measures elapsed clock time only and does not subtract breaks. Use the hours calculator if you need breaks removed.
  • A gap that spans more than 24 hours cannot be expressed, because any end earlier than the start is assumed to be the next day at most.
  • Times are read on a 24 hour clock, so 1:00 in the afternoon must be entered as 13:00.

Common mistakes

  • Expecting a negative result for an overnight period. The calculator always wraps to the next day instead.
  • Reading decimal hours as hours and minutes. 8.50 decimal hours is 8 hours 30 minutes, not 8 hours 50 minutes.

Frequently asked questions

How do you calculate the time between two times?

Convert each time to minutes since midnight, then subtract the start from the end. For 09:00 to 17:30 that is 1050 minus 540, which is 510 minutes, or 8 hours and 30 minutes.

What happens if the end time is earlier than the start time?

The calculator assumes the period crosses midnight and adds 24 hours (1440 minutes). So 22:00 to 06:00 returns 8 hours, not a negative number.

What are decimal hours used for?

Decimal hours express minutes as a fraction of an hour, which is what most payroll and billing systems expect. 8 hours 30 minutes is 8.50 decimal hours because 30 divided by 60 is 0.5.

How many hours is 9am to 5pm?

8 hours exactly, which is 480 minutes or 8.00 decimal hours. Adding a half hour at the end, 9am to 5:30pm, makes it 8 hours 30 minutes, or 8.50 decimal hours. Note that this is elapsed clock time, so if you take an unpaid lunch break your paid hours will be lower.

How many hours is 7am to 3pm?

8 hours, or 480 minutes. In 24 hour terms 7am to 3pm is 07:00 to 15:00, and 15:00 minus 07:00 is 8. The other common 8 hour shifts work out the same way, so 6am to 2pm, 8am to 4pm and 9am to 5pm are all 480 minutes too. As with any figure here this is elapsed time, before any unpaid break comes off.

What is 45 minutes in decimal hours?

0.75 hours, because 45 divided by 60 is 0.75. The common ones are 15 minutes as 0.25, 30 minutes as 0.50 and 45 minutes as 0.75. Timesheets that ask for hours to two decimal places want this format rather than hours and minutes, so 8 hours 45 minutes is entered as 8.75.

See all everyday & shopping calculators.