Date & Time
Hours & Minutes Between Times
Calculate the difference between two times in hours and minutes. Perfect for timesheets, tracking work hours, or measuring durations.
Excel Formula
=TEXT(B2-A2, "h:mm")Step-by-Step Explanation
1
B2 is the end time
2
A2 is the start time
3
B2-A2 gives the time difference as a decimal
4
TEXT formats the result as hours:minutes
5
For overnight shifts, add +1 if B2 < A2
Example
| Start Time (A) | End Time (B) | Duration (C) |
|---|---|---|
| 8:30 AM | 5:15 PM | 8:45 |
| 9:00 AM | 12:30 PM | 3:30 |
| 10:00 PM | 6:00 AM (+1) | 8:00 |
Result: =TEXT(B2-A2,"h:mm") → 8:45
Common Variations
Decimal hours
=(B2-A2)*24Returns 8.75 instead of 8:45
Total minutes
=(B2-A2)*1440Total minutes between times
Overnight shift
=TEXT(IF(B2<A2,B2+1-A2,B2-A2),"h:mm")Handles crossing midnight
Need a Custom Version?
Use our AI generator to create a formula tailored to your specific data and requirements.
Try It with AI →