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 rows are grouped by shape: full days first, then early and late shifts, then evenings, then half days and short blocks, and finally the overnight spans. Those last five 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 hoursWhat it is
9:00 am (09:00)5:00 pm (17:00)8h 0m4808.00Standard office day
9:00 am (09:00)5:30 pm (17:30)8h 30m5108.50Office day with a half hour tail
8:00 am (08:00)4:00 pm (16:00)8h 0m4808.00Early office day
8:00 am (08:00)5:00 pm (17:00)9h 0m5409.00Nine hour day
8:30 am (08:30)5:00 pm (17:00)8h 30m5108.50Office day, early start
8:15 am (08:15)4:45 pm (16:45)8h 30m5108.50Quarter hour clock in and out
9:45 am (09:45)6:15 pm (18:15)8h 30m5108.50Late start, quarter hour ends
7:00 am (07:00)3:00 pm (15:00)8h 0m4808.00Early shift
7:00 am (07:00)3:30 pm (15:30)8h 30m5108.50Early shift with a half hour tail
6:00 am (06:00)2:00 pm (14:00)8h 0m4808.00Dawn shift
10:00 am (10:00)6:00 pm (18:00)8h 0m4808.00Late office day
12:00 pm (12:00)8:00 pm (20:00)8h 0m4808.00Midday to evening
2:00 pm (14:00)10:00 pm (22:00)8h 0m4808.00Afternoon shift
4:00 pm (16:00)8:00 pm (20:00)4h 0m2404.00Short evening shift
5:00 pm (17:00)10:00 pm (22:00)5h 0m3005.00Evening, 5pm to 10pm
6:00 pm (18:00)11:00 pm (23:00)5h 0m3005.00Evening, 6pm to 11pm
7:00 pm (19:00)10:00 pm (22:00)3h 0m1803.00Evening class or session
8:30 am (08:30)12:30 pm (12:30)4h 0m2404.00Morning half day
9:00 am (09:00)12:30 pm (12:30)3h 30m2103.50Morning half day, later start
11:30 am (11:30)3:30 pm (15:30)4h 0m2404.00Late morning to mid afternoon
1:00 pm (13:00)5:00 pm (17:00)4h 0m2404.00Afternoon half day
1:30 pm (13:30)5:30 pm (17:30)4h 0m2404.00Afternoon half day, later
10:00 am (10:00)11:30 am (11:30)1h 30m901.50Meeting or class block
2:00 pm (14:00)3:45 pm (15:45)1h 45m1051.75Appointment block
8:00 pm (20:00)4:00 am (04:00)8h 0m4808.00Night shift
9:00 pm (21:00)5:30 am (05:30)8h 30m5108.50Night shift, longer
10:00 pm (22:00)6:00 am (06:00)8h 0m4808.00Overnight
11:00 pm (23:00)7:00 am (07:00)8h 0m4808.00Overnight, later finish
7:00 pm (19:00)7:00 am (07:00)12h 0m72012.00Twelve hour night

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.

When a span is written without am or pm

A span like "11:30 to 3:30" has no single answer. Moving either end across the am and pm line changes the result by exactly 12 hours, so the same four words are 4 hours or 16 hours depending on which occurrence of the end time is meant. Neither reading is wrong on its face; the shorter one is usually what someone means, but a night shift or an overnight journey is the longer one. The time fields in the calculator above force you to state which, either with am and pm or on a 24 hour clock, so the ambiguity cannot survive into the result.

Written asOne readingDurationThe other readingDuration
11:30 to 3:3011:30 am to 3:30 pm4h 0m11:30 am to 3:30 am16h 0m
8 to 48:00 am to 4:00 pm8h 0m8:00 am to 4:00 am20h 0m
10 to 210:00 am to 2:00 pm4h 0m10:00 am to 2:00 am16h 0m
6 to 126:00 am to 12:00 pm (noon)6h 0m6:00 am to 12:00 am (midnight)18h 0m
5 to 105:00 pm to 10:00 pm5h 0m5:00 am to 10:00 pm17h 0m

The 12 o'clock row is the one that catches people out. 12:00 am is midnight at the start of a day and 12:00 pm is noon in the middle of it, which is the reverse of what the numbers suggest, since 12 am comes before 1 am and 12 pm comes before 1 pm. On a 24 hour clock midnight is 00:00 and noon is 12:00, with no room for the mix-up.

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.

Decimal hours converted back to hours and minutes

Reading a figure off a timesheet or an invoice is the same conversion run backwards: multiply the decimal by 60 to get minutes. So 1.75 hours is 1.75 times 60, which is 105 minutes, or 1 hour 45 minutes. The trap is reading the digits after the point as minutes. A line showing 8.25 hours is 8 hours 15 minutes, not 8 hours 25 minutes, and the two differ by 10 minutes of pay on every entry.

Decimal hoursHours and minutesTotal minutes
0.100h 6m6
0.200h 12m12
0.250h 15m15
0.300h 18m18
0.400h 24m24
0.500h 30m30
0.600h 36m36
0.700h 42m42
0.750h 45m45
0.800h 48m48
0.900h 54m54
1.251h 15m75
1.501h 30m90
1.751h 45m105
2.502h 30m150
7.507h 30m450
7.757h 45m465
8.258h 15m495
8.508h 30m510

Tenths of an hour are exact whole minutes, since 0.1 of an hour is 6 minutes. Thirds are not, so 0.33 hours comes back as 20 minutes only after rounding to the nearest minute.

Rounding a duration to quarter hours, tenths or five minutes

