Time Difference
Work out the hours and minutes between two times, deduct a break, handle overnight shifts, and add a week of durations together.
Duration
—
Enter a start and an end time.
Add up several shifts
One duration per line, as H:MM.
Related tools
All Calculators tools →This tool runs entirely in your browser. Nothing you enter is sent to our servers, so there is nothing for us to store or see.
About the Time Difference
Enter a start and an end time and get the duration in hours and minutes, in decimal hours for payroll or invoicing, and in total minutes. Deduct a break in the same step.
Overnight shifts work. If the end time is earlier than the start and no dates are given, the period is assumed to cross midnight — 22:00 to 06:00 is eight hours, not minus sixteen. Add dates when the span covers more than one night, or when you want the assumption removed.
The arithmetic is done in seconds rather than with date objects, which means daylight saving cannot affect it. A calculation across the spring clock change comes back as 24 hours, because the two times you entered are 24 hours apart on the clock; tools built on timestamps report 23 and leave people wondering where the hour went.
There is also a totals box for adding a week of shifts together. Adding hours and minutes by hand means carrying in base 60, which is where timesheet errors come from — 45 minutes plus 45 minutes is 1:30, not 0:90.
How to use the Time Difference
-
Enter the two times
Use the 24-hour clock — 09:00 and 17:30. Seconds are optional and accepted where you need them.
-
Add dates if the span is longer than one night
Leave the date fields empty for a single shift; an end earlier than the start is then treated as crossing midnight.
-
Deduct a break
Enter the unpaid break in minutes. The result shows the gross period, the break and the worked time separately.
-
Add up several shifts
Paste a list of durations as H:MM, one per line, into the totals box to get the week's total in hours and minutes and in decimal hours.
Frequently asked questions
How do I work out an overnight shift?
Just enter the times. With no dates given, an end time earlier than the start is treated as crossing midnight, so 22:00 to 06:00 comes back as eight hours. If the shift runs longer than one night, add the two dates and the assumption is dropped in favour of the exact span.
What are decimal hours and why do I need them?
Payroll and invoicing systems usually want time as a decimal — 7.75 rather than 7:45 — because they multiply it by a rate. Converting by hand is where errors creep in: 7:45 is 7.75 hours, not 7.45. Both forms are shown so you can copy whichever the system expects.
Does the daylight saving change affect the result?
No, and that is deliberate. The calculation works on clock times as numbers, so midnight to midnight across the spring change is 24 hours. Tools built on timestamps report 23 because one hour genuinely did not exist in local time. Which answer you want depends on whether you are counting elapsed time or hours on a rota — for a rota, this one is right.
Why is 45 minutes plus 45 minutes not 0:90?
Because time carries at 60, not at 100. Two lots of 45 minutes make 90 minutes, which is 1 hour 30. Doing this by hand across a week of shifts is where most timesheet errors come from, which is why the totals box does the carrying for you.
Is anything sent to a server?
No. Everything is calculated in your browser and nothing is transmitted or stored, which matters for a timesheet — it is a record of where somebody was and when.