Open Calculator

Time Calculator

Add or subtract durations, or add a duration to a clock time.

dayshoursminutesseconds

Excel: the button above exports this calculation as a spreadsheet with live formulas, or download the blank template.

How the time calculator works

Time does not add in base 10. Sixty seconds make a minute, sixty minutes an hour, and twenty-four hours a day, so adding two durations means carrying at each of those boundaries. The simplest reliable method, and the one this calculator uses, is to convert everything to seconds, do ordinary arithmetic, and convert back:

seconds = days x 86,400 + hours x 3,600 + minutes x 60 + seconds
days    = floor(total / 86,400), then hours from the remainder, and so on

Worked example: adding

Add 1 day 2 h 30 m 15 s to 23 h 45 m 50 s, the defaults in the form:

A = 86,400 + 7,200 + 1,800 + 15 = 95,415 s
B = 82,800 + 2,700 + 50        = 85,550 s
A + B = 180,965 s
180,965 / 86,400 = 2 days, remainder 8,165 s
8,165 / 3,600    = 2 hours, remainder 965 s
965 / 60         = 16 minutes, remainder 5 s
result = 2 days, 2 h, 16 m, 5 s

As totals, that is 2.09 days, 50.27 hours, 3,016.08 minutes, or 180,965 seconds.

Worked example: subtracting

A minus B is 95,415 - 85,550 = 9,865 s, which is 2 h 44 m 25 s. B minus A is the same magnitude with a negative sign. The calculator never shows negative minutes inside an otherwise positive result; it flags the whole duration as negative instead.

Adding a duration to a clock time

Switch to the clock mode to answer questions like "if I start at 9:30 AM and the process takes 1 day 2 h 30 m 15 s, when does it finish?" The start time becomes seconds since midnight (9:30 AM is 34,200 s), the duration is added, and every full 86,400 s carries into a day: 34,200 + 95,415 = 129,615 s, which is 1 day plus 43,215 s, or 12:00:15 PM the next day. Subtracting works the same way and can roll back past midnight into the previous day.

Unit conversion reference

UnitSecondsMinutesHours
1 minute6010.01667
1 hour3,600601
1 day86,4001,44024
1 week604,80010,080168
30-day month2,592,00043,200720
365-day year31,536,000525,6008,760

For payroll-style hours between a start and end time with breaks, use the hours calculator. For spans measured in calendar days, weeks, and months, use the date calculator.

Frequently asked questions

How do I add hours and minutes without a calculator?

Add the minutes first, carry every 60 into the hours, then add the hours and carry every 24 into days. 2 h 45 m + 1 h 30 m: 45 + 30 = 75 = 1 h 15 m, so 2 + 1 + 1 = 4 h 15 m.

What does a negative result mean?

The second duration is longer than the first. The calculator shows the magnitude of the difference and marks it negative rather than showing negative minutes and seconds.

How do I convert a duration to decimal hours?

Divide the minutes by 60 and add to the hours: 2 h 15 m is 2.25 hours. The totals section shows the whole duration in decimal days, hours, minutes, and seconds.

Can I add time to a clock time and cross midnight?

Yes. Adding 10 hours to 9:30 PM gives 7:30 AM the next day, and the result says how many days later (or earlier, when subtracting) it lands.

Does this handle time zones or daylight saving?

No. Clock arithmetic here assumes a plain 24-hour day. On a DST change night an actual clock skips or repeats an hour, which is out of scope for a duration calculator.

Related calculators