Time Duration

Calculate the elapsed time between two points in time. Find the exact duration in hours, minutes, and seconds for work hours, travel time, sleep tracking, and more. Free tool.

Enter start time in HH:MM:SS format

Enter end time in HH:MM:SS format (midnight crossing handled automatically)

How to Use

  1. Enter the start time

    Input the starting time in hours and minutes.

  2. Enter the end time

    Input the ending time in hours and minutes.

  3. View the result

    Click Calculate to see the elapsed time displayed in multiple units.

What is elapsed time?

Elapsed time is the amount of time that passes between a start time and an end time. Unlike a 'point in time' shown on a clock, it expresses the difference between two times as a 'duration' measured in hours, minutes, and seconds.

Why calculate it separately

Time is rounded in base 60 (60 seconds = 1 minute, 60 minutes = 1 hour), so simply subtracting 09:00 from 17:30 can be confusing. This is especially tricky for shifts that cross midnight, such as a night shift starting at 22:00 and ending at 06:00, where a plain subtraction gives a negative number.

Common uses

  • Work & payroll — calculating daily working hours from clock-in and clock-out times
  • Night & shift work — late-night tasks, hospital on-call, and other shifts crossing midnight
  • Travel & activity — departure-to-arrival time, exercise duration, and sleep length

Calculation formula

Convert each time into 'total seconds' from midnight, then take the difference.

elapsed seconds = (total seconds of end time) − (total seconds of start time)

If the result is negative, midnight was crossed, so add one day (86,400 seconds): elapsed seconds + 86400. The conversions used are 1 hour = 3,600 seconds, 1 minute = 60 seconds.

Example — 09:00:00 → 17:30:00: end 63,000 s − start 32,400 s = 30,600 s → 30600 ÷ 3600 = 8 hours, remainder 1,800 ÷ 60 = 30 minutes, 0 seconds → 8 h 30 m. Crossing midnight — 22:00 → 06:00: 21,600 − 79,200 = −57,600 → +86,400 = 28,800 seconds (8 hours).

Frequently Asked Questions

How do I calculate elapsed time?
Subtract the start time from the end time. For example, starting at 09:00:00 and ending at 17:30:00 gives an elapsed time of 8 hours, 30 minutes, and 0 seconds (30,600 seconds total). To break it into hours, minutes, and seconds, divide the total seconds by 3,600 for the hours, divide the remainder by 60 for the minutes, and the final remainder is the seconds.
How is crossing midnight handled?
If the end time is earlier than the start time, it is treated as having passed midnight (00:00:00) and 24 hours (86,400 seconds) are automatically added. For example, starting at 22:00:00 and ending at 06:00:00 correctly yields 8 hours. This is handy for figuring out night-shift or late-night working hours.
Can I see the result in minutes or seconds?
Yes. The result is shown in hours:minutes:seconds format together with the total number of seconds (totalSeconds). If you need total minutes, divide the total seconds by 60. For example, 30,600 seconds equals 510 minutes.
How do I convert time units?
1 hour = 60 minutes = 3,600 seconds, and 1 day = 24 hours = 1,440 minutes = 86,400 seconds. This calculator breaks the elapsed time into hours, minutes, and seconds and also provides the total in seconds, so multiplying or dividing by these conversion factors lets you convert freely to any unit you want.
Is it precise down to the second?
Yes. Input is accepted in HH:MM:SS format and is reflected down to the second. If you omit the seconds and enter only HH:MM, the seconds are treated as 0. Internally every time is converted to total seconds before calculating, so there is no error at the minute or second boundary.
Can it calculate long durations over 24 hours?
This calculator covers two times within a single day, or a span that crosses midnight once. The result is therefore at most just under 24 hours. If you need a span over several days, use a date difference calculator; for a simple total, calculate each segment and add them up.
Can I use it directly for working hours?
Entering clock-in and clock-out times gives the total working time right away, but breaks such as lunch are not deducted automatically. To find actual working hours, subtract the break time from the total elapsed time separately. Example: from 09:00–18:00 (9 hours), subtracting a 1-hour lunch leaves 8 hours.
Can I add up multiple durations?
The current version calculates the elapsed time for a single pair of times. If you need to sum several spans, calculate each one separately, add the total seconds together, then divide the sum by 3,600 to convert it back into hours, minutes, and seconds.
2026 calendar data

Related Calculators