CalcPerks
Date & Time

Time Duration Calculator

Work out the hours and minutes between two times.

Enter a start time and an end time to get the duration in hours and minutes, total minutes and decimal hours.

Finishes
Duration
8 hr 30 min
09:00 to 17:30
Total minutes
510
Decimal hours
8.5
Hours and minutes8:30
Total seconds30,600
Share of a 24-hour day35.4%
8 hr 30 min is 8.5 decimal hours — payroll divides the minutes by 60, so 30 minutes is 0.50 and not 0.30.

How to use this calculator#

  1. Enter both times on the 24-hour clock if you can17:40 is unambiguous; 5:40 needs a PM. If you are using AM and PM, remember 12:00 AM is midnight and 12:00 PM is noon — the one pair that trips almost everyone up.
  2. Turn on the overnight option for any shift finishing the next morningWhen the end time is earlier on the clock than the start, the span has crossed midnight and a full 24 hours must be added. Without it, a 22:30 to 06:15 shift comes out negative or wildly wrong.
  3. Add dates for anything longer than a dayWith dates on both ends the tool counts whole days and then the clock difference, so 14 March at 18:00 to 16 March at 03:30 returns 33 hours 30 minutes rather than guessing.
  4. Copy the decimal hours for payroll, the h:mm for rotasPayroll systems multiply decimal hours by a rate. Rota software, holiday balances and timesheets almost always want hours and minutes. The tool shows both so you never convert by hand.

The formula#

Minutes past midnight

Duration (minutes) = (60 × H₂ + M₂) − (60 × H₁ + M₁), and add 1,440 if the result is negative • Decimal hours = minutes ÷ 60

H₁, M₁
Hour and minute of the start time on a 24-hour clock
H₂, M₂
Hour and minute of the end time
1,440
Minutes in a day — added once when the span crosses midnight
Decimal hours
The minute total divided by 60, which is the format payroll uses
Multi-day spans
Whole days between the two dates × 1,440, plus the clock difference

Working in a single unit removes the borrowing errors people make subtracting clock times by hand, where 17:40 minus 09:45 is often written as 8 hours 5 minutes instead of 7 hours 55. The 1,440-minute assumption breaks twice a year in regions observing daylight saving: one spring day has 1,380 minutes and one autumn day has 1,500. For spans crossing a changeover, use dated times rather than clock times alone.

How the duration is worked out#

Both times are converted into minutes past midnight, then subtracted. A 09:15 start is 555 minutes and a 17:40 finish is 1,060, giving 505 minutes — 8 hours and 25 minutes. Working in a single unit avoids the borrowing errors people make when subtracting clock times by hand, where 17:40 minus 09:45 is often mistakenly written as 8 hours 5 minutes.

Decimal hours are the minute total divided by 60. That 505-minute shift is 8.42 decimal hours, which is the format payroll systems and invoices expect. Note that 8 hours 25 minutes is not 8.25 hours — the fraction is 25/60, not 25/100. Mixing the two conventions is the single most common timesheet mistake.

Overnight spans and multi-day ranges#

When the end time is earlier on the clock than the start time, the span has crossed midnight. A shift from 22:30 to 06:15 looks negative at first, so 24 hours are added to give 7 hours 45 minutes. Enable the overnight option for any shift that finishes the next morning, otherwise the result will be wrong by a full day.

For spans longer than a day, add explicit dates to both ends. Then the calculation counts whole days between the dates and adds the clock difference, so 14 March at 18:00 to 16 March at 03:30 returns 33 hours 30 minutes. Dates also remove any ambiguity about which of two identical clock times came first.

Worked examples#

A normal working day with an unpaid lunch

09:15 to 17:40 with a 30-minute unpaid break.

  1. Start = 9 × 60 + 15 = 555 minutes past midnight
  2. End = 17 × 60 + 40 = 1,060 minutes past midnight
  3. 1,060 − 555 = 505 minutes elapsed, which is 8 hours 25 minutes
  4. 505 − 30 = 475 minutes paid
  5. 475 ÷ 60 = 7 remainder 55, so 7 hours 55 minutes
  6. As a decimal: 475 ÷ 60 = 7.92 hours

7 hours 55 minutes paid — 7.92 decimal hours. Writing it as 7.55 would underpay by 22 minutes.

A night shift crossing midnight

