Add Time Calculator
Add or subtract two durations and get the result as HH:MM:SS plus decimal hours for payroll.
Last updated · View algorithm, constants and default inputs (JSON)
About this calculator
Time arithmetic is awkward because minutes and seconds roll over at 60, not 100. This calculator works in total seconds, so carrying is handled exactly — 1 h 45 min 30 s plus 2 h 20 min 45 s comes out as 4:06:15. The decimal-hours figure is what you need for a timesheet.
Worked example
calculated with the default values below
Hours (first duration) 1 h · Minutes (first duration) 45 min · Seconds (first duration) 30 s · Hours (second duration) 2 h · Minutes (second duration) 20 min · Seconds (second duration) 45 s · Operation Add Result (HH:MM:SS) 4:06:15 · Decimal hours 4.1042 h · Total seconds 14,775 s · Hours 4 h · Minutes 6 min · Seconds 15 s
General background references
Disclaimer
These calculators give general date results. Public holidays, working-day conventions and time-zone rules are set locally and change, so confirm against the official calendar for anything legally or contractually binding.
Implementation source
This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.
Formula and variables
t = (h₁×3600 + m₁×60 + s₁) ± (h₂×3600 + m₂×60 + s₂)
- t
- total time in seconds
- h₁,m₁,s₁
- first time: hours, minutes, seconds
- h₂,m₂,s₂
- second time: hours, minutes, seconds
- ±
- addition or subtraction
Displayed as H:MM:SS; a subtraction may give a negative result.
Frequently asked questions
Why is my total different from the sum of the clock times?
Because clock times and durations are different things. 1:30 and 2:45 as clock readings are moments in the day, but as durations they are ninety and one hundred and sixty-five minutes. Adding durations gives a total length of time that can exceed twenty-four hours, which a clock cannot show — so the answer is expressed in hours and minutes rather than wrapped around.
How should I handle a total that passes twenty-four hours?
Keep it in hours and minutes instead of converting to a clock time, because a span of thirty hours has no single clock reading. If you need it as a decimal, divide the minutes by sixty — which turns a total of seven hours thirty into 7.5 and not 7.30. Payroll and scheduling systems almost always expect the decimal form.