Time Duration Calculator

Find the elapsed time between two times, or two dates and times, in hours and minutes. It handles shifts that run past midnight, adds up several spans, and can count daylight saving changes.

Start and end

Duration9:00 AM to 5:30 PM

8 h 30 min

h:mm:ss
8:30:00
Decimal hours
8.5
Total minutes
510
Hours and minutes
8 h 30 min

  • Overnight shifts handled
  • Up to 20 spans added together
  • US time zones and daylight saving
  • Nothing you type leaves your browser

How many hours is 9 to 5? Common shift lengths

9:00 AM to 5:00 PM is 8 h 0 min, or 7.5 hours worked with a 30-minute unpaid lunch. The table covers the shifts people look up most often. Open any row to adjust it in the calculator.

ShiftTotal timeDecimal hoursWith a 30-minute unpaid breakCalculator
6:00 AM to 2:00 PM8 h 0 min87.5 hoursOpen
7:00 AM to 3:00 PM8 h 0 min87.5 hoursOpen
7:00 AM to 4:00 PM9 h 0 min98.5 hoursOpen
7:00 AM to 5:00 PM10 h 0 min109.5 hoursOpen
7:00 AM to 7:00 PM12 h 0 min1211.5 hoursOpen
8:00 AM to 2:00 PM6 h 0 min65.5 hoursOpen
8:00 AM to 3:00 PM7 h 0 min76.5 hoursOpen
8:00 AM to 4:00 PM8 h 0 min87.5 hoursOpen
8:00 AM to 5:00 PM9 h 0 min98.5 hoursOpen
8:00 AM to 6:00 PM10 h 0 min109.5 hoursOpen
8:30 AM to 4:30 PM8 h 0 min87.5 hoursOpen
9:00 AM to 2:00 PM5 h 0 min5-Open
9:00 AM to 3:00 PM6 h 0 min65.5 hoursOpen
9:00 AM to 4:00 PM7 h 0 min76.5 hoursOpen
9:00 AM to 5:00 PM8 h 0 min87.5 hoursOpen
9:00 AM to 6:00 PM9 h 0 min98.5 hoursOpen
10:00 AM to 4:00 PM6 h 0 min65.5 hoursOpen
10:00 AM to 5:00 PM7 h 0 min76.5 hoursOpen
10:00 AM to 6:00 PM8 h 0 min87.5 hoursOpen
11:00 AM to 7:00 PM8 h 0 min87.5 hoursOpen
3:00 PM to 11:00 PM8 h 0 min87.5 hoursOpen
7:00 PM to 7:00 AM (next day)12 h 0 min1211.5 hoursOpen
11:00 PM to 7:00 AM (next day)8 h 0 min87.5 hoursOpen

Breaks are only taken out for shifts of 6 hours or more. Overnight shifts end the next day.

Four ways to read the result

The same span shown four ways, using a shift of 8 h 30 min. When you add more than one span, every figure shows the total.

Duration

8 h 30 min

The everyday answer: hours and minutes.

h:mm:ss

8:30:00

The format spreadsheets such as Excel and Google Sheets expect.

Decimal hours

8.5

What most timesheets and payroll systems ask for.

Total minutes

510

Handy for comparing spans or billing by the minute.

How to calculate time duration

  1. Each time is turned into minutes after midnight.
  2. The start is subtracted from the end.
  3. If the end is earlier than the start and no dates are set, 24 hours (1,440 minutes) are added, because the span crossed midnight.
  4. With dates turned on, the whole days between the two dates are counted too.
  5. With a time zone chosen, the real time that passed is measured, so a daylight saving change adds or removes an hour.
  6. Decimal hours are total minutes divided by 60, rounded to two places.

The full rules are on the methodology page.

9:15 AM to 5:45 PM

Start, in minutes after midnight
555
End, in minutes after midnight
1,065
End minus start
510 min
510 ÷ 60
8 h 30 min

10:00 PM to 6:30 AM

390 minus 1,320
-930 min
Negative, so add 1,440
510 min
Result
8 h 30 min

Worked examples

Real times, and the answers the calculator gives for them.

Day shift

Start
8:45 AM
End
5:15 PM
8 h 30 min8.5 decimal hours

Night shift past midnight

Start
10:00 PM
End
6:30 AM next day
8 h 30 min8.5 decimal hours

Weekend trip, with dates

Start
7:40 PM, Friday, October 16, 2026
End
6:15 AM, Sunday, October 18, 2026
1 day 10 h 35 min34 h 35 min

Cases that trip people up

The mistakes that show up most on timesheets and in spreadsheet formulas.

Crossing midnight

A shift from 10:00 PM to 6:30 AM ends the next day. Subtracting by hand gives a negative number, which is why so many spreadsheet formulas go wrong on night shifts.

Subtracting by hand-15 h 30 min
Correct8 h 30 min

12 AM and 12 PM

12:00 AM is midnight at the start of the day and 12:00 PM is noon. So 11:00 AM to 12:00 AM runs through the afternoon and evening.

Reading 12 AM as noon1 h 0 min
Correct13 h 0 min

Minutes are not decimals

7 hours 20 minutes is not 7.20 hours. Writing 7.20 on a timesheet loses 8 minutes of pay for every such day.

Copying the minutes7.20 hours
Correct7.33 hours

Daylight saving

On Sunday, November 1, 2026, clocks in most of the US fall back from 2:00 AM to 1:00 AM. From 12:30 AM to 3:30 AM that night, an extra hour passes. Turn on dates and pick a time zone to get the real figure.

Reading the clock3 h 0 min
Correct4 h 0 min

Unpaid breaks

A 8:00 AM to 5:00 PM day with a 30-minute lunch is not 9 hours worked. Enter the time before and after the break as two spans: 8:00 AM to 12:00 PM and 12:30 PM to 5:00 PM.

Start to finish9 h 0 min
Correct8 h 30 min

Questions about calculating time duration

Can't find your answer? Send me a message.

How many hours is 9 to 5?

9:00 AM to 5:00 PM is 8 h 0 min. With a 30-minute unpaid lunch, the time worked is 7.5 hours.

How do I calculate the time between two times?

Convert both times to minutes after midnight and subtract the start from the end. If the result is negative, add 1,440 minutes (24 hours). Divide by 60 for hours, and the remainder is the minutes.

How do I convert minutes to decimal hours?

Divide the minutes by 60. 45 minutes is 0.75 hours and 20 minutes is 0.33 hours, rounded to two places.

How do I write a time duration?

Write it as hours and minutes, such as 8 h 30 min, or as 8:30 (hours:minutes). Spreadsheets use 8:30:00, timesheets use 8.5 hours, and the ISO 8601 standard used in software writes it as PT8H30M.

Is elapsed time the same as duration?

Yes. Both mean the time that passes between a start and an end, which is what this calculator shows.

Does it handle daylight saving time?

Only when you turn on dates and choose a time zone. Without a time zone it uses clock time, which is what most people mean when they say a shift runs from 9 to 5.

What this calculator does not do

It measures time and nothing else. It does not work out pay, overtime or tax. Seconds are optional: turn on Include seconds when you need them. For time cards with breaks and weekly totals, use the Hours Calculator.

Need a date instead of a length of time? Use the Days From Today Calculator. To total several lengths of time, use the Add and Subtract Time Calculator.

How the results are checked

The calculator shares its date and time code with every tool on the site, and that code passes more than 100 automated tests before each release. The rules it follows are written out on the methodology page.

By Hassaan Rasheed. Published .