Everyone learns to subtract numbers. Almost nobody is taught to subtract clock times, and clock times are not ordinary numbers. The minutes column only goes up to 59 before it rolls over, the hours restart at 12, and half the day hides behind the letters AM and PM. That is why a span like 9:45 AM to 3:10 PM defeats people who are perfectly good at arithmetic: the method they reach for was built for tens, and time is built in sixties and twelves.
The fix is to stop fighting the clock face. Convert both times into a single unit, minutes since midnight, do one plain subtraction, then convert the answer back. It feels like an extra step the first time you do it. By the third time, it is faster than the borrowing method, and unlike the borrowing method it never produces a negative answer or a quiet one-hour error.
The one method that always works
- Convert the start time to minutes since midnight, using the 24-hour clock. Hours times 60, plus the minutes. 9:15 AM is 9 x 60 + 15 = 555 minutes.
- Convert the end time the same way. Remember that PM times (except 12 PM) add 12 hours first, so 2:45 PM is 14:45, which is 885 minutes.
- If the end time is earlier than the start time, the span crosses midnight. Add 1,440 minutes (one full day) to the end time.
- Subtract the start from the end. The answer is the length of the span in minutes.
- Divide by 60. The whole number is the hours, and the remainder is the minutes.
Five steps, no exceptions, no special cases. Every example below, including the overnight shift, is these same five steps wearing different clothes.
Example 1: a straightforward daytime span
How long is it from 9:15 AM to 2:45 PM? Convert the start: 9:15 AM is 555 minutes since midnight. Convert the end: 2:45 PM is 14:45 on the 24-hour clock, which is 14 x 60 + 45 = 885 minutes. Subtract: 885 - 555 = 330 minutes. Convert back: 330 divided by 60 is 5 with 30 left over, so the span is 5 hours 30 minutes. In decimal form, the version payroll and invoices want, it is 5.5 hours. If you sanity-check it on your fingers, 9:15 to 2:15 is five hours, plus the extra half hour to 2:45, and you land in the same place. The method and common sense agree.
Example 2: when the minutes need borrowing
Now the case that breaks the naive method: 9:45 AM to 3:10 PM. Try to subtract column by column and you hit a wall immediately, because 10 minutes minus 45 minutes will not go. The old school fix is to borrow an hour from the end time, turning 3:10 PM into 2:70 PM, after which 2:70 minus 9:45 gives 5 hours 25 minutes. It works, but borrowing is exactly where slips happen, especially with AM and PM in the mix.
The minutes method does not borrow at all. The start, 9:45 AM, is 585 minutes. The end, 3:10 PM, is 15:10, which is 910 minutes. 910 - 585 = 325 minutes, and 325 is 5 hours 25 minutes. Same answer, no borrowing, nothing to slip on. This is the real reason to learn the conversion method: not because borrowing is wrong, but because it fails silently. A borrowed hour forgotten halfway through still produces a plausible-looking answer, just one that is an hour short.
Example 3: an overnight shift that crosses midnight
Night shifts are where most people give up and guess. Take 10:30 PM to 6:15 AM. Convert the start: 22:30 is 1,350 minutes. Convert the end: 6:15 AM is 375 minutes. The end is smaller than the start, which is the signal that the span crosses midnight, so step 3 applies: add 1,440 to the end, giving 1,815. Now subtract: 1,815 - 1,350 = 465 minutes, which is 7 hours 45 minutes. Check it in two pieces if you like: 10:30 PM to midnight is an hour and a half, midnight to 6:15 AM is six hours and a quarter, and 1:30 plus 6:15 is 7:45. The formula and the finger count match again. Any span under 24 hours works this way, including the brutal 7 PM to 7 AM twelve-hour shift, which comes out at exactly 720 minutes.
Quick reference: common spans already worked out
| Start | End | Time between | Decimal |
|---|---|---|---|
| 8:00 AM | 4:30 PM | 8 hours 30 minutes | 8.50 |
| 7:45 AM | 3:15 PM | 7 hours 30 minutes | 7.50 |
| 1:20 PM | 6:05 PM | 4 hours 45 minutes | 4.75 |
| 11:00 PM | 7:00 AM | 8 hours | 8.00 |
Keep this table nearby if you fill in time cards by hand. Most workplace spans are variations on these four shapes: the standard day, the early shift, the afternoon block, and the overnight.
Getting a decimal answer for timesheets and invoices
Plenty of jobs need the answer as a single decimal number rather than hours and minutes: payroll systems, freelance invoices, billable-hour logs. The conversion is the last half of step 5. Take the leftover minutes and divide by 60. For the borrowing example above, 25 minutes divided by 60 is 0.42 (rounded), so 5 hours 25 minutes is 5.42 hours. Round to two decimal places and you match what most payroll software does. If you convert times all day, it is worth reading our full guide on converting hours and minutes to decimal hours, which includes the complete minute-by-minute chart so you never have to divide by 60 again.
Taking a break out of the answer
One last adjustment. If the span you calculated includes an unpaid break, the span is not yet your paid time. Subtract the break once, at the end: an 8 hour 30 minute span with a 30-minute lunch inside it is 8 hours of paid time. Doing the subtraction at the end, rather than trying to split the day into pieces, keeps the arithmetic in one place and makes errors easy to spot. Our guide to calculating work time with a lunch break walks through a full week of mixed shifts and lunch lengths if you want to see that in action.
Try it the fast way
When the times are in front of you and the coffee has not kicked in yet, the hours calculator on this site does all five steps instantly: enter a start and an end, take off a break if there is one, and get the answer in hours and minutes plus decimal hours, with overnight shifts handled automatically. And when your question is not about clock times at all but about adding lengths of time together, the time calculator on the homepage is the right tool for that job.
Frequently asked questions
How do I calculate the hours between two times in Excel or Google Sheets?
Put the start time in one cell and the end time in another, then subtract the start from the end. Format the result cell as [h]:mm to see hours and minutes, or multiply the subtraction by 24 to get decimal hours, for example =(B1-A1)*24. If the shift crosses midnight, use =MOD(B1-A1,1)*24 instead, which handles the wrap past midnight automatically.
Why did my calculation come out negative?
A negative answer almost always means the end time is earlier in the day than the start time, which is exactly what happens with overnight shifts. Add 24 hours to the end time before subtracting and the answer comes out right. A 10:30 PM to 6:15 AM shift is 7 hours 45 minutes once you add the day.
How do I convert 5 hours 45 minutes into decimal hours?
Divide the minutes by 60 and add the result to the hours. 45 divided by 60 is 0.75, so 5 hours 45 minutes is 5.75 hours. The method works in reverse too: multiply the decimal part by 60 to get minutes back, so 0.75 of an hour is 45 minutes.
Should I subtract my lunch break before or after working out the hours?
Either order gives the same paid time, but subtracting at the end is simpler and less error-prone. Work out the full span first, then take the unpaid break off once. If you punch out and back in for lunch, the two worked spans can also be added together, which is the method time card systems use.