The calculator above returns exact elapsed time, but plenty of systems will not accept it. Payroll and time clocks commonly round to the nearest quarter hour, legal and agency billing to the nearest tenth of an hour (6 minutes), and some clock terminals to the nearest 5 minutes. Each column below rounds the same minute figure to the nearest multiple, with exact halves going up. Quarter hour rounding is where the well known 7 minute rule comes from: 7 minutes past a boundary rounds down, 8 minutes rounds up.

Actual minutesNearest 15 min (0.25 h)Nearest 6 min (0.1 h)Nearest 5 min
20 (0.00 h)0 (0.00 h)0 (0.00 h)
30 (0.00 h)6 (0.10 h)5 (0.08 h)
50 (0.00 h)6 (0.10 h)5 (0.08 h)
70 (0.00 h)6 (0.10 h)5 (0.08 h)
815 (0.25 h)6 (0.10 h)10 (0.17 h)
1215 (0.25 h)12 (0.20 h)10 (0.17 h)
1415 (0.25 h)12 (0.20 h)15 (0.25 h)
1615 (0.25 h)18 (0.30 h)15 (0.25 h)
2115 (0.25 h)24 (0.40 h)20 (0.33 h)
2330 (0.50 h)24 (0.40 h)25 (0.42 h)
2730 (0.50 h)30 (0.50 h)25 (0.42 h)
3330 (0.50 h)36 (0.60 h)35 (0.58 h)
3845 (0.75 h)36 (0.60 h)40 (0.67 h)
4445 (0.75 h)42 (0.70 h)45 (0.75 h)
4745 (0.75 h)48 (0.80 h)45 (0.75 h)
5245 (0.75 h)54 (0.90 h)50 (0.83 h)
5860 (1.00 h)60 (1.00 h)60 (1.00 h)

Rounding only stays fair if it runs both ways, which is why the rule is nearest multiple rather than always down. A system that only ever rounds down shortens paid time on every shift, and UK minimum wage is worked out on the time actually worked, so consistent rounding down can push an hourly rate under it. Check your own employer or client policy for the increment they use.

Working out a duration by hand

The mistake almost everyone makes is subtracting clock times as if they were ordinary decimal numbers. 17:15 minus 08:40 is not 8.75 and it is not 9 hours 25 minutes, because minutes carry at 60 rather than at 100. Two methods avoid it.

The first is to convert both times to minutes since midnight and subtract once, which is what the calculator above does. 08:40 is 8 times 60 plus 40, so 520 minutes. 17:15 is 17 times 60 plus 15, so 1035 minutes. The difference is 515 minutes, and 515 divided by 60 is 8 remainder 35, so the answer is 8 hours 35 minutes, or 8.58 decimal hours.

The second is to count forward in two hops, which is easier in your head. Go from the start to the next whole hour, then from there to the end. 08:40 to 09:00 is 20 minutes; 09:00 to 17:15 is 8 hours 15 minutes; adding them gives 8 hours 35 minutes. Counting forward also handles a span that crosses midnight without any special rule, because you never produce a negative number to correct: 22:50 to 06:20 is 10 minutes to 23:00, then 7 hours to 06:00, then 20 minutes, which is 7 hours 30 minutes.

If you subtract column by column instead, borrow 60 and not 100. For 17:15 minus 08:40 the minutes go negative, so take an hour off the 17 and add 60 to the 15: 16:75 minus 08:40 is 8 hours 35 minutes. The same borrow is why a duration written as 8.35 in a spreadsheet is wrong when what was meant was 8 hours 35 minutes, which is 8.58 in decimal hours. Whole dates rather than clock times are a different calculation, and the days between dates calculator covers that one.

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.

How long is 5pm to 10pm?

5 hours, or 300 minutes, or 5.00 decimal hours. In 24 hour terms that is 17:00 to 22:00, and 22 minus 17 is 5. The neighbouring evening spans work the same way, so 6pm to 11pm is also 5 hours and 4pm to 8pm is 4 hours.

How many hours is 11:30 to 3:30?

4 hours if that means 11:30 am to 3:30 pm, and 16 hours if it means 11:30 am through to 3:30 the next morning. A span written without am or pm has two answers exactly 12 hours apart, because moving either end across the am and pm line shifts the result by half a day. The shorter reading is the usual intent.

Is 12am midnight or noon?

12 am is midnight, at the very start of a day, and 12 pm is noon. That is the reverse of what the numbers suggest, which is why it trips people up: 12 am comes immediately before 1 am and 12 pm comes immediately before 1 pm. On a 24 hour clock there is no ambiguity, since midnight is 00:00 and noon is 12:00. So 12 am to 12 pm is 12 hours.

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.

How do I convert decimal hours back to hours and minutes?

Multiply the decimal by 60 to get total minutes, then split that into whole hours and the remainder. 1.75 hours is 105 minutes, which is 1 hour 45 minutes. Do not read the digits after the point as minutes: 8.25 hours is 8 hours 15 minutes, not 8 hours 25 minutes.

What is the 7 minute rule for rounding timesheets?

It is quarter hour rounding described from the boundary. Minutes 1 to 7 past a quarter hour round down to that quarter, and 8 to 14 round up to the next one, which is the same as rounding to the nearest 15 minutes. So 7 hours 52 minutes becomes 7 hours 45 minutes and 7 hours 53 minutes becomes 8 hours.

What is a tenth of an hour in minutes?

6 minutes. Legal, accounting and agency billing usually record time in tenths, so 0.1 is 6 minutes, 0.5 is 30 minutes and 0.7 is 42 minutes. Tenths are convenient because every one of them lands on a whole number of minutes.

See all everyday & shopping calculators.