Subtracting times seems like mental arithmetic until the shift crosses midnight. From 8:45 PM to 2:30 AM is neither "minus 6 hours" nor a reason to give up and guess — it is 5 hours 45 minutes, and getting it wrong on a timesheet costs real money. This calculator computes the duration between any two times, handles the overnight rollover automatically, and shows the answer in three formats: hours and minutes, decimal hours, and total minutes.
Everything runs live in your browser as you set the times. Nothing is uploaded, the tool is free, no signup, and it works on your phone at the end of a shift when you are double-checking your hours before submitting a timesheet.
The three output formats are not redundant — each one serves a different consumer. Payroll software wants decimals, humans want h:mm, and some billing systems want raw minutes. Showing all three kills the conversion step where most errors happen.
What Each Output Means
Example: start 9:20 AM, end 4:05 PM. The calculator reports:
- Hours and minutes: 6:45 — the human-readable duration, 6 hours and 45 minutes.
- Decimal hours: 6.75 — what timesheet systems and wage math expect. 45 minutes is 45/60 = 0.75 of an hour.
- Total minutes: 405 — the raw count, useful for summing many intervals or for systems that bill per minute.
The critical fact hiding in the middle line: 6:45 is not 6.45 hours. The colon separates hours from minutes, not from hundredths. Writing 6.45 on a timesheet instead of 6.75 underpays someone by 18 minutes, and this conversion mistake is probably the single most common timesheet error. The decimal output exists so you never do that division in your head again.
Overnight Spans: The Automatic Rollover
If the end time is earlier than the start time, the tool assumes the span crossed midnight and rolls the end time to the next day. This is the behavior overnight work actually needs:
| Start | End | Interpretation | Duration |
|---|---|---|---|
| 8:45 PM | 2:30 AM | Crosses midnight | 5:30 (5.5 h) |
| 10:15 PM | 6:00 AM | Crosses midnight | 7:45 (7.75 h) |
| 11:30 PM | 12:15 AM | Crosses midnight | 0:45 (0.75 h) |
| 7:00 AM | 3:30 PM | Same day | 8:30 (8.5 h) |
The 11:30 PM to 12:15 AM row is the one worth internalizing: it is 45 minutes, not "negative 23 hours" or "23 hours 15 minutes." Because the end time is smaller, the rollover kicks in and adds a day before subtracting. The same rule means a 9:00 AM to 7:00 AM entry would be read as 22 hours — if that is not what you meant, the tool's interpretation makes the mismatch visible immediately in the duration shown.
One boundary the rollover cannot infer: shifts longer than 24 hours, or spans crossing two midnights, need a date-aware tool instead. This calculator handles any single-midnight crossing, which covers the vast majority of shift work.
How to Use This Calculator (Step by Step)
- Set the start time using the time input — most browsers offer a picker with hour and minute fields, or type directly.
- Set the end time. If it is earlier than the start, the overnight rule applies automatically.
- Read the h:mm duration for a quick sanity check — does 5:30 match what you expected for the 8:45 PM to 2:30 AM shift?
- Copy the decimal hours into your timesheet or payroll entry. This is the number wage calculations need.
- Use total minutes when billing in minute increments or summing across multiple intervals.
- Adjust either time and all three outputs refresh instantly.
How It Works: The Math
The tool converts each clock time to minutes since midnight, then subtracts with the midnight rollover rule:
start minutes = hours × 60 + minutesend minutes = hours × 60 + minutesduration = end − start; if negative, add 24 × 60 = 1440 minutes (one full day)
Worked example, 8:45 PM to 2:30 AM: start is 20 × 60 + 45 = 1245 minutes; end is 2 × 60 + 30 = 150 minutes. Raw difference is 150 − 1245 = −1095, which is negative, so add 1440: −1095 + 1440 = 345 minutes. Convert back: 345 / 60 = 5.75 decimal hours, or 5 hours 45 minutes. Total minutes 345. Every number in the results panel traces back to that one subtraction.
Decimal conversion examples worth knowing cold: 15 minutes = 0.25 h, 30 minutes = 0.50 h, 45 minutes = 0.75 h, 10 minutes ≈ 0.167 h, 7 minutes ≈ 0.117 h. Any other value: divide the minutes by 60. At a wage of 24 per hour, the difference between recording 6.45 and 6.75 hours is 0.30 × 24 = 7.20 per shift — roughly 187 per year on five shifts a week.
Timesheet Use: From Shift to Payroll
A typical week of shifts, checked with this tool one entry at a time:
| Day | Clock in | Clock out | Duration | Decimal |
|---|---|---|---|---|
| Monday | 7:30 AM | 4:00 PM | 8:30 | 8.50 |
| Tuesday | 8:15 AM | 5:45 PM | 9:30 | 9.50 |
| Wednesday | 9:00 AM | 6:20 PM | 9:20 | 9.33 |
| Thursday | 6:45 PM | 1:15 AM | 6:30 | 6.50 |
| Friday | 7:00 AM | 3:00 PM | 8:00 | 8.00 |
Sum the decimal column: 8.50 + 9.50 + 9.33 + 6.50 + 8.00 = 41.83 hours. At 22 per hour that is 920.26 gross. Note the Thursday entry crosses midnight — this is exactly where hand-calculated timesheets break, and where the automatic rollover earns its keep. If unpaid breaks apply, subtract them per shift: 30 minutes off Wednesday turns 9.33 into 8.83 before summing.
Common Use Cases
- Hourly workers checking pay. Verify each shift before submission; the decimal output prevents the 6:45-becomes-6.45 undercount.
- Freelancers logging billable time. A client call 2:05 PM to 3:35 PM is 1.50 hours; at 85 per hour that is 127.50 to invoice.
- Managers building schedules. Compute each shift's duration when drafting rosters to check weekly hour targets and overtime thresholds before posting.
- Nurses and night-shift staff. Overnight spans are the norm, and the rollover rule handles 7:00 PM to 7:00 AM as a clean 12:00 / 12.00 / 720.
- Event and travel timing. Flight 11:40 PM arriving 6:25 AM is 6:45 airborne, including the rollover.
- Study or gym session tracking. Time-stamped sessions convert to decimal hours for any habit-tracking spreadsheet.
Tips and Best Practices
- Always copy the decimal figure into payroll, never the h:mm one. The colon format is for humans; wage math needs decimals.
- Log breaks separately and subtract. If lunch is unpaid, run the full span, then subtract 0.50 rather than timing around the break.
- Round with a stated convention. Many employers round to the nearest quarter hour: 9:20 becomes 9.25, not 9.33. Know your employer's rule before adjusting.
- Check long spans against expectations. A 9:00 AM to 7:00 AM "shift" reading 22 hours is almost certainly a data-entry mistake, and the duration display exposes it instantly.
- Sum in minutes when accuracy matters most. Decimals like 9.33 are rounded displays; summing total-minutes values and converting once at the end avoids compounding rounding.
- Keep the raw clock-in and clock-out times. If a pay dispute arises, the original times — not just the computed total — are what settles it.
Hours Calculator vs. a Time-Tracking App
Dedicated time-tracking apps clock in and out automatically, categorize time, and sync to payroll — the right choice for ongoing, multi-project billing. This calculator is the lighter tool for the moments in between: verifying one shift's math, converting 5:30 to decimal hours without a mistake, checking whether a proposed schedule adds up, or settling a "how long was that flight?" question in five seconds. It runs locally, needs no account, and works when you need a number now rather than a system to maintain. For a single subtraction between two clock times — with the midnight rule handled — it is faster than opening anything else.