Hours Calculator

Calculate hours worked from start time, end time, and unpaid break. Supports overnight shifts and a multi-day weekly total.

Day 1
Net: 8.00 h (8:00) · Break: 30 min
Day 2
Net: 8.00 h (8:00)
Weekly total
16.00 hours
HH:MM16:00
Days counted2
Average / day8.00 h
Results update as you type

What this calculator does

This calculator returns net hours worked per shift and a weekly total across all rows. Each row accepts a start time, end time, unpaid break in minutes, and an overnight flag for shifts that cross midnight. Results are shown in decimal hours (e.g. 7.50) and HH:MM (e.g. 7:30).

Formula

gross minutes = (endMin − startMin); if overnight, add 24 × 60.

net minutes = gross minutes − break minutes

decimal hours = net minutes ÷ 60

Variable definitions

  • startShift start time (HH:MM).
  • endShift end time (HH:MM).
  • breakUnpaid break duration in minutes.
  • overnightSet when the end time is on the next calendar day.

Step-by-step calculation

  1. Convert start and end to minutes since midnight.
  2. Gross minutes = end − start. If overnight, add 1,440.
  3. Net minutes = gross − unpaid break.
  4. Decimal hours = net ÷ 60. HH:MM = floor(net ÷ 60):pad(net mod 60).
  5. Sum the net values across all rows for the weekly total.

Worked example

Shift: 09:00 → 17:30, unpaid break 30 min.

  • Gross = 17:30 − 9:00 = 8 h 30 min = 510 min
  • Net = 510 − 30 = 480 min = 8.00 hours (8:00)

Overnight: 22:00 → 06:00, break 0 → 22:00 to 30:00 = 480 min = 8.00 hours.

How to use this calculator

  1. Enter start time, end time, and the unpaid break (0 if none).
  2. Toggle Overnight if the end time is on the next day.
  3. Click Add day to add more rows for a weekly total.

Common mistakes

  • Forgetting the overnight toggle: 22:00 → 06:00 without overnight produces a negative shift.
  • Break longer than shift: double-check your break input — the calculator flags this case.
  • Mixing paid and unpaid breaks: only deduct unpaid breaks; paid breaks count as worked hours.

Frequently asked questions

How do I calculate hours worked between two times?

Subtract start time from end time, then subtract any unpaid break. The calculator does this in minutes for precision and converts to decimal hours (e.g. 7.5) and HH:MM (e.g. 7:30).

What about overnight shifts that cross midnight?

Turn on the overnight toggle and the calculator adds 24 hours when end is earlier than start. A 22:00 → 06:00 shift becomes 8 hours.

How are breaks handled?

Enter the unpaid break length in minutes. It's subtracted from the gross shift. The calculator flags an error if the break is longer than the shift itself.

What is decimal hours?

Decimal hours expresses time as a single number — 7 hours 30 minutes is 7.5. Most payroll systems prefer decimal hours for multiplying against a pay rate.

Can I add multiple workdays for a weekly total?

Yes. Add one row per day, set the times, optional break, and overnight flag. The weekly total sums every row's net hours.

How do I remove a row?

Click the Remove button on the row. The week total updates immediately.

What time format does it use?

Inputs use the browser's standard time picker (typically 24-hour or 12-hour based on your locale). Results show both decimal hours and HH:MM.

Related calculators

Last updated: June 22, 2026 · Checked against standard formulas and sample test cases. All math runs in minutes for exact arithmetic; decimal hours are rounded to two places for display.