Calculating the difference between two times in Excel can be tricky. Times are handled internally as numbers between 0 and 1.
Have a look at the image to see how you can use different methods to display the times. The formulas for the corresponding cells are highlighted in Yellow.
The last formula, you can convert into a decimal value:
Just change the value in the “HOURS” block to General and leave the time values as is. This will display 04.5 hours and not 04:30