What this calculator does
This time calculator adds or subtracts an elapsed duration to a starting clock time and tells you the resulting time of day on a 24-hour clock. It is pure arithmetic on time-of-day, so it works the same everywhere — no calendar, time zone, or regional rules are involved.
How to use it
Enter your start time as hour, minute and second (leave blank for 0). Then enter the elapsed duration in hours, minutes and seconds, and choose whether it happens after the start time (add) or before it (subtract). The components are not limited to 0–59, so you can enter "100" hours or "200" minutes directly. The calculator returns the resulting HH:MM:SS and, when the duration crosses midnight, how many whole days the result rolls over (negative when going before).
The formula explained
Each clock time and duration is converted to seconds: hours are multiplied by 3600, minutes by 60, and seconds by 1. The signed elapsed seconds (positive for after, negative for before) are added to the start seconds to give a raw total. A floored division by 86400 (the number of seconds in a day) yields the whole-day offset, and the remainder is the time-of-day, always between 0 and 86399 seconds. That remainder is split back into hours, minutes and seconds.
$$\begin{gathered} T = \left(S + E\right) \bmod 86400 \\[1.5em] \text{where}\quad \left\{ \begin{aligned} S &= 3600\,\text{Hr} + 60\,\text{Min} + \text{Sec} \\ E &= \pm\left(3600\,\text{Hr} + 60\,\text{Min} + \text{Sec}\right) \end{aligned} \right. \end{gathered}$$
Worked example
Start 10:30:00, elapsed 100 hours, after. Start = 37,800 s; elapsed = 360,000 s; total = 397,800 s. \(\lfloor 397{,}800 / 86{,}400 \rfloor = 4\) days; remainder = 52,200 s = 14:30:00. So the answer is 14:30:00, +4 days.
More Worked Examples: Subtracting and Crossing Midnight
The calculator converts every time to seconds, adds or subtracts the elapsed duration, then wraps the total into one 24-hour day (86,400 seconds). The number of days crossed is the floored quotient (rounded toward negative infinity), and the clock time is the non-negative remainder. This is why a negative total still gives a valid time of day.
Example 1: Subtract 5 h 45 min from 02:15:00
- Start: \(S = 3600\cdot 2 + 60\cdot 15 + 0 = 8100\) s.
- Elapsed: \(E = 3600\cdot 5 + 60\cdot 45 = 18000 + 2700 = 20700\) s.
- Total: \(8100 - 20700 = -12600\) s.
- Days: \(\lfloor -12600 / 86400 \rfloor = \lfloor -0.1458 \rfloor = -1\).
- Remainder: \(-12600 - (-1)(86400) = 73800\) s.
- Convert: \(73800 / 3600 = 20.5\) h, which is 20 h 30 min, so the time is 20:30:00, 1 day earlier (−1 day).
Example 2: Add 36 h 20 min 30 s to 22:10:15
- Start: \(S = 3600\cdot 22 + 60\cdot 10 + 15 = 79200 + 600 + 15 = 79815\) s.
- Elapsed: \(E = 3600\cdot 36 + 60\cdot 20 + 30 = 129600 + 1200 + 30 = 130830\) s.
- Total: \(79815 + 130830 = 210645\) s.
- Days: \(\lfloor 210645 / 86400 \rfloor = \lfloor 2.438 \rfloor = 2\).
- Remainder: \(210645 - 2\cdot 86400 = 210645 - 172800 = 37845\) s.
- Convert: \(37845 = 10\cdot 3600 + 1845\), and \(1845 = 30\cdot 60 + 45\), so the time is 10:30:45, 2 days later (+2 days). Check: 22:10:15 + 24 h is the next day at 22:10:15, and the remaining 12 h 20 min 30 s passes midnight once more.
Example 3: Subtract 50 hours from 08:00:00
- Start: \(S = 3600\cdot 8 = 28800\) s.
- Elapsed: \(E = 3600\cdot 50 = 180000\) s.
- Total: \(28800 - 180000 = -151200\) s.
- Days: \(\lfloor -151200 / 86400 \rfloor = \lfloor -1.75 \rfloor = -2\) (floored division rounds down to −2, not toward zero to −1).
- Remainder: \(-151200 - (-2)(86400) = -151200 + 172800 = 21600\) s.
- Convert: \(21600 / 3600 = 6\) h, so the time is 06:00:00, 2 days earlier (−2 days). Check: 08:00:00 minus 48 h is 08:00:00 two days earlier, and the last 2 h bring it to 06:00:00.
Time Unit Conversion Reference
| Unit | Hours | Minutes | Seconds |
|---|---|---|---|
| 1 minute | — | 1 | 60 |
| 1 hour | 1 | 60 | 3,600 |
| 1 day | 24 | 1,440 | 86,400 |
| 1 week | 168 | 10,080 | 604,800 |
12-hour to 24-hour clock
| 12-hour clock | 24-hour clock |
|---|---|
| 12:00 AM (midnight) | 00:00 |
| 1:00 AM | 01:00 |
| 12:00 PM (noon) | 12:00 |
| 1:00 PM | 13:00 |
| 11:00 PM | 23:00 |
Rule of thumb: for PM times other than 12 PM, add 12 to the hour; for 12 AM, use 00. These conversions ignore daylight saving changes and time zone shifts, which this calculator does not apply.
FAQ
Can I subtract more than a day? Yes. Choose "before" and enter any duration; the day offset will go negative to show how far back the result lands.
Why is my result a previous-day time? When subtracting pushes the time before midnight, the clock wraps to the prior day and the day offset becomes -1 (or lower).
Does it handle AM/PM? The tool uses a 24-hour clock. Convert PM hours by adding 12 (for example 2 PM = 14).