Skip to content
EN

Hours Between Two Times

From clock-in to clock-out, with the unpaid break taken off — and the night shift that crosses midnight handled properly.

Unpaid time to subtract — leave empty for none.

Total

Decimal hours

For payroll and hourly billing — 2:45 is 2.75, not 2.45.

Everything is worked out in your browser. Nothing is sent anywhere.

The night shift is where subtraction fails

From 09:00 to 17:30 is straightforward: subtract one from the other and you get 8:30. From 22:00 to 06:00, the same subtraction gives minus sixteen hours. The shift is eight hours long, and the arithmetic says otherwise because the clock resets at midnight.

The fix is to notice that an end time earlier than the start means the day rolled over, and add the twenty-four hours back. This page does that automatically and tells you when it happened, so you can check it was what you meant rather than trusting a number you cannot see the working of.

The break matters more than it looks. Nine to six with an hour for lunch is eight paid hours, not nine — and over a five-day week that single hour is the difference between 40 and 45 on the payslip. Leave the break field empty if none applies.

Frequently asked questions

How many hours is 9am to 5:30pm?

8 hours 30 minutes, or 8.5 in decimal. If half an hour of that is an unpaid break, the paid time is 8:00 — enter 30m in the break field and the calculator takes it off.

How do I calculate a night shift that goes past midnight?

Enter the times as they are: 22:00 to 06:00. The calculator sees that the end is earlier than the start, treats it as the next day and returns 8:00. It also says so in a note under the result, because a shift crossing midnight is worth confirming rather than assuming.

Why is my result negative?

The break is longer than the shift itself. The calculator shows the negative rather than clamping to zero, because the number is telling you the entry is wrong somewhere — usually a break typed in hours when minutes were meant.

Other tools