🕒

Hours Calculator

✓ Free & no signup 🔒 Runs 100% in your browser Updated 2026-11-25 Online Calculators

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:

StartEndInterpretationDuration
8:45 PM2:30 AMCrosses midnight5:30 (5.5 h)
10:15 PM6:00 AMCrosses midnight7:45 (7.75 h)
11:30 PM12:15 AMCrosses midnight0:45 (0.75 h)
7:00 AM3:30 PMSame day8: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)

  1. Set the start time using the time input — most browsers offer a picker with hour and minute fields, or type directly.
  2. Set the end time. If it is earlier than the start, the overnight rule applies automatically.
  3. 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?
  4. Copy the decimal hours into your timesheet or payroll entry. This is the number wage calculations need.
  5. Use total minutes when billing in minute increments or summing across multiple intervals.
  6. 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 + minutes
  • end minutes = hours × 60 + minutes
  • duration = 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:

DayClock inClock outDurationDecimal
Monday7:30 AM4:00 PM8:308.50
Tuesday8:15 AM5:45 PM9:309.50
Wednesday9:00 AM6:20 PM9:209.33
Thursday6:45 PM1:15 AM6:306.50
Friday7:00 AM3:00 PM8:008.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.

Frequently Asked Questions

How do I calculate hours between two times?
Convert each time to minutes since midnight and subtract the start from the end. From 9:20 AM to 4:05 PM: start is 560 minutes, end is 965 minutes, difference is 405 minutes = 6 hours 45 minutes = 6.75 decimal hours. Divide minutes by 60 to get decimals. This calculator performs the conversion and shows all three formats at once, updating live as you change either time, so there is no mental arithmetic involved.
How do I calculate hours for a shift that crosses midnight?
Subtract as normal, and when the result comes out negative, add 24 hours. From 8:45 PM (1245 minutes after midnight) to 2:30 AM (150 minutes): 150 − 1245 = −1095, plus 1440 minutes = 345 minutes, which is 5 hours 45 minutes. The intuitive shortcut works too: hours from start to midnight plus hours from midnight to end. This tool detects the negative result and applies the rollover automatically whenever the end time is earlier than the start time.
What is 6 hours 45 minutes in decimal hours?
6.75. Divide the minutes by 60: 45 / 60 = 0.75, so 6:45 becomes 6.75 hours. The common error is writing 6.45 by simply replacing the colon with a decimal point — but .45 of an hour is 27 minutes, not 45. At a 24-per-hour wage, that mistake costs 7.20 per shift. Useful anchors: 15 minutes is 0.25, 30 minutes is 0.50, 45 minutes is 0.75, and anything else divides by 60. The decimal output on this page does the division for you.
Why does my timesheet say 8.5 hours when I worked 8:30?
Both are the same duration in different formats. 8 hours 30 minutes converts to decimal as 30 / 60 = 0.5, giving 8.50 hours. Payroll systems use decimal hours because wages are computed by multiplying hours by an hourly rate — 8.50 × 22 = 187.00 — and multiplying '8:30' as a number would be meaningless. The colon format is for reading; the decimal format is for math. This calculator shows both formats so you can copy the right one into the right system.
Does the calculator handle overnight shifts automatically?
Yes. When the end time is earlier than the start time, the tool assumes the span crossed midnight and rolls the end time forward to the next day before subtracting. Examples: 10:15 PM to 6:00 AM yields 7 hours 45 minutes; 11:30 PM to 12:15 AM yields 45 minutes. The limit is single-midnight crossings — a span longer than 24 hours or crossing two midnights needs date-aware handling, so a result that looks implausibly long is a signal to check which times you entered.
How do I calculate my weekly hours from individual shifts?
Convert each shift to decimal hours, add them up, then multiply by your hourly rate. A week of 8.50 + 9.50 + 9.33 + 6.50 + 8.00 totals 41.83 hours; at 22 per hour that is 920.26 gross. Subtract unpaid breaks per shift before summing. For the most accuracy, sum the shifts in total minutes and convert once at the end, since each decimal display is rounded. This calculator gives you per-shift decimals and minutes, and the overnight rollover handles any night shifts in the mix.

Related Tools