Home / Hours between times
Hours Calculator: Hours Between Two Times
Or punch lunch out and back in. If both lunch clocks are filled, they replace the minutes box. This is the Excel-style (out − in) − (lunch end − lunch start) problem.
This hours calculator gives the time between two times. You get hours and minutes, and decimal hours too. A day from 9:00 AM to 5:30 PM is 8 hours 30 minutes, which is 8.5 hours. Add a lunch break and it comes off the total. A shift like 10:00 PM to 6:00 AM counts across midnight as 8 hours. To add up durations you already have, use the hours and minutes calculator. To find the clock time a set number of hours from now, use the add time calculator.
If the end time is earlier, as in 10:00 PM to 6:00 AM, it is read as the next day.
Quick answer: Turn both times into minutes past midnight and take the start away from the end. When the end is earlier, add 24 hours first, since it is on the next day. Take off any unpaid break, then divide by 60 for decimal hours. So 9:00 AM to 5:30 PM is 8 hours 30 minutes, or 8.5 hours.
How to calculate hours between two times
Write both times as minutes after midnight. 9:00 AM is 540 and 5:30 PM is 1,050. The gap is 1,050 minus 540, which is 510 minutes, or 8 hours 30 minutes. If the end comes before the start on the clock, the shift ran past midnight. So add 1,440 minutes (24 hours). Then take off any unpaid break.
The same start and end time gives 0 hours, not 24. To time a full day, enter it as two shorter spans.
Worked example with a lunch break
You clock in at 7:45 AM and leave at 4:20 PM. Lunch runs from 12:10 PM to 12:40 PM.
- Minutes after midnight: 7:45 AM is 7 × 60 + 45 = 465, and 4:20 PM is 16 × 60 + 20 = 980.
- Time on the clock: 980 − 465 = 515 minutes, which is 8:35.
- Lunch: 12:10 PM to 12:40 PM is 30 minutes.
- Paid time: 515 − 30 = 485 minutes, so 8 hours 5 minutes.
- Decimal: 485 ÷ 60 = 8.08 hours.
Result: 8:05 worked, or 8.08 decimal hours.
How many hours from 8 AM to 5 PM, and other common shifts
The table shows time on the clock before any break. From 8 AM to 5 PM is 9 hours, and from 9 AM to 5 PM is 8. Take a 1-hour lunch off either one and you get 8 and 7 paid hours.
| Start | End | Hours:minutes | Decimal hours | Minutes |
|---|---|---|---|---|
| 9:00 AM | 5:00 PM | 8:00 | 8.00 | 480 |
| 8:00 AM | 5:00 PM | 9:00 | 9.00 | 540 |
| 8:00 AM | 4:00 PM | 8:00 | 8.00 | 480 |
| 7:00 AM | 3:00 PM | 8:00 | 8.00 | 480 |
| 7:00 AM | 5:00 PM | 10:00 | 10.00 | 600 |
| 9:00 AM | 5:30 PM | 8:30 | 8.50 | 510 |
| 8:30 AM | 4:45 PM | 8:15 | 8.25 | 495 |
| 7:00 AM | 3:30 PM | 8:30 | 8.50 | 510 |
| 6:00 AM | 2:20 PM | 8:20 | 8.33 | 500 |
| 10:15 AM | 2:45 PM | 4:30 | 4.50 | 270 |
| 11:30 AM | 8:00 PM | 8:30 | 8.50 | 510 |
| 3:00 PM | 11:00 PM | 8:00 | 8.00 | 480 |
| 7:00 AM | 7:00 PM | 12:00 | 12.00 | 720 |
| 7:00 PM | 7:00 AM (next day) | 12:00 | 12.00 | 720 |
| 10:00 PM | 6:00 AM (next day) | 8:00 | 8.00 | 480 |
| 11:00 PM | 7:30 AM (next day) | 8:30 | 8.50 | 510 |
Hours between two times in Excel or Google Sheets
Put the start time in A2 and the end time in B2, formatted as times. Spreadsheets store a time as part of a day, so 12 hours is 0.5. Multiplying by 24 turns it into hours. The same formulas work in Google Sheets.
| What you want | Formula |
|---|---|
| Decimal hours on the same day | =(B2-A2)*24 |
| Shifts that pass midnight | =MOD(B2-A2,1)*24 |
| With lunch out in C2 and back in D2 | =(MOD(B2-A2,1)-(D2-C2))*24 |
| Shown as hours and minutes | =TEXT(MOD(B2-A2,1),"h:mm") |
Mistakes that give the wrong total
Clock times can't be subtracted like ordinary decimals. Taking 7:45 AM from 4:20 PM looks like 16.20 − 7.45 = 8.75. But an hour has 60 minutes, not 100. The real gap is 8:35, which is 8.58 hours.
The reverse slip happens on payroll forms. 8:05 written as 8.05 short-changes the worker. Five minutes is 0.08 of an hour. In the same way, 8:30 is 8.50, not 8.30.
Noon and midnight trip people up too. 12:00 PM is noon and 12:00 AM is midnight. So 12:00 AM to 8:00 AM is 8 hours.
Hours between two times: questions
These are the shift lengths and timesheet problems people ask about most.
How many hours is 9 to 5?
From 9:00 AM to 5:00 PM is 8 hours on the clock. A 30-minute unpaid lunch leaves 7.5 paid hours, and a full hour leaves 7.
How many hours from 8am to 5pm?
8:00 AM to 5:00 PM is 9 hours. Most jobs with that schedule take an hour for lunch, which brings it to an 8-hour paid day.
How many hours from 7am to 3pm?
7:00 AM to 3:00 PM is exactly 8 hours. With a 30-minute unpaid lunch you are paid for 7.5 of them.
How do I count hours across midnight?
For an overnight shift, add 24 hours to the end time when it is earlier than the start. So 10:00 PM to 6:00 AM becomes 6 + 24 − 22 = 8 hours. The calculator does this for you.
How do I use the hours calculator with lunch?
Type the break in minutes, or fill in the lunch out and lunch in times. Take a 7:45 AM to 4:20 PM day with lunch from 12:10 to 12:40. That comes to 8 hours 5 minutes of paid time.
How do I turn the result into decimal hours?
Divide the minutes by 60. A day of 8 hours 5 minutes is 485 minutes, and 485 ÷ 60 is 8.08 hours. The hours to decimal calculator has a full minutes chart.
Can I use 24-hour (military) time?
Yes. Times like 07:45 and 16:20 work in both boxes. They give the same 8 hours 35 minutes as 7:45 AM to 4:20 PM.
Cite this page
APA: ClockTotals. (2026, October 16). Hours Calculator: Hours Between Two Times. https://clocktotals.com/hours-between-times/
MLA: “Hours Calculator: Hours Between Two Times.” ClockTotals, 16 Oct. 2026, clocktotals.com/hours-between-times/.
Link (HTML): <a href="https://clocktotals.com/hours-between-times/">Hours Calculator: Hours Between Two Times</a>