How to use the time duration calculator
- Choose a mode: Add durations, Subtract durations or Difference between times.
- Enter the first time or duration in
HH:MM:SSformat. You can omit leading zeros. - Enter the second time or duration in the same format.
- The result updates automatically as you type.
How the time math works
A time duration calculator converts every input into total seconds, performs the arithmetic, then converts back to hours, minutes and seconds. For example, adding 01:30:00 and 02:45:30 means converting each value: 1 x 3600 + 30 x 60 = 5400 seconds, and 2 x 3600 + 45 x 60 + 30 = 9930 seconds. The sum is 15330 seconds. Dividing by 3600 gives 4 hours with 930 seconds left. Dividing 930 by 60 gives 15 minutes and 30 seconds, producing 04:15:30.
When you use the difference mode, the tool treats both inputs as points on a 24-hour clock. If the second time is earlier than the first, it assumes the interval crosses midnight and adds 24 hours (86400 seconds) to the result.
Common duration reference table
This table shows frequently used intervals converted to total seconds and decimal hours, which is helpful when you need to feed results into a spreadsheet or payroll system.
| Duration | Total seconds | Decimal hours |
|---|---|---|
| 00:15:00 | 900 | 0.25 |
| 00:30:00 | 1,800 | 0.50 |
| 01:00:00 | 3,600 | 1.00 |
| 01:30:00 | 5,400 | 1.50 |
| 08:00:00 | 28,800 | 8.00 |
| 24:00:00 | 86,400 | 24.00 |
Practical uses for adding and subtracting time
Freelancers and contractors often log work in segments. If you worked 03:20:00 in the morning and 04:10:00 in the afternoon, adding those durations gives a total of 07:30:00 for invoicing. Video editors combine clip lengths the same way to estimate final runtime.
Subtraction is useful for finding remaining time. If a project requires 40:00:00 and you have completed 27:45:00, subtracting tells you exactly 12:15:00 remains. This kind of hours calculator work avoids manual borrowing errors across base-60 units.
The difference mode handles clock times. Entering a start of 09:15:00 and an end of 17:45:00 returns 08:30:00, the exact elapsed time for a shift or meeting.
Input formats and edge cases
The tool accepts H:MM:SS, HH:MM:SS, MM:SS (treated as zero hours) and even bare SS (treated as zero hours and zero minutes). Seconds values of 60 or more roll over into minutes automatically, so entering 00:00:125 is treated as 125 total seconds, displayed as 00:02:05.
Negative durations are not accepted because a physical duration cannot be negative. If you subtract a larger duration from a smaller one, the tool returns an error rather than a negative time. For the difference mode, crossing midnight is handled by adding 24 hours when the second clock time is numerically smaller than the first.
If you need to relate time to distance or rate, pair this tool with the speed distance time calculator.
Why base-60 makes manual time math hard
Hours, minutes and seconds use a sexagesimal (base-60) system inherited from ancient Babylonian mathematics. When you add 45 minutes and 30 minutes manually, you get 75 minutes, which must be converted to 1 hour and 15 minutes. That carry step is where most mistakes happen. A dedicated time calculator eliminates the carry problem by working entirely in seconds internally, only formatting the output back into HH:MM:SS at the end.
Worked examples
Each result below was produced by the same code the tool runs, so you can check your own numbers against them.
| Example | Input | Result |
|---|---|---|
| Add two work shifts | Mode: add; First time or duration (HH:MM:SS): 08:30:00; Second time or duration (HH:MM:SS): 04:45:00 | Total seconds: 47,700; Result: 13:15:00 |
| Subtract a break from a shift | Mode: sub; First time or duration (HH:MM:SS): 09:00:00; Second time or duration (HH:MM:SS): 00:45:00 | Total seconds: 29,700; Result: 08:15:00 |
| Difference between clock times | Mode: diff; First time or duration (HH:MM:SS): 08:15:00; Second time or duration (HH:MM:SS): 17:45:30 | Total seconds: 34,230; Result: 09:30:30 |
| Add short clips | Mode: add; First time or duration (HH:MM:SS): 00:04:50; Second time or duration (HH:MM:SS): 00:03:25 | Total seconds: 495; Result: 00:08:15 |
FAQ
How do I add two times together?
Select the Add durations mode, enter both values in HH:MM:SS format and the result appears instantly. The tool converts each value to seconds, sums them and formats the total back to hours, minutes and seconds.
Can I subtract a longer duration from a shorter one?
No. Durations represent elapsed time and cannot be negative. If you need the absolute gap between two values, use the Difference between times mode instead.
What happens if my seconds exceed 59?
Values like 00:00:125 are accepted. The tool converts everything to total seconds first, so 125 seconds becomes 00:02:05 in the output.
Does this handle times past midnight?
Yes. In Difference mode, if the second time is earlier than the first, the tool assumes the interval crosses midnight and adds 24 hours to produce the correct positive duration.
Is my data sent to a server?
No. All calculations run locally in your browser. Nothing is uploaded or stored.
Can I use this as an hours calculator for payroll?
Yes. Add your daily shift durations together to get weekly totals. The total seconds row helps if your payroll software expects decimal hours.