Skip to content
PercentPoint

Time Duration Calculator

Enter a start time and an end time to get the elapsed time in hours and minutes, decimal hours and total minutes. Overnight spans are handled, and two more modes cover dates with times and adding time to a clock reading.

For planning only. Your school, syllabus or accountant has the final word. First published · Last reviewed by PercentPoint.

How to use the time duration calculator

  1. Pick a mode. “Between times” takes two clock times on the same or the next day. “Dates and times” adds a date to each end, for spans longer than a day. “Add or subtract” starts from one clock time and moves it forward or back by a duration.
  2. Type the times the way you would write them: 9:15 AM, 9:15 pm, 21:15, 0915, or the words noon and midnight. Seconds are optional (9:15:30 AM).
  3. Read the result. The large figure is the elapsed time as h:mm. The cards show the same span as decimal hours, total minutes, total seconds and in words, so you can paste whichever form a timesheet, invoice or lab report asks for.

In the first mode, an end time earlier than the start time is read as the next day. 10:00 PM to 6:30 AM is an overnight span of 8 hours 30 minutes, not a negative number. When the two times are equal, the result is 0; if you mean a full day, use the dates mode.

How to calculate elapsed time between two times

Elapsed time is the end time minus the start time. It is easiest by hand on the 24-hour clock, because PM times then become larger numbers: 3:30 PM is 15:30. Subtract minutes from minutes and hours from hours. When the end has fewer minutes than the start, borrow one hour as 60 minutes.

Microsoft’s Excel help works this example: a start of 10:35 AM and an end of 3:30 PM.

StepWork
Write both on the 24-hour clock15:30 − 10:35
30 minutes is less than 35, so borrow an hour14:90 − 10:35
Subtract minutes, then hours90 − 35 = 55; 14 − 10 = 4
Elapsed time4:55

The same span is 4 × 60 + 55 = 295 minutes, or 295 × 60 = 17,700 seconds, which are the totals Excel shows for this pair of times. Behind the scenes the calculator does it the same way: it turns each time into seconds after midnight, subtracts, and splits the difference back into hours, minutes and seconds (1 hour = 3,600 seconds, 1 minute = 60 seconds, per NIST’s conversion table).

Times that cross midnight

A night shift from 10:00 PM to 6:30 AM ends on the next calendar day, so the plain subtraction 6:30 − 22:00 comes out negative. Add 24 hours to the end time first:

elapsed = (end + 24:00) − start, when the end is earlier than the start

Here that is 30:30 − 22:00 = 8:30. Another way to see it is to split the span at midnight: 10:00 PM to midnight is 2 hours, and midnight to 6:30 AM is 6 hours 30 minutes, for 8 hours 30 minutes in all. Both routes give the same answer, and the calculator flags the result as next day.

Short overnight spans work the same way. 11:45 PM to 12:15 AM is 30 minutes: 15 minutes before midnight and 15 after.

This rule assumes the span is shorter than a day. If a shift starts at 8:00 AM and ends at 9:00 AM the following morning, the clock times alone look like one hour. Enter the dates in the second mode to get 25 hours.

Noon, midnight and the 12-hour clock

Most mistakes with clock times happen around 12. On the 12-hour clock, 12:00 AM is the start of the day (midnight) and 12:00 PM is noon. The National Institute of Standards and Technology calls “12 a.m.” and “12 p.m.” ambiguous and says they should not be used, since noon is neither before nor after noon; its own examples read “8 a.m. to noon” and “until midnight”. Royal Museums Greenwich gives similar advice: say 12 noon or 12 midnight, or use the 24-hour clock, where 12:00 is noon and 00:00 is midnight. This calculator accepts all three forms.

12-hour clock24-hour clock
12:00 AM (midnight, start of day)00:00
12:30 AM00:30
9:15 AM09:15
12:00 PM (noon)12:00
1:00 PM13:00
11:59 PM23:59

To convert a PM time, add 12 to the hour, except at 12 PM. To convert an AM time, keep the hour, except that 12 AM becomes 00. NIST also notes that a deadline “at midnight on Friday” is unclear about which midnight is meant, and suggests 11:59 p.m. or 12:01 a.m. instead, or 0000 for the start of a day and 2400 for its end.

Elapsed time across several days

For a span that runs longer than a day, or for which you know the dates, use “Dates and times”. The calculator counts the whole days between the two dates, multiplies by 24 hours, and then adds the difference between the clock times:

elapsed = days between dates × 24 h + (end time − start time)

From November 12 at 8:00 AM to November 14 at 5:45 PM is 2 days, or 48 hours, plus 9 hours 45 minutes: 57:45, which is 57.75 decimal hours. If the end comes before the start, the result is shown as a negative duration rather than being wrapped around midnight.

