Time Duration Calculator
Hours worked between two times, including overnight shifts.
Leave at 0 to skip the pay figure.
- Before break
- 8 h 30 m
- Decimal hours
- 8.00
Every tool runs entirely in your browser. Your files are never uploaded to a server.
Subtract the start from the end, adding 24 hours if the end is earlier — that is an overnight shift, not a negative duration. Then subtract any unpaid break.
How to use Hours Between Times
- Enter start and end. On a 24-hour clock: 09:00 and 17:30.
- Add the unpaid break. In minutes. Most systems exclude it from paid time.
- Read both formats. Hours and minutes for people, decimal hours for payroll.
About calculating time between two times
Time arithmetic looks like ordinary subtraction and is not, because the clock wraps. An end time earlier than the start does not mean a negative duration; it means the period crossed midnight, and adding twenty-four hours before subtracting is the correction. Timesheets and rota systems that omit it produce large negative numbers for night shifts, which is the most common failure in this whole area. The second trap is notation. Hours and minutes are sexagesimal, so 8:30 means eight and a half hours, while a payroll system multiplying by an hourly rate needs 8.5. Writing 8.30 into a decimal field underpays by twelve minutes per shift, and because it looks correct it can persist for months. Converting properly means dividing the minutes by sixty, not moving a decimal point. Daylight saving is the third, and almost nothing handles it automatically. Twice a year a shift spanning the transition is genuinely an hour longer or shorter than the clock times imply, and since the shift itself is measured in elapsed time rather than clock positions, the fair figure is the elapsed one. Most systems, including this one, compute clock difference and leave that adjustment to a human.
Frequently asked questions
How do I calculate a shift that crosses midnight?
What are decimal hours and why does payroll want them?
Should breaks be deducted?
Does this handle daylight saving changes?
Last updated