Skip to content
Date & Timetime

Time Addition and Subtraction Calculator

Add or subtract two durations. Converting to seconds first avoids the carrying errors that come from working in a base-sixty system by hand.

Also called: add times together, time arithmetic.

Operation
Result
4h 16m 15s

4h 16m 15s, which is 15,375 seconds or 4.27 hours. Time carries in sixties, not tens, which is why this needs doing carefully.

Total seconds
15,375
Total minutes
256.25
As decimal hours
4.27
On negative results
A positive duration.
Method and background

How this is calculated

Everything becomes seconds, the arithmetic happens there, and the result converts back. Doing it directly means carrying at sixty rather than ten, which is the source of nearly every manual error in time arithmetic. A negative result is reported as negative rather than wrapping around, since a duration going below zero is usually a mistake worth seeing.

convert everything to seconds, do the arithmetic, then convert back
h, m, s
Hours, minutes and seconds

Worked examples

Each of these is asserted on every build. If a change to the engine ever moved one of these answers, the build would fail before the page could print it.

adding two durations

Starting hours
2
Starting minutes
45
Starting seconds
30
Operation
Add
Hours
1
Minutes
30
Seconds
45

Result4h 16m 15s

9930 + 5445 seconds, carried correctly

Open this example

subtracting more than you have goes negative

Starting hours
1
Starting minutes
0
Starting seconds
0
Operation
Subtract
Hours
2
Minutes
0
Seconds
0

Result-1h 0m 0s

boundary: reported rather than wrapped

Open this example

adding nothing changes nothing

Starting hours
2
Starting minutes
45
Starting seconds
30
Operation
Add
Hours
0
Minutes
0
Seconds
0

Result2h 45m 30s

degenerate case

Open this example

Method and limits

What it assumes

  • Durations rather than clock times, so there is no day boundary.

What it deliberately does not model

  • Leap seconds are not modelled, which matters to nobody outside timekeeping.

Formula version 1.0.0 · definition 1.0.0 · India · Report a problem with this calculator

Frequently asked questions

Why convert to seconds first?
Because carrying in base sixty by hand is where mistakes happen. One arithmetic operation on a single number cannot carry wrongly.