InfiniteCalc

Time Duration Calculator

Find the exact hours and minutes between a start and end time — overnight shifts included.

Formats: 9:00 AM, 09:00, or 21:30

If earlier than the start, the duration crosses midnight

min

Optional — unpaid minutes to subtract

This time duration calculator finds the exact hours and minutes between two clock times — the everyday question behind timesheets, shift planning, parking fees, fasting windows, and travel legs. Enter times in whichever format you think in: "9:00 AM", "09:00", or 24-hour "21:30" all work.

If the end time is earlier than the start time, the calculator assumes the span crosses midnight and counts into the next day, so overnight shifts and red-eye flights come out right. An optional break field subtracts unpaid minutes, and results appear three ways: hours and minutes, decimal hours for payroll, and total minutes.

How Duration Between Two Times Is Calculated

Both times are converted to minutes since midnight: multiply the hour (in 24-hour form) by 60 and add the minutes. The duration is simply the difference:

duration = end minutes − start minutes

So 9:00 AM is minute 540 and 5:30 PM is minute 1,050, giving 510 minutes — 8 hours 30 minutes. When the difference is negative, the end time belongs to the next day, so the calculator adds 1,440 minutes (24 hours): a 10:00 PM to 6:00 AM shift is 1,320 → 360, i.e., −960 + 1,440 = 480 minutes = 8 hours.

Any break minutes are subtracted at the end, and the net figure is also divided by 60 for the decimal-hours value payroll systems expect.

Reading 12-Hour Times Correctly

Most duration mistakes come from AM/PM conversion, not arithmetic. The rules the parser applies:

  • 12:00 AM is midnight (hour 0); 12:59 AM is minute 59 of the new day
  • 12:00 PM is noon (hour 12)
  • 1 PM through 11 PM add 12: 5:30 PM = 17:30
  • Times without AM/PM are read as 24-hour clock: 09:00 is 9 AM, 21:30 is 9:30 PM

Watch the noon/midnight traps: 11:30 PM to 12:15 AM is 45 minutes (crossing midnight), not 12 hours 45 minutes. And a "9 to 5" day entered as 9:00 to 5:00 in 24-hour form would run backward — write 17:00 or 5:00 PM for the afternoon time.

Example: 9:00 AM to 5:30 PM with a Break

Take the default entries: start 9:00 AM, end 5:30 PM. In minutes since midnight that is 540 to 1,050, an elapsed span of 510 minutes, or 8 hours 30 minutes — 8.5 decimal hours.

Add a 30-minute unpaid lunch in the break field and the net duration drops to 480 minutes: exactly 8 hours, or 8.0 decimal hours, the classic full-time workday.

Now try an overnight case: start 9:00 PM (21:00, minute 1,260), end 5:30 AM (minute 330). The raw difference is −930 minutes, so 1,440 is added: 510 minutes again — 8 hours 30 minutes — with a note confirming the span crossed midnight.

Frequently Asked Questions

How do I calculate hours between two times?

Convert both times to minutes since midnight (24-hour hour × 60 + minutes), subtract the start from the end, then divide by 60. For 8:15 AM to 4:45 PM: 1,005 − 495 = 510 minutes = 8.5 hours. If the result is negative, add 1,440 minutes because the span crosses midnight.

How does the calculator handle overnight shifts?

If the end time is earlier than the start time, it assumes the end falls on the next day and adds 24 hours. So 11:00 PM to 7:00 AM returns 8 hours. This means a span of more than 24 hours between two clock times cannot be expressed — use a date calculator for multi-day spans.

How many hours is 9 AM to 5 PM?

Eight hours exactly. With the typical unpaid 30-minute lunch, paid time is 7.5 hours; with a full hour lunch it is 7 hours. That is why many "9 to 5" jobs actually schedule 9:00 to 5:30 — the extra half hour restores a full 8 paid hours.

What time formats can I type in?

Any of these work: "9:00 AM", "9 am", "9AM", "09:00", "21:30", or just "9" (read as 9:00 in 24-hour time). Seconds like "9:00:30 PM" are accepted and ignored. Times without AM/PM are treated as 24-hour clock, so use 17:30 — not 5:30 — for half past five in the afternoon.

What is duration in decimal hours and why does payroll use it?

Decimal hours express minutes as a fraction of an hour: 7 hours 45 minutes is 7.75. Payroll and billing systems multiply hours by a rate, which only works with decimals — multiplying a wage by "7.45" instead of 7.75 shortchanges 18 minutes. This calculator always shows the correct decimal conversion.

Related Calculators