Time Difference in Excel: hours and minutes between two times
Times are numbers in Excel, so the difference is just subtraction.
The formula
=B2-A2
Start 09:15, end 17:45 → 8:30. If you see 0.354 instead, format the cell: Ctrl+1 › Custom › h:mm.
As decimal hours
=(B2-A2)*24
→ 8.5. Format as Number. See time to decimal.
In minutes
=(B2-A2)*1440
→ 510 minutes.
Shift that crosses midnight
22:00 to 06:00 gives a negative time (shown as ####). Use:
=MOD(B2-A2,1)
→ 8:00. MOD adds a day when the end is earlier than the start. See MOD.
Differences longer than 24 hours
If the cells hold date and time (29-09-2026 22:00 → 01-10-2026 06:00), plain subtraction works. Format as [h]:mm — the square brackets let hours go past 24 (32:00 instead of 8:00).
Subtract a break
Break time in C2 (e.g. 0:30):
=B2-A2-C2
Full timesheet with overtime: hours worked.
#VALUE! or ####
- #VALUE! — a time is stored as text. Use
=TIMEVALUE(B2)-TIMEVALUE(A2). - #### — the result is negative or the column is too narrow. Use MOD, or widen the column.
Adding time instead: add hours to a time