What the Time Calculator Does
This Time Calculator lets you add or subtract two blocks of time expressed in days, hours, minutes, and seconds. Instead of manually carrying over 60 seconds into a minute or 24 hours into a day, the tool converts everything into total seconds, performs the addition or subtraction, then formats the result neatly back into days, hours, minutes, and seconds. It is unit-based (a pure duration calculator), so it works the same anywhere in the world — it is not tied to any specific country, calendar, or time zone.
How to Use It
- Select an operation: choose (+) Add to combine two durations, or (–) Subtract to find the difference between them.
- Enter the first duration: type the days, hours, minutes, and seconds. Any blank field is treated as 0, and leading zeros are stripped automatically.
- Enter the second duration: the amount you want to add to or subtract from the first.
- Read the result: the calculator returns the total time, normalised into proper day/hour/minute/second values.
The Formula Explained
Every input is converted to seconds and summed:
- days \(\times 86{,}400\)
- hours \(\times 3{,}600\)
- minutes \(\times 60\)
- seconds \(\times 1\)
The first duration's total seconds and the second duration's total seconds are then combined: result = total₁ + total₂ when adding, or result = total₁ − total₂ when subtracting. The final figure is reformatted into days, hours, minutes, and seconds for display.
$$T_{\text{total}} = T_1 + T_2 \\[1.5em] \text{where}\quad \left\{ \begin{aligned} T_1 &= 86400\,\text{Days} + 3600\,\text{Hours} + 60\,\text{Minutes} + \text{Seconds} \\ T_2 &= 86400\,\text{Days} + 3600\,\text{Hours} + 60\,\text{Minutes} + \text{Seconds} \end{aligned} \right.$$$$T_{\text{total}} = T_1 - T_2 \\[1.5em] \text{where}\quad \left\{ \begin{aligned} T_1 &= 86400\,\text{Days} + 3600\,\text{Hours} + 60\,\text{Minutes} + \text{Seconds} \\ T_2 &= 86400\,\text{Days} + 3600\,\text{Hours} + 60\,\text{Minutes} + \text{Seconds} \end{aligned} \right.$$
Worked Example
Suppose you choose Add, enter a first duration of 2 days, 5 hours, 30 minutes, and a second duration of 1 day, 20 hours, 45 minutes.
- First duration: \(2\times86{,}400 + 5\times3{,}600 + 30\times60 = 192{,}600\) seconds
- Second duration: \(1\times86{,}400 + 20\times3{,}600 + 45\times60 = 161{,}100\) seconds
- Total: \(353{,}700\) seconds = 4 days, 2 hours, 15 minutes, 0 seconds
More Worked Examples
Each example below converts both durations to total seconds with \(T = 86400\,d + 3600\,h + 60\,m + s\), adds or subtracts them, and converts the result back to days, hours, minutes and seconds.
Example 1: Subtraction that needs borrowing
Find 3 d 2 h 10 min 5 s − 1 d 5 h 45 min 30 s.
- First duration: $$T_1 = 86400 \times 3 + 3600 \times 2 + 60 \times 10 + 5 = 259200 + 7200 + 600 + 5 = 267005\ \text{s}$$
- Second duration: $$T_2 = 86400 \times 1 + 3600 \times 5 + 60 \times 45 + 30 = 86400 + 18000 + 2700 + 30 = 107130\ \text{s}$$
- Difference: $$T = 267005 - 107130 = 159875\ \text{s}$$
- Convert back: \(\lfloor 159875 \div 86400 \rfloor = 1\) day, remainder \(159875 - 86400 = 73475\); \(\lfloor 73475 \div 3600 \rfloor = 20\) hours, remainder \(73475 - 72000 = 1475\); \(\lfloor 1475 \div 60 \rfloor = 24\) minutes, remainder \(1475 - 1440 = 35\) seconds.
Result: 1 d 20 h 24 min 35 s.
Doing the same subtraction by hand shows the borrowing. 5 s − 30 s won't go, so borrow 1 minute: 65 − 30 = 35 s, which leaves 9 minutes. 9 min − 45 min won't go, so borrow 1 hour: 69 − 45 = 24 min, which leaves 1 hour. 1 h − 5 h won't go, so borrow 1 day: 25 − 5 = 20 h, which leaves 2 days. Finally, 2 − 1 = 1 day. You get the same answer: 1 d 20 h 24 min 35 s.
Example 2: Addition that overflows several units at once
Find 0 d 23 h 59 min 50 s + 0 d 0 h 0 min 15 s.
- First duration: $$T_1 = 3600 \times 23 + 60 \times 59 + 50 = 82800 + 3540 + 50 = 86390\ \text{s}$$
- Second duration: \(T_2 = 15\ \text{s}\)
- Sum: $$T = 86390 + 15 = 86405\ \text{s}$$
- Convert back: \(\lfloor 86405 \div 86400 \rfloor = 1\) day, remainder 5 s, so 0 hours, 0 minutes and 5 seconds.
Result: 1 d 0 h 0 min 5 s. By hand, 50 s + 15 s = 65 s, which becomes 1 min 5 s. That extra minute brings 59 min up to 60 min, which becomes 1 h. That extra hour brings 23 h up to 24 h, which becomes 1 d. One added second overflows three units in a row.
Example 3: Subtracting a longer duration (negative result)
Find 1 d 4 h 30 min 0 s − 2 d 1 h 15 min 20 s.
- First duration: $$T_1 = 86400 \times 1 + 3600 \times 4 + 60 \times 30 + 0 = 86400 + 14400 + 1800 = 102600\ \text{s}$$
- Second duration: $$T_2 = 86400 \times 2 + 3600 \times 1 + 60 \times 15 + 20 = 172800 + 3600 + 900 + 20 = 177320\ \text{s}$$
- Difference: $$T = 102600 - 177320 = -74720\ \text{s}$$
- The second duration is longer, so the result is a negative duration. Keep the minus sign and convert the absolute value, 74,720 s: \(\lfloor 74720 \div 86400 \rfloor = 0\) days; \(\lfloor 74720 \div 3600 \rfloor = 20\) hours, remainder \(74720 - 72000 = 2720\); \(\lfloor 2720 \div 60 \rfloor = 45\) minutes, remainder \(2720 - 2700 = 20\) seconds.
Result: −(0 d 20 h 45 min 20 s). The first duration is 20 h 45 min 20 s shorter than the second. If you only need to know how far apart the two durations are, use the absolute value: 0 d 20 h 45 min 20 s.
Converting Total Seconds Back to Days, Hours, Minutes and Seconds
The calculator does all of its arithmetic in seconds, then splits the total back into larger units. It assumes a day is always 86,400 s (24 × 3,600), a fixed duration that ignores calendar effects such as daylight-saving changes. You can do the same yourself by following these steps. The running example adds 2 d 14 h 0 min 0 s and 1 d 12 h 15 min 0 s.
- Find the total seconds for each duration using days × 86,400 + hours × 3,600 + minutes × 60 + seconds. $$T_1 = 86400 \times 2 + 3600 \times 14 = 172800 + 50400 = 223200\ \text{s}$$ $$T_2 = 86400 \times 1 + 3600 \times 12 + 60 \times 15 = 86400 + 43200 + 900 = 130500\ \text{s}$$
- Add or subtract them. $$T = 223200 + 130500 = 353700\ \text{s}$$
- Check the sign. If \(T\) is negative, note the minus sign and carry on with \(|T|\). Here \(T = 353700\) is positive, so there is nothing to change.
- Days: \(\text{days} = \lfloor T \div 86400 \rfloor\), remainder \(R_1 = T \bmod 86400\). $$\lfloor 353700 \div 86400 \rfloor = 4, \quad R_1 = 353700 - 4 \times 86400 = 353700 - 345600 = 8100$$
- Hours: \(\text{hours} = \lfloor R_1 \div 3600 \rfloor\), remainder \(R_2 = R_1 \bmod 3600\). $$\lfloor 8100 \div 3600 \rfloor = 2, \quad R_2 = 8100 - 7200 = 900$$
- Minutes: \(\text{minutes} = \lfloor R_2 \div 60 \rfloor\). $$\lfloor 900 \div 60 \rfloor = 15$$
- Seconds: \(\text{seconds} = R_2 \bmod 60\). $$900 - 15 \times 60 = 0$$
Result: 353,700 s = 4 d 2 h 15 min 0 s. To check it, rebuild the total: \(4 \times 86400 + 2 \times 3600 + 15 \times 60 + 0 = 345600 + 7200 + 900 = 353700\).
Doing it by hand without converting to seconds
You can also work column by column, starting with seconds and moving left.
- When adding, carry whenever a column overflows: every 60 s becomes 1 min, every 60 min becomes 1 h, and every 24 h becomes 1 d. In the example, 14 h + 12 h = 26 h, which becomes 1 d 2 h. Then 2 d + 1 d + 1 carried day = 4 d, giving 4 d 2 h 15 min 0 s.
- When subtracting, borrow whenever a column is too small: take 1 min from the next column and add it as 60 s, take 1 h and add it as 60 min, or take 1 d and add it as 24 h.
Both methods give the same answer. Converting to seconds is easier to get right when many columns overflow or need borrowing. The column method is faster for simple sums.
FAQ
What happens if subtraction gives a negative result? Subtracting a larger duration from a smaller one yields a negative total in seconds, representing a time deficit. Reverse the order of inputs if you want the absolute gap.
Can I leave fields blank? Yes. Empty fields default to 0, so you can enter just hours and minutes if that's all you need.
Does it account for dates or time zones? No. This is a pure duration tool that works with intervals of time, not calendar dates, daylight saving, or time zones.