How to use the Time Duration Calculator
- Enter the start time in 24-hour or your locale's format.
- Enter the end time; overnight shifts wrap automatically past midnight.
- Enter the unpaid break in minutes.
- Read the elapsed and net durations in hours and minutes.
- Use the decimal hours figure when entering time into a payroll system.
How the calculation works
Both times are converted to minutes past midnight and subtracted. When the end time is earlier than the start, the shift is assumed to cross midnight and a full day is added — the standard handling for night shifts. Working in whole minutes avoids the rounding artefacts that appear when clock times are handled as decimal fractions from the outset.
Break deduction reflects how most jurisdictions treat unpaid meal periods: the break is subtracted from the shift before pay is calculated, but the shift span itself still governs rest-period and maximum-hours rules. Keeping the elapsed and net figures separate on screen means you can check both compliance and pay from a single calculation.
The decimal hours conversion is where manual timesheets leak money. Payroll systems want hours as a decimal, so 8 hours 20 minutes is 8.33 hours, not 8.20. Entering 8.20 loses eight minutes; repeated daily across a workforce, that rounding error becomes a material and legally exposed underpayment.
minutes = (end − start) mod 1440; net = minutes − break; decimal hours = net / 60Source: Timekeeping and rounding practice per US FLSA 29 CFR 785.48(b) and equivalent national wage regulations.
Worked example
A night shift runs 22:15 to 06:45 with a 45-minute unpaid break.
- Start 22:15 = 1,335 minutes; end 06:45 = 405 minutes.
- End is earlier, so add a day: 405 + 1,440 − 1,335 = 510 minutes elapsed.
- Elapsed: 8 hours 30 minutes.
- Net of break: 510 − 45 = 465 minutes = 7 hours 45 minutes = 7.75 decimal hours.
8h 30m on site, 7.75 paid hours — and entering 7.45 instead of 7.75 would underpay by 18 minutes per shift.
Frequently asked questions
How does it handle overnight shifts?+
If the end time is before the start time, a full day is added automatically, so 22:00 to 06:00 correctly returns eight hours.
Why do I need decimal hours?+
Payroll systems multiply hours by a rate, so minutes must be expressed as a fraction of an hour. Twenty minutes is 0.33 hours, not 0.20.
Should breaks always be deducted?+
Only unpaid ones. Short paid rest breaks stay in the total; check the rule that applies in your jurisdiction.
Can I round to the nearest quarter hour?+
Many employers do, but rounding must be neutral over time rather than consistently favouring the employer, which most wage regulations treat as unlawful.
Last reviewed August 31, 2026. We review this page whenever the underlying formula, tax year, published rate or standard changes.