Time Calculator
Add two durations or subtract the second duration from the first. Enter hours, minutes, and seconds to receive a normalized hours:minutes:seconds result and totals in each unit.
Time Calculator tool
About the Time Calculator
The calculator is useful for combining activity sessions, checking media runtimes, and comparing elapsed durations. It supports totals longer than a day and displays a negative result when the second duration is larger in subtraction mode.
How Is Time Calculated?
Each duration is converted to whole seconds before arithmetic. The absolute result is divided into hours, remaining minutes, and remaining seconds; a negative sign applies to the entire duration.
Duration seconds = 3,600 × hours + 60 × minutes + seconds
Result seconds = first duration seconds ± second duration seconds
Total hours = result seconds ÷ 3,600; total minutes = result seconds ÷ 60
Example
1:45:30 plus 0:30:45 equals 2:16:15. That is 8,175 seconds, 136.25 minutes, or approximately 2.270833 hours.
How to Use the Time Calculator
- Choose addition or subtraction.
- Enter hours, minutes, and seconds for the first duration.
- Enter the second duration, using zero for unused units.
- Read the normalized result, including its sign.
- Use the total hours, minutes, or seconds for further calculations.
Time Calculator Examples
Combining sessions
2:20:00 plus 1:50:00 equals 4:10:00, or 250 minutes.
A negative difference
0:30:45 minus 1:45:30 equals −1:14:45, or −4,485 seconds.
Automatic carrying
0 hours, 120 minutes, and 60 seconds normalize to 2:01:00, or 7,260 seconds.
Duration versus decimal hours
1:30:00 means one hour and thirty minutes, or 1.5 decimal hours. It does not mean 1.30 hours.
Precision and limits
Whole-second arithmetic avoids decimal carrying errors. Inputs and combined second totals must remain within JavaScript's safe integer range.
These arithmetic durations do not account for leap seconds or local clock changes.
Frequently Asked Questions
Does this calculate the difference between clock times?
No. Inputs are durations, not times of day. There is no date, AM/PM, midnight rollover, or timezone conversion.
Can minutes or seconds exceed 59?
Yes. Whole nonnegative values are accepted and normalized automatically. For example, 90 minutes becomes 1 hour and 30 minutes.
Can the result exceed 24 hours?
Yes. Hours are not wrapped at midnight, so a duration of 30 hours remains 30:00:00.
How is a negative result displayed?
A leading minus sign applies to the whole normalized duration. The total hours, minutes, and seconds are also negative.
Can I enter fractional seconds?
This version accepts whole hours, minutes, and seconds only. Decimal total hours and minutes are rounded to six decimal places.