Time Duration Calculator

Start time
End time
Everyday Life Updated 31 Oct 2026

Finds how much time passes between two clock times, such as the length of a work shift, a flight or a night's sleep. Enter the start and end times in 12-hour (AM/PM) or 24-hour format; if the end time is earlier than the start, the period is taken to run past midnight. The result is shown in hours, minutes and seconds and as decimal hours for timesheets. A second mode subtracts two elapsed times, like split times in a race.

  • Clock times ignore daylight-saving changes and are at most 24 hours apart.

Formula

duration = end time − start time (+ 24 h if the end time is earlier, i.e. past midnight)
  • In 12-hour format, 12 AM is midnight (00:00) and 12 PM is noon (12:00); 1–11 PM add 12 hours.
  • Clock times are taken to be within 24 hours of each other: an end time earlier than the start is on the next day. For longer spans use a date calculator.
  • Elapsed mode subtracts two durations (hours can be any size) and needs the end to be at least the start.
  • Decimal hours, minutes and seconds are rounded to 4 decimal places.

A shift from 9:00 AM to 5:30 PM

Inputs
  • Calculate: clock
  • Clock format: 12
  • Hours: 9
  • AM / PM: am
  • Minutes: 0
  • Seconds: 0
  • Hours: 5
  • AM / PM: pm
  • Minutes: 30
  • Seconds: 0

5:30 PM is 17:30. 17:30 − 9:00 = 8 h 30 min, which is 8.5 hours or 510 minutes.

Sources & references

  • Times of Day: 12 a.m. and 12 p.m.
    National Institute of Standards and Technology · Retrieved 31 Oct 2026

    Explains the ambiguity of 12 a.m./12 p.m.; midnight is the start of the day (00:00) in 24-hour time.

Frequently asked questions

How do I calculate the time between two times?
Convert both to 24-hour time and subtract, borrowing 60 minutes from the hours if needed. 8:45 AM to 3:20 PM is 15:20 − 8:45 = 6 h 35 min.
How do I calculate hours that cross midnight?
Add 24 hours to the end time before subtracting. A night shift from 10 PM to 6 AM is (6 + 24) − 22 = 8 hours.
How do I convert minutes to decimal hours for a timesheet?
Divide the minutes by 60. 7 h 45 min is 7 + 45/60 = 7.75 hours; 20 minutes is 0.3333 hours.
Is 12 AM midnight or noon?
12 AM is midnight, the start of the day (00:00), and 12 PM is noon (12:00). To avoid confusion, schedules often write 12:00 midnight or use 24-hour time.

Related calculators

Overtime Pay Calculator Works out what you earn for a pay period that includes overtime. Enter your regular hourly pay, the regular hours you worked, the overtime multiplier (1.5 for time and a half, 2 for double time) and your overtime hours. The calculator shows your overtime hourly rate, your regular earnings, your overtime earnings and your total gross pay, plus how much of the total the overtime contributed. Sleep Cycle Calculator Finds the best times to go to bed or wake up so that you wake at the end of a sleep cycle rather than in the middle of deep sleep, which helps you feel less groggy. Each night is made of roughly 90-minute cycles of light, deep and REM sleep. Enter the time you need to wake up to get bedtimes for 6 down to 1 complete cycles, or the time you are going to bed to get matching wake-up times. You can change how long it takes you to fall asleep and the cycle length. Days Between Dates Calculator Counts the number of days between two dates, with the option to include the end date in the count. Beyond the total, it breaks the period down into years, months and days, into weeks and days, and into hours, and counts how many of the days are weekdays (Monday to Friday) and how many fall on weekends. Use it for deadlines, notice periods, trip lengths, project schedules or counting down to an event. Add Days to Date Calculator Adds or subtracts days, weeks, months and years from a date to find the resulting calendar date and its day of the week. Use it to work out deadlines, due dates, expiry dates, notice periods or the date a given number of days ago. Choose calendar days, or business days to skip Saturdays and Sundays. Months are added on the calendar, so 31 January plus one month is the last day of February.