Skip to content
Date & Timetime

Time Duration Calculator

Duration between two times with a break deducted, in both clock and decimal form. Decimal hours is what payroll wants, and 8 hours 15 minutes is 8.25 rather than 8.15.

Also called: hours worked calculator, time between two times.

minutes
Duration
8 hours and 0 minutes

8 hours and 0 minutes after a 45 minute break, or 8 hours as a decimal. Before the break it was 8 hours and 45 minutes.

As decimal hours
8
Total minutes
480
Before the break
8 hours and 45 minutes
On overnight shifts
A same-day shift.
Method and background

How this is calculated

Convert both times to minutes past midnight, subtract, and deduct the break. An end time earlier than the start is treated as an overnight shift and a day is added, which is what a night worker means. The decimal conversion is the part that causes errors on timesheets: fifteen minutes is a quarter of an hour, so it is 0.25 and not 0.15.

convert both times to minutes, subtract, then take off the break
h, m
Hours and minutes
b
Break in minutes

Worked examples

Each of these is asserted on every build. If a change to the engine ever moved one of these answers, the build would fail before the page could print it.

a working day with a break

Start hour
9
Start minute
30
End hour
18
End minute
15
Break
45 minutes

Duration8 hours and 0 minutes

525 gross minus a 45 minute break

Open this example

an overnight shift adds a day

Start hour
22
Start minute
0
End hour
6
End minute
0
Break
0 minutes

Duration8 hours and 0 minutes

boundary: the end time is earlier than the start

Open this example

a break longer than the shift leaves nothing

Start hour
9
Start minute
0
End hour
10
End minute
0
Break
120 minutes

Duration0 hours and 0 minutes

degenerate case

Open this example

Method and limits

What it assumes

  • A shift of less than 24 hours.

What it deliberately does not model

  • Multiple breaks need to be summed before entering.

Formula version 1.0.0 · definition 1.0.0 · India · Report a problem with this calculator

Frequently asked questions

Why is 8 hours 15 minutes not 8.15?
Because minutes are sixtieths, not hundredths. Fifteen minutes is a quarter of an hour, so 8.25. Entering 8.15 on a timesheet underpays by six minutes.