If the minute value of the ending time is smaller than the minute value of the starting time, you'll need to "borrow" an hour from the hour value of the ending time. If the ending hour is a smaller value than the starting hour, the value of the difference will be a negative number. In this case, you should add 24 hours to the result.
So, in our example, since subtracting minutes from the ending time yielded a negative number (-15), we should add 60 to the minutes, then adjust the hours. So, instead of -15, we’ll have 45, and instead of 500, we’ll have 400.
First, add the minutes to the hours. From there, you can convert the format from military time to standard hours and minutes or to decimal format. In our example, the result is 445, which is 4 hours and 45 minutes, or 4.75 hours.