Hours Between Times: How to Calculate
In this article
The number of hours between two times is simply the difference between the later time and the earlier time, expressed in hours (and minutes). To find it, subtract the start time from the end time; if the end time is on the next day, add 24 hours to the end time before subtracting.
Why Time Difference Matters
Calculating the hours between times is a daily necessity for many people. You might need to know how long a shift lasts, how many hours you slept, how long a meeting or class runs, or how much time you have before a deadline. It's also essential for calculating billable hours, tracking project durations, or figuring out travel time. While the math is simple, mistakes often happen when times cross midnight or when AM/PM is misinterpreted.
The Basic Calculation
For times on the same day, the calculation is straightforward. Convert both times to a 24-hour format (military time) to avoid AM/PM confusion, then subtract the start time from the end time.
- Example: 9:00 AM to 5:00 PM → 09:00 to 17:00 → 17 - 9 = 8 hours.
- Example: 10:30 AM to 2:15 PM → 10:30 to 14:15 → 14:15 - 10:30 = 3 hours 45 minutes.
When the end time is earlier than the start time, it means the period crosses midnight. In that case, add 24 to the end time (in hours) before subtracting.
- Example: 10:00 PM to 6:00 AM → 22:00 to 06:00 (next day) → (6 + 24) - 22 = 8 hours.
- Example: 11:30 PM to 1:15 AM → 23:30 to 01:15 (next day) → (1.25 + 24) - 23.5 = 1.75 hours (1 hour 45 minutes).
Dealing with Minutes and Seconds
When minutes are involved, convert everything to a single unit (like minutes or decimal hours) to make the subtraction easier. For example, 3 hours 45 minutes is 3.75 hours or 225 minutes. To subtract 10:30 from 14:15, convert to minutes: 14:15 = 14×60 + 15 = 855 minutes; 10:30 = 10×60 + 30 = 630 minutes; difference = 225 minutes = 3 hours 45 minutes. For seconds, include them the same way: 60 seconds per minute.
Using a Calculator or Spreadsheet
You can use a dedicated time duration calculator, a spreadsheet formula, or even a simple digital tool. In Excel or Google Sheets, if you enter start time in A1 and end time in B1, the formula =B1-A1 will give you the difference as a fraction of a day. Multiply by 24 to get hours. For example, if the result is 0.333, that's 8 hours. If the end time is on the next day, use =MOD(B1-A1,1) to handle the wrap-around correctly.
Common Mistakes and Misconceptions
One frequent error is forgetting to account for AM/PM. 9:00 to 5:00 is often mistakenly calculated as 4 hours, but it's actually 8 hours (5 PM is 17:00). Another mistake is ignoring the day rollover when the end time is earlier than the start time. Also, when converting minutes to decimal hours, remember that 30 minutes is 0.5 hours, not 0.3. Always double-check whether the times are in the same day or span midnight.
Time Zones and Daylight Saving
If the two times are in different time zones, you must first convert them to the same time zone before subtracting. For example, 9:00 AM EST to 3:00 PM PST is not 6 hours; it's actually 9 hours (since 3 PM PST is 6 PM EST). Daylight saving time changes can also add or subtract an hour if the period includes a transition. Always verify the time zone and DST status for both times.
Practical Examples
Here are a few real-world scenarios:
- Work shift: 8:45 AM to 5:30 PM → 8.75 hours (or 8 hours 45 minutes).
- Sleep duration: 11:00 PM to 7:00 AM → 8 hours.
- Travel time: Depart 1:20 PM, arrive 4:05 PM → 2 hours 45 minutes.
- Event setup: 6:00 AM to 2:30 PM → 8.5 hours.
Frequently Asked Questions
How do I calculate hours between two times that cross midnight?
Add 24 hours to the end time before subtracting. For example, from 10 PM to 2 AM, treat it as 22:00 to 26:00 (2+24), giving 4 hours.
What if the start time is later than the end time?
That indicates the period spans into the next day. Always add 24 hours to the end time in that case, unless you're specifically measuring within the same day (which would be negative, so you'd need to clarify).
How do I convert minutes to decimal hours?
Divide the minutes by 60. For example, 45 minutes = 0.75 hours. So 3 hours 45 minutes = 3.75 hours.
Is there a difference between elapsed time and time of day?
Yes. Elapsed time is a duration (e.g., 2 hours), while time of day is a point on the clock (e.g., 2:00 PM). The calculation above finds elapsed time between two clock times.
Can I use this method for dates as well?
For dates, you'd need to include the day count. If the start and end are on different dates, multiply the number of days by 24 and add the hours from the time difference. For example, from Monday 10 PM to Tuesday 6 AM is 1 day (24 hours) minus 16 hours, or simply (6+24)-22 = 8 hours.