Format Code Now
/

Time Duration Calculator

CU-91

Enter a start time and an end time to see the time between them in hours, minutes, seconds and decimal hours. Add dates to measure a span of a day or more.

Runs in your browser. Nothing is uploaded.

Start and end

Duration

Duration8 hours, 30 minutes, 0 seconds
As h:mm:ss8:30:00
Decimal hours8.5
Decimal hours, 2 places8.50
Total minutes510
Total seconds30,600
Start09:15 (9:15 AM)
End17:45 (5:45 PM)

How to use it

  1. Type the start time and the end time, in 12-hour or 24-hour form.
  2. Leave the dates empty for a same-day or overnight span, or fill in both dates for a longer one.
  3. Read the duration as hours, minutes and seconds, as h:mm:ss, and as decimal hours.

Overnight spans and equal times

With no dates, the tool assumes the end is less than a day after the start. If the end time is earlier than the start time, it takes the end as the next day, so 10:00 PM to 6:00 AM is 8 hours, and the result says that it crossed midnight. If the two times are the same, the answer is zero, not 24 hours. When you really mean a full day or more, enter both dates so the tool does not have to guess.

Using dates

Fill in the start date and the end date to measure across days. The dates decide the order, so an end before the start is an error, not an overnight span. The total in hours can pass 24, and a days breakdown sits underneath: 54 hours 30 minutes is 2 days, 6 hours, 30 minutes. Days are plain 24-hour days. The tool has no time zones, so a day when the clocks change still counts as 24 hours.

Decimal hours

Decimal hours divide the total seconds by 3,600. A span of 8 hours 30 minutes is 8.5, and 1 hour 20 minutes is 1.3333, shown to four places. A second row rounds to two places, the form many timesheets ask for, so 1 hour 20 minutes becomes 1.33. Breaks, pay rates and several shifts in one total are not part of this tool.

Error messages and what to do

MessageWhat it meansFix
Enter both the start date and the end date, or leave both empty.Only one of the two date boxes is filled in.Fill in the other date, or clear the one you filled in.
The end is before the start. Check the dates and times.Dates were given and the end falls before the start.Swap the dates, or correct the times.

Questions people ask

How do I calculate the time between two times?

Enter the start and end times. The tool subtracts them and shows hours, minutes and seconds. If the end is earlier than the start and no dates are given, it treats the end as the next day, so 11:00 PM to 7:00 AM is 8 hours.

How do I turn the hours and minutes into decimals?

Divide the minutes by 60 and add them to the hours. 9:15 AM to 5:45 PM is 8 hours 30 minutes, which is 8.5 hours. The tool shows this and also a figure rounded to two decimal places.

What if the time crosses midnight?

Leave the dates empty and the tool adds a day when the end time is earlier than the start time. Or fill in both dates and the dates decide. Either way the result is the real elapsed time, and the page tells you which method it used.

Can I use 24-hour time?

Yes. Times such as 14:30, 1430 and 14:30:15 work, and so do 12-hour times such as 2:30 PM. You can mix the two forms between start and end. A value of 2400 is accepted as the end of the day.

Does it handle daylight saving or time zones?

No. It works on clock readings only, so a day with a clock change counts as 24 hours. If your span crosses a clock change, allow for the one hour difference yourself, or measure it in UTC.

How do I measure a span of several days?

Fill in the start date and end date as well as the times. The result shows the hours, which can be well above 24, and a days breakdown. 9:00 AM on November 23 to 3:30 PM on November 25 is 54 hours 30 minutes.

About this tool

Finds the time from one start to one end. Times can be 12-hour with AM or PM, or 24-hour, with or without seconds (9:15 AM, 09:15, 0915 and 09:15:30 all work). If you leave both dates empty and the end time is earlier than the start time, the tool assumes the end is on the next day, so 10:00 PM to 6:00 AM is 8 hours, and it says so in the result. If the two times are equal the duration is zero, not 24 hours. To measure a span of a day or more, enter both dates; then the dates decide, and an end before the start is an error. The result gives hours, minutes and seconds, h:mm:ss, decimal hours (up to four places, and rounded to two for timesheets), total minutes and total seconds. Time zones, daylight saving changes, breaks and pay are not considered: a night when the clocks change is counted as 24 hours like any other day.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.