Time duration calculator
Work out how long between two times, in hours and minutes and in decimal hours. Handles shifts that run past midnight, and takes off an unpaid break.
How this calculator works
Enter a start and an end time and it counts the minutes between them, then shows that as hours and minutes, as decimal hours, and as a plain minute total. It updates as you type.
Two things it does that a plain subtraction does not:
- It handles overnight. If the end time looks earlier than the start, like 22:00 to 06:00, the tool assumes the run crossed midnight and gives you 8 hours rather than a negative number. That is what someone timing a night shift or a night's sleep actually means.
- It takes off a break. Put the unpaid break in minutes and it comes off the total, because the number you usually want is the paid one.
Worked example. A 09:00 to 17:30 day with a 30 minute unpaid lunch is 8 hours, or 8.0 decimal hours. Without the break it would be 8 hours 30 minutes.
Decimal hours, and why payroll wants them
Timesheets and invoices usually want decimal hours, not hours and minutes, because you cannot multiply 8 hours 30 minutes by an hourly rate without converting it first. 8 hours 30 minutes is 8.5 decimal hours, since 30 minutes is half of 60.
The trap is assuming the minutes are the decimal. 8 hours 30 minutes is not 8.30 hours. A quarter of an hour is 0.25, twenty minutes is 0.33, forty minutes is 0.67. This tool shows both figures so you do not have to do that conversion in your head.
Runs longer than a day
Tick different days and you can put in a start and end date as well, which covers anything from a long shift to a multi-day event. The maths runs on whole days plus the time difference, in UTC, so a clock change never adds or drops an hour.
Common questions
How do I work out hours between two times?
Enter the start and end time above. The tool counts the minutes between them and shows the result as hours and minutes, as decimal hours for timesheets, and as a total in minutes.
Does it handle overnight shifts?
Yes. If the end time is earlier than the start, like 22:00 to 06:00, it assumes the run crossed midnight and returns 8 hours rather than a negative. For anything longer than one night, tick different days and give it the dates.
What are decimal hours?
Hours expressed as a decimal so they can be multiplied by a rate. 8 hours 30 minutes is 8.5 decimal hours, not 8.30. A quarter hour is 0.25 and twenty minutes is 0.33.
Can I take off a lunch break?
Yes. Put the unpaid break in minutes and it is deducted from the total, so the figure you get is the paid time.