22:30 to 06:15 the following morning.

  1. Start = 22 × 60 + 30 = 1,350 minutes
  2. End = 6 × 60 + 15 = 375 minutes
  3. 375 − 1,350 = −975, which is negative, so the span crossed midnight
  4. −975 + 1,440 = 465 minutes
  5. 465 ÷ 60 = 7 remainder 45

7 hours 45 minutes — 7.75 decimal hours.

Reference tables#

Minutes to decimal hoursDivide by 60, never by 100. The two-decimal column is what payroll systems accept.
MinutesFraction of an hourDecimal (2 dp)Decimal (4 dp)
11/600.020.0167
51/120.080.0833
61/100.100.1000
101/60.170.1667
121/50.200.2000
151/40.250.2500
201/30.330.3333
242/50.400.4000
255/120.420.4167
301/20.500.5000
357/120.580.5833
363/50.600.6000
402/30.670.6667
453/40.750.7500
484/50.800.8000
505/60.830.8333
549/100.900.9000
5511/120.920.9167
6011.001.0000

Read it backwards to convert decimals to minutes: 0.4 hours is 24 minutes, 0.75 hours is 45 minutes. Multiply the decimal part by 60.

Common shift and session lengthsThe same duration in three formats.
Hours and minutesTotal minutesDecimal hours
4:002404.00
5:303305.50
6:003606.00
7:004207.00
7:304507.50
7:454657.75
8:004808.00
8:154958.25
8:255058.42
8:305108.50
9:005409.00
10:0060010.00
12:0072012.00
12:3075012.50

Only quarter-hour durations have a tidy decimal. Everything else needs the division, which is why 8:25 becoming 8.42 surprises people.

Common mistakes#

  • Writing 8 hours 25 minutes as 8.25The correct decimal is 8.42. Written as 8.25 the entry loses 10 minutes, and across a five-day week that is nearly an hour of unpaid work. This is the single most common timesheet error, and it always favours the employer.
  • Forgetting the overnight adjustmentA 23:00 to 07:00 shift subtracts to −16 hours. Some systems silently store the absolute value and report 16 hours instead of 8, doubling the entry. Any negative intermediate result means the span crossed midnight and needs 24 hours added.
  • Assuming every day is exactly 24 hoursOn the spring daylight-saving changeover a day is 23 hours and on the autumn one it is 25. A night shift spanning either boundary is genuinely an hour shorter or longer than the clock suggests, and payroll rules differ on which figure is paid.
  • Rounding each entry before adding them upRounding five daily figures to the nearest quarter-hour before summing can shift the weekly total by more than half an hour. Keep every row in whole minutes, sum them, and round only the final result.

Frequently asked questions#

How do I calculate a shift that ends after midnight?

Turn on the overnight option, or enter dates on both ends. The tool then adds a full day so a 23:00 to 07:00 shift correctly returns 8 hours.

What is the difference between 8:30 and 8.30 hours?

8:30 means 8 hours 30 minutes, which is 8.5 in decimal. Decimal hours divide the minutes by 60, so 8.30 decimal is actually 8 hours 18 minutes.

Should I subtract my lunch break?

This tool returns the raw elapsed time. Subtract unpaid breaks yourself, or use the work hours calculator, which has a break field on every row.

Key terms#

Elapsed time
The raw span between two clock times, before any breaks are deducted. What this calculator returns by default.
Decimal hours
Hours with the minutes expressed as a fraction of 60 — 7 hours 45 minutes is 7.75. The format payroll and invoicing systems expect.
Minutes past midnight
A single-number representation of a clock time, from 0 at 00:00 to 1,439 at 23:59. Makes subtraction trivial.
24-hour clock
Times written 00:00 to 23:59 with no AM or PM. Removes the noon-and-midnight ambiguity entirely.
Overnight shift
A span whose end time is earlier on the clock than its start time, requiring a full day to be added.
Daylight saving time
The seasonal clock change that makes one day 23 hours and another 25 in the regions that observe it.

Sources#

  1. Fact Sheet #22: Hours Worked Under the Fair Labor Standards ActUS Department of Labor, Wage and Hour Division
  2. Daylight saving timeNIST Time and Frequency Division
  3. ISO 8601 date and time formatInternational Organization for Standardization

Figures last checked .

Put this calculator on your site

Free, no sign-up, and no attribution fee — just keep the credit line that comes with the code. The calculator stays up to date automatically.

Preview the embed →