Time Duration Calculator
The Time Duration Calculator works out how much time passed between a start and end time — perfect for timesheets and work hours. It handles overnight shifts, subtracts unpaid breaks, and gives you the result in hours and minutes and in decimal hours for payroll. The overnight-shift check is a single test: if the end time is earlier than the start time, the calculator assumes exactly one midnight crossing and adds a full 24 hours — it can't represent a shift spanning more than 24 hours total. If the unpaid break entered is longer than the raw time between start and end, worked time is floored at zero rather than going negative, so an oversized break reports 0 hr 0 min instead of an error. Decimal hours are always shown to two decimal places (minutes ÷ 60), the format most payroll and invoicing systems expect.
Total time
8 hr 0 min
A 30-minute unpaid break has been subtracted.
Enter clock-in and clock-out times to get worked hours for a timesheet. Decimal hours (for example 8.50) is the format most payroll systems use. Everything is calculated in your browser.
How This Tool Works
Enter the start and end time and, optionally, an unpaid break in minutes. The worked duration appears instantly in hours and minutes and as decimal hours — the format most payroll systems use.
Formula & Method
Duration = end time − start time. If the end time is earlier than the start (an overnight shift), 24 hours are added. Any unpaid break minutes are then subtracted, and the result is shown as hours and minutes and as decimal hours (minutes ÷ 60).
Example Calculation
Take an overnight shift starting at 22:15 (10:15 PM) and ending at 06:45 (6:45 AM), with a 45-minute unpaid break. Since the end time (405 minutes past midnight) is earlier than the start time (1,335 minutes past midnight), the calculator detects an overnight shift and adds 24 hours (1,440 minutes): 405 − 1,335 + 1,440 = 510 raw minutes. Subtracting the 45-minute break gives 510 − 45 = 465 minutes worked — that's 7 hours 45 minutes, or 465 ÷ 60 = 7.75 decimal hours for payroll.
Frequently Asked Questions
Does it handle overnight shifts?+
Yes. If the end time is earlier than the start time, the calculator assumes the shift crossed midnight and adds 24 hours automatically.
What are decimal hours?+
Decimal hours express minutes as a fraction of an hour — for example 8 hours 30 minutes is 8.50 decimal hours. Most payroll and billing systems use this format.
Can I subtract a lunch break?+
Yes. Enter the unpaid break in minutes and it is subtracted from the total worked time.
What happens if my break is longer than my shift?+
The calculator floors worked time at zero — it won't show a negative result. If your entered break minutes exceed the raw time between your start and end time, you'll see 0 hr 0 min and 0.00 decimal hours, which is a sign to double-check your times or break length rather than a valid shift.
Can I calculate a shift longer than 24 hours?+
No — the calculator only detects a single midnight crossing. If your end time is earlier than your start time, it assumes exactly one 24-hour wraparound. For shifts spanning more than a full day, split them into separate entries (one calculation per calendar day) and add the totals together.
Found this useful? Share it
Help someone else out — or link to it from your own site.
Link to this tool
Writing about time duration calculator? Paste this on your site to link here.
<a href="https://everyfix.net/tools/time-duration-calculator/">Time Duration Calculator</a> by <a href="https://everyfix.net">EveryFix</a>Related Tools
Hourly to Salary Calculator
Convert an hourly wage into daily, weekly, monthly, and annual pay.
Use tool →Age Calculator
Calculate your exact age in years, months, and days.
Use tool →Date Difference Calculator
Calculate the number of days, weeks, or years between two dates.
Use tool →Percentage Calculator
Calculate percentages, percentage of a number, or percentage change.
Use tool →