Hints and tips home » Excel hints and tips » Calculate difference between two times
Calculate difference between two times
For presenting the result in the standard time format (hours : minutes : seconds . Use the subtraction operator (-) to find the difference between times, and the TEXT function to format the returned value to text in a specific number format.
Hours never exceed 24, minutes never exceed 60, and seconds never exceed 60.
=TEXT(B2-A2,"h")
Hours between two times (4)
=TEXT(B2-A2,"h:mm")
Hours and minutes between two times (4:55)
=TEXT(B2-A2,"h:mm:ss")
Hours and seconds between two times (4:55:00)
Where B2 and A2 must hold the end time and start time respectively formatted as a time format
Added by Orok on 26th October 2006
More Excel hints and tips, like:
