Hours Calculator — Hours Between Two Times (with Breaks)
Count the hours between any two clock times, even across midnight
An hours calculator answers one of the most common everyday questions in American work and life: how many hours are there between two times? Whether you clocked in at 8:45 AM and out at 5:15 PM, pulled a shift from 10:00 PM to 6:00 AM, or just want to know how long a flight, a class, or a babysitting stretch lasted, the math is the same — and it trips people up constantly because clock time isn't decimal.
The core method is simple. Convert each time to minutes since midnight, subtract the start from the end, and if the end lands before the start, add 24 hours (1,440 minutes) because the shift crossed midnight. Then subtract any unpaid break, and divide by 60 to get hours.
Hours = (end − start, +24h if overnight) − break, ÷ 60.
A worked example: a barista clocks in at 9:00 AM and out at 5:30 PM with a 30-minute lunch. Start = 540 minutes, end = 1,050 minutes, difference = 510 minutes. Subtract the 30-minute break → 480 minutes → 8.0 hours (8 h 0 m). A second example shows why overnight matters: a nurse works 10:00 PM to 6:00 AM. The end (360 minutes) is before the start (1,320 minutes), so you add 1,440 minutes: 360 + 1,440 − 1,320 = 480 minutes = 8.0 hours.
The single biggest source of error is decimal vs. minutes. Eight hours and 30 minutes is 8.5 hours, not 8.3 — minutes are sixtieths, not hundredths. People also forget the overnight rule and get a negative number, or they forget to subtract an unpaid lunch and over-report their day. This calculator handles all three for you: it reads 12-hour AM/PM (the U.S. default) or 24-hour time, automatically rolls a midnight crossing forward, subtracts your break, and returns the answer two ways — decimal hours for payroll and timesheets, and h:mm for a plain-English read.
Use it to total a single shift, double-check what your employer's time clock recorded, figure out how long you slept, time a workout or a fast, or work out the gap between any two moments on the clock. For a full week of shifts with pay, use the time card calculator; to add or subtract a length of time from a starting point, use the time duration calculator. This page is built to do one thing perfectly: the hours between two times.
Calculator
Fill in the fields and click "Calculate" for instant results.
📰 Formula
• Convert each time to minutes since midnight (hour × 60 + minute) • Raw difference = end − start • If raw difference ≤ 0 (overnight), add 1,440 minutes (24 hours) • Worked minutes = difference − break minutes • Decimal hours = worked minutes ÷ 60 • h:mm = floor(minutes ÷ 60) and minutes mod 60
📰 Formula
• Convert each time to minutes since midnight (hour × 60 + minute) • Raw difference = end − start • If raw difference ≤ 0 (overnight), add 1,440 minutes (24 hours) • Worked minutes = difference − break minutes • Decimal hours = worked minutes ÷ 60 • h:mm = floor(minutes ÷ 60) and minutes mod 60
🧪 Worked examples
Example 2
Example 3
Example 4
⚠️ Common mistakes
- Writing 8 hours 30 minutes as 8.3 hours — it's 8.5, because minutes are out of 60, not 100.
- Forgetting the overnight rule and getting a negative result when the end time is before the start.
- Not subtracting an unpaid lunch, which overstates the hours actually worked.
- Mixing up AM and PM — 12:00 PM is noon and 12:00 AM is midnight.
- Rounding each step instead of working in whole minutes and rounding only at the end.
💡 Tips
- For payroll, use the decimal-hours figure (8.5), not the h:mm figure (8:30) — most time systems want decimals.
- If a shift ends at the exact start time the next day, it counts as a full 24 hours.
- Convert minutes to decimals by dividing by 60: 15 min = 0.25, 20 min = 0.33, 45 min = 0.75.
- Enter the break in minutes; leave it at 0 if the time is fully paid.
- Double-check noon and midnight: noon is 12:00 PM, midnight is 12:00 AM.
Embed this calculator on your site
Copy the code below and paste it into the HTML of your site or blog.
<iframe src="https://www.calcnimbus.com/embed/hours-calculator" width="100%" height="500" frameborder="0" style="border:1px solid #eee;border-radius:12px"></iframe>
❓ Frequently asked questions
How do I calculate the hours between two times?
Convert each time to minutes since midnight, subtract the start from the end, add 24 hours if the result is negative (overnight), subtract any break, then divide by 60. From 9:00 AM to 5:00 PM = 8 hours.
How many hours is 9:00 AM to 5:30 PM?
It's 8.5 hours, or 8 hours and 30 minutes. Subtract a 30-minute lunch and you get exactly 8.0 hours of worked time.
How do I calculate hours for an overnight shift?
When the end time is earlier on the clock than the start time, add 24 hours. From 10:00 PM to 6:00 AM is 8 hours: 6:00 AM is treated as the next day.
How do I convert minutes to decimal hours?
Divide the minutes by 60. So 30 minutes = 0.5, 15 minutes = 0.25, 45 minutes = 0.75, and 20 minutes ≈ 0.33 hours.
Why is 8 hours and 30 minutes 8.5 and not 8.3?
Clock minutes are sixtieths of an hour, not hundredths. 30 minutes is half an hour, which is 0.5 — so 8 hours 30 minutes is 8.5 hours.
Should I subtract my lunch break?
Subtract any unpaid break. If your lunch is paid, leave the break at 0 minutes. If you take an unpaid 30- or 60-minute lunch, enter it so the worked-hours total is accurate.
What's the difference between 12:00 AM and 12:00 PM?
12:00 AM is midnight (the start of the day) and 12:00 PM is noon (the middle of the day). It's a common mix-up that throws off hour totals.
How many hours is a 9-to-5 job?
From 9:00 AM to 5:00 PM is 8 hours on the clock. With an unpaid 1-hour lunch it's 7 hours of paid work; with a paid lunch it's the full 8.
Can I use this to total a whole week of shifts?
This calculator handles the hours between two times for a single span. For a full week with daily shifts and pay, use the time card calculator instead.