Calculating meeting duration in decimal hours from start and end times

Hi all — I am building a small reporting script that pulls meeting start and end times and needs the duration in decimal hours (for example 1.75 instead of 1h 45m) to compare against scheduled slots.

The part I keep double-checking is the borrow when minutes go backwards. Example: a meeting runs 10:15 to 11:45. That is 1 hour 30 minutes, so 90 minutes, and 90 / 60 = 1.5 hours. Another one runs 09:30 to 11:15: 11:15 minus 09:30 is 1 hour 45 minutes, so 105 minutes, and 105 / 60 = 1.75 hours. If a meeting crosses midnight, say 23:30 to 00:45 the next day, add 24 hours to the end first: 24:45 minus 23:30 is 1 hour 15 minutes, so 75 minutes = 1.25 hours.

I worked through these with a time duration calculator to sanity-check the arithmetic before putting it in code — entering start and end times gives hours, minutes and total hours directly.

Does anyone else convert Zoom meeting durations this way for reports, or do you keep everything in minutes until the final step? Curious which approach others use to avoid rounding drift.