Add to Chrome Add to Edge

Time Duration Calculator

Calculate the hours between two times or two dates, minus breaks, in hours and minutes and in decimal hours.

Time Duration Calculator

Time Duration Calculator

How many hours are there between two times? Enter a start and end time (overnight shifts work too) or two full dates and times, subtract any unpaid break, and get the hours between the two times in hours and minutes, in decimal hours for timesheets and payroll, and in total minutes and seconds. It works for shifts, meetings, journeys and anything else you time.

How to use Time Duration Calculator

  1. Choose between two times of day or two dates and times.
  2. Enter the start and the end.
  3. Enter any unpaid break in minutes.
  4. Read the duration, including decimal hours (7 h 30 min = 7.5 h).

Worked examples

  • A day shift: 09:00 to 17:30 is 8 hours, 30 minutes, or 8.5 decimal hours (510 minutes). With a 45-minute unpaid lunch it is 7 hours, 45 minutes, or 7.75 hours.
  • A night shift: 22:00 to 06:30 crosses midnight, so the end is counted as the next day: 8 hours, 30 minutes. Take off a 30-minute break and it is exactly 8 hours.
  • Across several days: in the dates mode, 1 March 08:00 to 3 March 14:15 is 2 days, 6 hours, 15 minutes, or 54.25 decimal hours.

How to calculate the hours between two times by hand

  1. Write both times in 24-hour format: 5:30 pm is 17:30.
  2. Subtract the start from the end: 17:30 − 09:00 = 8:30. If the minutes come out negative, borrow 60 minutes from the hours.
  3. If the end is earlier than the start, the period crosses midnight: add 24 hours to the end first (06:30 becomes 30:30, and 30:30 − 22:00 = 8:30).
  4. Subtract any break, then divide the minutes by 60 for decimal hours: 8 h 30 min = 8.5 h.

In a spreadsheet, with the start time in A1 and the end time in B1, =(B1-A1)*24 gives decimal hours, and =MOD(B1-A1,1)*24 also handles shifts that pass midnight.

Common mistakes

  • Writing 8.30 for 8 hours 30 minutes. In decimal hours half an hour is 0.5, so 8 h 30 min is 8.5, not 8.30. Payroll systems usually want the decimal figure.
  • Mixing up am and pm. 12:00 am is midnight and 12:00 pm is noon.
  • Forgetting the clock change. On the night daylight saving time starts or ends, a shift really is an hour shorter or longer. The times-of-day mode ignores the change; the dates mode uses your device's time zone, so it includes it.

To turn the answer into seconds, minutes or days, use the Time Converter. To count days rather than hours, use the Days Between Dates Calculator.

When it comes in handy

  • Filling in timesheets and working out pay.
  • Measuring how long a task, trip or event took.
  • Counting hours across midnight.

Frequently asked questions

What if the end time is earlier than the start?
In the times-of-day mode the calculator assumes the shift ran past midnight and adds a day.
How do I turn minutes into decimal hours?
Divide the minutes by 60: 45 minutes is 0.75 hours, so 8 h 45 min is 8.75 hours.
How many hours are there between 9 am and 5 pm?
8 hours. Take off a 30-minute lunch and it is 7.5 hours.
Can it add up a whole week of shifts?
It works out one period at a time. Run each day, note the decimal hours and add them up; decimal hours make the total easy.

Related guides

More on the Calculators board

16 tools, each doing one job. Pick the next one.

Other boards

Choose which cookies SEOpeck may use. You can change this at any time from "Cookie settings" at the bottom of every page.

Your tools

    Saved in this browser only. Nothing is sent to us.

    Popular tools