Hours calculator

Start and end time in, hours and minutes out – including shifts that cross midnight. Below it, paste a list of durations to add them up.

Time between two times

How to calculate hours between two times

duration = end time − start time
if the end is earlier than the start, add 24 hours (overnight)
10:00 PM → 6:30 AM = 6:30 − 22:00 + 24:00 = 8:30
  1. Convert both times to 24-hour format (5:30 PM = 17:30).
  2. Subtract the minutes; if negative, borrow 60 from the hours.
  3. Subtract the hours; if negative, add 24.
  4. Subtract any unpaid break.

9:15 AM to 5:40 PM: 17:40 − 9:15 = 8:25 = 8.42 hours. With a 30-minute lunch: 7:55 = 7.92 hours.

For a whole week of shifts use the employee hours calculator; for conversions, the decimal hours calculator.