The dates are treated as plain calendar dates in one time zone. On the two nights a year when clocks change for daylight saving time in most of the United States, a real overnight span is one hour shorter or longer than the clock times suggest; adjust by hand for those dates. To count the days themselves, without times, use the date calculator.

Adding or subtracting time from a clock time

The third mode answers “what time will it be?” Add the hours and minutes to the start time, carry every 60 minutes into an hour, and every 24 hours into a day. A 3 hour 30 minute drive that leaves at 9:45 PM arrives at 1:15 AM the next day: 21:45 + 3:30 = 25:15, and 25:15 − 24:00 = 1:15.

Subtracting works backward. To be somewhere at 7:00 AM after a 50-minute commute, leave by 6:10 AM. If the result falls before midnight, the calculator labels it as the previous day, and a long duration such as 100 hours shows how many days later the result lands.

When you need to add several durations together, without clock times, the hours and minutes calculator sums them; it treats every entry as a length of time rather than a time of day.

Turning the result into decimal hours

Payroll systems and invoices usually want hours as a decimal: 8 hours 30 minutes is 8.5 hours. Divide the minutes by 60 and add them to the hours. For the Excel example, 4:55 is 4 + 55 ÷ 60 ≈ 4.9167 hours; for the overnight shift, 8:30 is 8.5 hours. The calculator shows up to four decimal places so you can round to whatever your form requires, and the time to decimal calculator has a full minutes-to-hundredths chart.

For a week of punches with unpaid breaks and overtime, the time card calculator adds each day’s in and out times for you.

Sources & assumptions

How this calculator gets its numbers. Full method: our methodology.

  • Elapsed time = end − start, in whole seconds, written back as hours, minutes and seconds (1 hour = 3,600 seconds, 1 minute = 60 seconds).
  • With clock times only, an end time earlier than the start time is taken as the next day, so 24 hours are added; equal times give 0.
  • With dates, elapsed time = days between the dates × 24 hours + (end time − start time). No time zones or daylight-saving changes are applied.
  • 12:00 AM is midnight at the start of the day and 12:00 PM is noon; “noon”, “midnight” and 24-hour times such as 21:15 are also accepted.

Sources

  1. Microsoft Support (Excel), Calculate the difference between two times. End time minus start time; the worked example 10:35 AM to 3:30 PM is 4:55, 295 minutes or 17,700 seconds.
  2. National Institute of Standards and Technology, NIST Guide to the SI, Appendix B.8: Factors for Units Listed Alphabetically. Time conversion factors: 1 hour (h) = 3.6 × 10³ seconds and 1 minute (min) = 6.0 × 10¹ seconds.
  3. National Institute of Standards and Technology, Time and Frequency Division, Times of Day FAQs. “12 a.m.” and “12 p.m.” are ambiguous and should not be used; for a deadline, 11:59 p.m. or 12:01 a.m., or the 24-hour clock with 0000 for the start of a day and 2400 for its end.
  4. Royal Museums Greenwich, Is noon 12am or 12pm?. Say 12 noon or 12 midnight to avoid confusion, or use the 24-hour clock, where 12:00 is noon and 00:00 (or 24:00) is midnight.

Last reviewed . For payroll, your employer’s timekeeping and rounding rules decide the hours that are paid.

Frequently asked questions

How do I calculate the time between two times?

Subtract the start time from the end time on the 24-hour clock, borrowing 60 minutes when needed. 10:35 AM to 3:30 PM is 15:30 − 10:35 = 4 hours 55 minutes.

How do I calculate hours worked overnight?

Add 24 hours to the end time before subtracting. 10:00 PM to 6:30 AM is 30:30 − 22:00 = 8 hours 30 minutes. Subtract any unpaid break afterward.

Is 12:00 AM midnight or noon?

On the common 12-hour clock, 12:00 AM is midnight at the start of the day and 12:00 PM is noon. NIST calls 12 a.m. and 12 p.m. ambiguous, and Royal Museums Greenwich suggests saying noon or midnight, or using the 24-hour clock (12:00 and 00:00).

How many hours is 9 AM to 5 PM?

8 hours. On the 24-hour clock it is 17:00 − 9:00. With an unpaid 30-minute lunch, the paid time is 7.5 hours.

How do I find elapsed time over more than one day?

Multiply the number of days between the dates by 24 hours and add the difference between the clock times. November 12 at 8:00 AM to November 14 at 5:45 PM is 48 + 9.75 = 57.75 hours.

What time will it be in 8 hours?

Add 8 to the hour on the 24-hour clock and subtract 24 if the total passes 24. From 7:30 PM (19:30), 8 hours later is 27:30, which is 3:30 AM the next day.