How to Calculate Hours Between Two Times: Overnight and Work-Shift Examples

Calculating the hours between two times is straightforward when both times fall on the same day, but overnight shifts, breaks, and mixed 12-hour notation can make it confusing. This guide covers each case.

How to calculate time duration

Convert both times to a consistent format, then subtract the start time from the end time. Using the 24-hour clock often makes the arithmetic clearer.

Duration = End time − Start time

Example: times on the same day

From 9:15 AM to 2:45 PM, convert 2:45 PM to 14:45. Subtract 09:15 from 14:45. The duration is 5 hours 30 minutes.

Calculate an overnight duration

When the end time is on the next day, add 24 hours before subtracting. From 10:30 PM (22:30) to 6:15 AM, calculate 30:15 − 22:30. The result is 7 hours 45 minutes.

Use minutes for easier arithmetic

Convert each time to minutes after midnight using hours × 60 + minutes. For 8:20 AM, that is 8 × 60 + 20 = 500 minutes. For 1:50 PM (13:50), it is 13 × 60 + 50 = 830 minutes. The difference is 330 minutes, or 5 hours 30 minutes.

Subtract unpaid breaks

For a work shift, subtract break time from the total elapsed time. An 8:00 AM–4:30 PM shift lasts 8 hours 30 minutes. After a 30-minute unpaid break, paid time is 8 hours.

Paid hours = End time − Start time − Unpaid breaks

Convert minutes to decimal hours

Payroll systems often use decimal hours. Divide minutes by 60: 15 minutes = 0.25 hours, 30 minutes = 0.50 hours, and 45 minutes = 0.75 hours. A duration of 7 hours 45 minutes is therefore 7.75 hours—not 7.45 hours.

12-hour and 24-hour time

In 12-hour notation, 12:00 AM is midnight and 12:00 PM is noon. In 24-hour notation, midnight is 00:00 and noon is 12:00. Use our 24-hour to 12-hour conversion guide when switching formats.

Common mistakes

  • Treating 12:00 AM as noon.
  • Forgetting that an end time earlier than the start may be on the next day.
  • Writing 30 minutes as 0.30 hours instead of 0.50 hours.
  • Forgetting to subtract unpaid breaks.
  • Ignoring date or time-zone changes in longer intervals.

Frequently asked questions

How many hours are between 8:00 AM and 5:00 PM?

The elapsed duration is 9 hours. With a one-hour unpaid break, paid time is 8 hours.

How many hours are between 11:00 PM and 7:00 AM?

The overnight duration is 8 hours.

How do I calculate durations across time zones?

Convert both times to UTC or one shared time zone first. The World Clock can help compare current times.

Related tools