Skip to content

Time Duration Calculator: Hours Between Two Times

Find the hours and minutes between two clock times, including shifts past midnight, minus unpaid breaks, with results in hours and minutes, decimal hours and minutes.

3 min read

How long is a shift from 9:00 to 17:30 with a half-hour lunch? How many hours did you sleep from 22:00 to 6:30? Subtracting clock times is awkward because there are 60 minutes in an hour, not 100, and times can cross midnight. Our time duration calculator finds the time between two clock times, takes off an unpaid break and shows the answer three ways. This guide explains the method and how to convert to decimal hours for timesheets.

How to use the calculator

  1. Start time: in 24-hour format, such as 09:00.
  2. End time: such as 17:30.
  3. Unpaid break (minutes): optional.

With the defaults, 09:00 to 17:30 with a 30-minute break:

  • Duration: 8 h 0 min
  • Decimal hours: 8
  • Minutes: 480

Subtracting times by hand

  1. Convert both times to minutes after midnight. 09:00 = 540; 17:30 = 1,050.
  2. Subtract: 1,050 − 540 = 510 minutes.
  3. Take off the break: 510 − 30 = 480 minutes.
  4. Convert back: 480 ÷ 60 = 8 hours.

An alternative is to subtract hours and minutes separately, borrowing 60 minutes when needed. From 08:45 to 16:20: 16:20 becomes 15:80, then 15:80 − 08:45 = 7 h 35 min.

Shifts that cross midnight

If the end time is earlier than the start time, the calculator assumes the period runs past midnight and adds 24 hours.

Example: 22:00 to 06:30. 06:30 is 390 minutes, 22:00 is 1,320 minutes. 390 + 1,440 − 1,320 = 510 minutes, or 8 h 30 min (8.5 decimal hours). This is ideal for night shifts and working out how long you slept. The sleep calculator plans bedtimes around sleep cycles.

Decimal hours

Payroll systems and timesheets usually need hours as a decimal. Divide the minutes by 60:

MinutesDecimal hours
60.1
150.25
200.33
300.5
400.67
450.75

So 7 h 35 min is 7 + 35 ÷ 60 = 7.58 hours. A common mistake is writing 7.35, which undercounts by about 14 minutes.

Pay example: 7.58 hours at $18 per hour = $136.50. The salary calculator converts hourly pay into annual figures.

Converting 12-hour times

The calculator uses the 24-hour clock. To convert:

  • Morning times stay the same: 9:15 am = 09:15.
  • Add 12 to afternoon and evening hours: 5:30 pm = 17:30.
  • 12:00 noon = 12:00; 12:00 midnight = 00:00.
  • 12:45 am = 00:45.

Breaks

Enter only unpaid breaks. Paid rest breaks count as working time and should not be deducted. Rules on minimum breaks vary by country and state, so check local regulations if you manage staff.

Weekly totals

For a whole week, add each day's decimal hours: 8 + 8.5 + 7.75 + 8 + 6.5 = 38.75 hours. The time card calculator does this for a full week with overtime, and the hours calculator handles single-day totals quickly.

Other uses

  • Billing clients by the hour for freelance work.
  • Tracking study or practice time.
  • Measuring journeys: departure to arrival time, which the speed calculator can turn into average speed.
  • Cooking and baking: total time across several stages.

To add or subtract durations, such as several lap times, use the time calculator.

Common timesheet mistakes

The most common error is treating minutes as decimals, so that 7 hours 35 minutes becomes 7.35 hours instead of 7.58. Another is forgetting to deduct an unpaid lunch, or deducting a paid break that should have been counted. Rounding rules also vary: some employers round each clock-in and clock-out to the nearest 5 or 15 minutes, which can add up over a month. Recording exact times and letting the calculator convert them keeps the record fair to both sides, and makes it easy to check a payslip if the total looks wrong. Keep your own simple log of start and end times as a backup.

Frequently asked questions

How do I calculate hours worked past midnight?

Enter the start and end times as normal. If the end time is earlier, the calculator treats it as the next day and adds 24 hours.

How do I convert minutes to decimal hours?

Divide the minutes by 60. 45 minutes is 0.75 hours, so 7 hours 45 minutes is 7.75 hours.

Should I deduct paid breaks?

No. Only deduct unpaid breaks, because paid breaks count as time worked.

Can I use am and pm?

The calculator uses the 24-hour clock. Add 12 to pm hours (except 12 pm) before entering them.

Share

Try it yourself

Run your own numbers with our free tool: Time duration calculator. No sign-up, and it works on any device.

Open the calculator