to navigate Enter to open Esc to close

Time Duration Calculator: Overnight Shifts and Payroll

22:00 to 06:00 is eight hours, not minus sixteen. Subtracting the clock values gives a negative whenever a shift crosses midnight, which is why so many calculators either return nonsense or make you tick a box first. This one works it out and tells you it did.

Built for timesheets, not just arithmetic. Unpaid breaks come out, overtime is separated, the result is given in the decimal hours payroll actually wants, and the quarter-hour rounding that US federal rules permit is applied properly — minutes one to seven down, eight to fourteen up.

Time Duration Calculator

Live
Optional — overtime, pay and repeats
Paid time
How the shift breaks down
Gross hours and pay before tax and deductions. Runs entirely in your browser.

Why shifts that cross midnight break calculators

A clock time is a position in a day, not a quantity. Subtract one from another and the arithmetic works only while the second is later than the first:

ShiftPlain subtractionCorrect answer
09:00 → 17:308h 30m8h 30m
22:00 → 06:00−16h8h
23:30 → 00:30−23h1h
08:00 → 08:000h0h — or 24h, and only you know which

The fix is one line: if the difference is negative, add 24 hours. What matters is telling you it happened, because a shift that silently gained a day is worse than one that refused to calculate. The tool above flags every overnight shift rather than assuming.

Identical start and end times are ambiguous. 08:00 to 08:00 is either a zero-length entry or a full 24-hour shift, and nothing in the times themselves distinguishes them. This calculator reports zero and says so; if you meant a full day, enter 08:00 to 07:59 plus a minute, or record it as 24 hours directly.

Decimal hours, and the mistake that costs 20 minutes

Payroll systems work in decimal hours. A shift of seven hours and forty-five minutes is 7.75, not 7.45 — and typing the clock reading straight into a payroll field is a 20-minute error every time:

ClockDecimalRead as the clock value
7:157.257.15 — short by 6 minutes
7:307.507.30 — short by 12 minutes
7:457.757.45 — short by 18 minutes
7:507.837.50 — short by 20 minutes

The error always runs one way. Minutes above 60 hundredths of an hour read low, never high, so an employee reporting clock time into a decimal field is consistently underpaid. Over a year of 5-day weeks at 18 minutes a day, that is roughly 39 hours.

The seven-minute rule

United States federal regulations allow an employer to round recorded time to the nearest quarter hour, provided the rounding is neutral — it must average out rather than always favour the employer. The convention that satisfies this is the seven-minute rule:

Minutes past the quarterRoundsExample
1 to 7Down09:07 becomes 09:00
8 to 14Up09:08 becomes 09:15
16 to 22Down09:22 becomes 09:15
23 to 29Up09:23 becomes 09:30

Some employers round to a tenth of an hour instead — six-minute blocks — which is finer and equally acceptable. Rounding that only ever runs down is not permitted, and neither is rounding the start up while rounding the end down. If your timesheet is consistently short after rounding, that is worth raising.

Breaks, and which ones are paid

BreakUsuallyNote
Meal break, 30+ minutesUnpaidOnly if genuinely relieved of duty. Eating at a desk while covering the phone is working time
Short break, under 20 minutesPaidUS federal rules treat short breaks as compensable working time
On-call at the workplacePaidWaiting where you cannot use the time freely is working time
Travel between sitesPaidTravel during the working day, though not the ordinary commute
Changing into required kitOften paidContested, and jurisdiction-specific

Rules differ by country and by contract. The break field above simply subtracts what you enter; whether a particular break should be unpaid at all is a question for the contract, not a calculator.

Common mistakes

Typing 7:45 into a payroll field. It reads as 7.45 and pays eighteen minutes short. Convert first — minutes divided by 60 — or use the decimal figure the calculator gives you. The error runs one way, always against the person being paid.
Summing rounded shifts instead of rounding the total. Rounding each of five daily shifts to the quarter hour and adding them can differ from rounding the weekly total by more than an hour. Whichever your employer does, be consistent — and know which one it is.
Forgetting that one night a year is 23 hours and another is 25. Where clocks change, a shift spanning the switch is an hour shorter or longer than the times suggest. Timesheet software usually handles it; a calculator working from clock readings alone cannot, and neither can this one.
Deducting a break that was never taken. A 30-minute deduction applied automatically to a shift where you worked through is unpaid work. If it happens routinely, the timesheet is wrong rather than the day.

Frequently asked questions

How do I calculate hours for a shift that crosses midnight?

Subtract as usual and add 24 hours if the result is negative. 22:00 to 06:00 gives minus 16, so the answer is 8. The calculator above does this automatically and marks the shift as overnight, rather than asking you to tick a box or quietly returning a negative.

What is 7 hours 45 minutes in decimal?

7.75. Divide the minutes by 60: 45 ÷ 60 = 0.75. Typing 7.45 instead — the clock reading — pays eighteen minutes short, and the error always runs against the employee because minutes above 36 always read low.

What is the 7-minute rule?

A US convention for rounding recorded time to the quarter hour: minutes 1 to 7 past a quarter round down, 8 to 14 round up. Federal rules permit rounding provided it is neutral over time — rounding that only ever runs in the employer’s favour is not allowed.

Should my lunch break be unpaid?

A meal break of 30 minutes or more is usually unpaid, but only if you are genuinely relieved of duty. Eating at a desk while answering the phone is working time. Short breaks under 20 minutes are treated as paid under US federal rules. Your contract and jurisdiction decide; this calculator just subtracts what you enter.

How is overtime worked out?

Hours past the threshold are paid at a multiplier, commonly one and a half. Set the threshold and the rate above and the calculator separates base from premium hours. Note that in the US overtime is usually assessed weekly rather than daily, and many salaried roles are exempt from it entirely.

Why does my timesheet total differ from my own sum?

Usually rounding order. Rounding each daily shift to the quarter hour and adding them can differ from rounding the weekly total by over an hour across five days. Both are defensible; they are not the same, and it is worth knowing which your employer uses.

Does it handle daylight saving?

No, and no calculator working from clock readings alone can. On the two nights a year when clocks change, a shift spanning the switch is an hour shorter or longer than the times suggest. Adjust that shift by hand.

Is my data stored?

No. Everything runs in your browser with no server request, and works offline once the page has loaded. Nothing is written to disk and nothing persists after you close the tab.

Related calculators

See the full list of Date & Time calculators, or try: