Time between a start and end time, minus a break.
Whether it is a work shift, a rental or a flight layover, the useful number is the duration between two clock times. This calculator handles the two fiddly parts for you: crossing midnight, and subtracting a break such as lunch.
Both times are converted to minutes since midnight; if the end is earlier than the start, a full day is added to the end. The break is then subtracted. The decimal-hours result is the form payroll systems want — 7.5 hours rather than 7 hours 30 minutes.
For timesheets, keep in mind many employers round to the nearest quarter hour and have their own rules for unpaid breaks. Keep your own record of actual hours — it is the reference that settles any dispute.