Hours Calculator
Calculate hours worked from start time, end time, and unpaid break. Supports overnight shifts and a multi-day weekly total.
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
start— Shift start time (HH:MM).end— Shift end time (HH:MM).break— Unpaid break duration in minutes.overnight— Set when the end time is on the next calendar day.
Step-by-step calculation
- Convert start and end to minutes since midnight.
- Gross minutes = end − start. If overnight, add 1,440.
- Net minutes = gross − unpaid break.
- Decimal hours = net ÷ 60. HH:MM = floor(net ÷ 60):pad(net mod 60).
- 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
- Enter start time, end time, and the unpaid break (0 if none).
- Toggle Overnight if the end time is on the next day.
- 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
- Time Duration CalculatorElapsed time between two date-times.
- Days Between Dates CalculatorCount days, weeks, and months between two dates.
- Age CalculatorExact age in years, months and days.
- Chronological Age CalculatorRecords-style age between birth and reference date.
- Tip CalculatorCalculate gratuity, total, and per-person share.
- Percent Off CalculatorSale price and savings after a discount.