Hours Calculator

How many hours between two times? Enter a start and end time to get the duration in hours and minutes plus decimal hours — an overnight shift rolls to the next day automatically and an unpaid break gets subtracted. Need to add or subtract time instead? Switch tabs.

Enter a start time and an end time

Every calculation runs in your browser — nothing is sent to a server.

Turning a start and end time into payable hours

Every timesheet, freelance invoice, and shift roster eventually reduces to the same small piece of arithmetic: how much time actually elapsed between a start and an end, minus whatever unpaid gap sat in the middle, expressed in a format a spreadsheet or payroll system can multiply by an hourly rate. That last part matters more than it looks — hours and minutes don't multiply cleanly (7 hours 30 minutes times $18 isn't "7.30 × 18"), so the duration has to be converted to a decimal before it's useful for pay.

This calculator covers both directions of that problem: measuring the gap between two clock times — including a shift that runs past midnight — and projecting a new clock time by adding or subtracting a duration. It's built for hourly employees closing out a shift, contractors billing by the hour, warehouse or hospital staff on overnight rotations, and anyone reconstructing "what time will it be six hours and fifteen minutes from now."

Reading the inputs correctly

  1. In the Between two times tab, set the start time and end time exactly as they appear on the schedule or clock-in system — no need to guess whether a shift crosses midnight, the tool detects that from the values alone.
  2. Enter unpaid break minutes as a single number (e.g. a 30-minute lunch). If a shift has two breaks, add their minutes together before typing them in; the field subtracts one lump sum from the gross duration.
  3. In the Add or subtract time tab, pick a base time, choose the operation, then enter hours and minutes separately — this is for projecting forward or backward from a known clock time rather than measuring a gap.

The arithmetic underneath

Gross minutes = end time (as minutes since midnight) − start time (as minutes since midnight). If that number is negative, the tool adds 1440 (24 hours), which is the same as saying "the end time happened the next day."

Net minutes = gross minutes − break minutes, floored at zero so a break longer than the shift never produces a negative duration.

Decimal hours = net minutes ÷ 60, rounded to two decimal places — the number payroll software actually multiplies by an hourly rate.

Worked examples

Day shift with lunch: start 09:00, end 17:30, break 45 min. Gross = 1050 − 540 = 510 minutes (8h 30m). Net = 510 − 45 = 465 minutes = 7h 45m = 7.75 decimal hours.

Overnight shift crossing midnight: start 23:15, end 07:00, break 20 min. End (420) is smaller than start (1395), so 1440 is added first: 420 + 1440 = 1860. Gross = 1860 − 1395 = 465 minutes (7h 45m). Net = 465 − 20 = 445 minutes = 7h 25m = 7.42 decimal hours.

Projecting forward past midnight: base time 22:40, add 3h 50m. 22:40 is 1360 minutes; adding 230 minutes gives 1590, which is 150 minutes past 1440 (midnight) — so the result is 02:30, next day.

Minutes to decimal hours, at a glance

MinutesDecimal hoursMinutesDecimal hours
100.17350.58
150.25400.67
200.33450.75
250.42500.83
300.50550.92

Common mistakes to avoid

What this tool doesn't cover

This is a plain clock-arithmetic tool, not a payroll or compliance system. It doesn't apply overtime multipliers, doesn't know your employer's or jurisdiction's break requirements or rounding conventions, and doesn't account for daylight saving time transitions (a spring-forward or fall-back night is technically 23 or 25 hours long rather than 24). For pay disputes or compliance questions, treat the decimal-hours figure as a starting point and check it against your employer's timekeeping policy or local labor rules.

Sources & further reading

Frequently asked questions

How do I calculate hours between two times, including an overnight shift?

Enter your start time and end time in the "Between two times" tab — for example a shift starting at 22:00 (10:00 PM) and ending at 06:00 (6:00 AM). Because the end time is earlier on the clock than the start time, this hours calculator automatically treats the end time as happening the next day and adds 24 hours before subtracting, giving 8 hours 0 minutes (8.00 decimal hours) instead of a negative or nonsensical result. You don't need to manually add 24 hours or flag the shift as overnight — rolling the end time forward is the default whenever the end time is earlier than the start time.

How does an unpaid break get subtracted from my work hours?

Type the number of unpaid break minutes — for example a 30-minute lunch — into the break field, and the calculator subtracts it from the gross time between your start and end time before showing the net duration. A shift from 09:00 to 17:30 is 8 hours 30 minutes gross; subtracting a 30-minute break gives a net duration of 8 hours 0 minutes (8.00 decimal hours), which is the number worth putting on a timesheet. If you enter a break longer than the shift itself, the tool caps the break at the shift length and shows a net duration of 0 rather than a negative number.

Why is the decimal hours number different from the hours and minutes shown?

Timesheets and payroll systems usually want hours as a decimal rather than hours and minutes, because minutes don't divide evenly into 100. A duration of 7 hours 30 minutes is 7 hours plus 30 out of 60 minutes, or 7.5 decimal hours — not 7.30. This hours calculator shows both formats side by side, so you can read "7h 30m" for a schedule and copy "7.5" straight into a spreadsheet or payroll form that expects decimal hours.

How do I add or subtract hours and minutes from a time?

Switch to the "Add or subtract time" tab, enter a starting time, choose Add or Subtract, and type how many hours and minutes to apply. For example, starting at 23:30 and adding 2 hours 45 minutes rolls past midnight to 02:15 the next day, and the tool notes the day change so you don't lose track of it. This mode is handy for working out shift end times, appointment reminders, or how many hours ago something happened, without doing the clock math by hand.

Is my time data sent to a server?

No. This hours calculator runs entirely in your browser — the times, break minutes, and any add/subtract values you enter never leave your device and nothing is uploaded or stored on a server. Your last inputs are saved only in your browser's local storage so the tool remembers them next time, and you can clear that at any time by clearing your browser data.