Get the number of hours between a start time and an end time.
Copy this formula
=(B2-A2)*24Excel stores time as a fraction of a day, so subtracting times gives a fraction; multiplying by 24 converts it to hours. Format the result as a Number, not Time.
=("17:30"-"09:00")*24→8.58.5 hours worked.
In minutes
=(B2-A2)*14401440 minutes in a day.
Add 1 when the end is past midnight: =MOD(B2-A2, 1)*24.
Need a formula for your own data?
Describe what you want in plain language and let ExcelGPT write, explain, and verify the formula — free to start, no plugin.