Add or subtract hours, minutes, and seconds from a starting time.
Both durations are converted to total seconds, added or subtracted, then converted back to hours, minutes and seconds.
Time arithmetic differs from normal decimal arithmetic because it uses a mixed base: 60 seconds per minute, 60 minutes per hour, and 24 hours per day. Adding or subtracting times requires carrying over (or borrowing) between these units, similar to how carrying works in regular addition but with different "digit" limits.
Example: 2:45:40 + 1:30:35 → add each unit (3:75:75), then carry: 75 seconds = 1:15, 76 minutes = 1:16, giving a final result of 4:16:15.
Subtraction works the same way in reverse — if a unit would go negative, borrow 60 from the next larger unit before subtracting, just like borrowing 10 when subtracting multi-digit decimal numbers.
| Unit | Equals |
|---|---|
| 1 minute | 60 seconds |
| 1 hour | 60 minutes = 3,600 seconds |
| 1 day | 24 hours = 1,440 minutes |
| 1 week | 7 days = 168 hours |
Example — Subtraction with borrowing: 5:10:20 − 2:45:50: seconds (20−50) need borrowing, so borrow 1 minute (60s): 80−50=30s, minutes become 9; minutes (9−45) need borrowing, so borrow 1 hour (60m): 69−45=24m, hours become 4; hours 4−2=2. Result: 2:24:30.
Example — Summing video clip lengths: Three clips of 12:45, 8:32, and 21:18 (min:sec) total: convert to seconds (765+512+1278=2555s), then back to minutes:seconds = 42:35.
Why is time math different from normal addition? Time uses a base-60 (sexagesimal) system for seconds and minutes and a base-24 system for hours, rather than the base-10 system used in ordinary arithmetic.
How do I convert a duration to decimal hours? Divide the minutes by 60 and add to the whole hours (e.g., 2 hours 30 minutes = 2 + 30/60 = 2.5 hours).
What's the easiest way to add many time values? Converting everything to total seconds, summing, then converting back to hours:minutes:seconds avoids repeated carrying errors.
Why does time use base-60 instead of base-10? The sexagesimal (base-60) system dates back to ancient Babylonian mathematics, valued because 60 divides evenly by many numbers (2, 3, 4, 5, 6, 10, 12, etc.), making fractions of an hour easier to express as whole numbers.
How do I handle time calculations that cross midnight? Treat the calculation on a continuous 24-hour+ scale rather than resetting at midnight — if the end time is numerically earlier than the start, add 24 hours to it before subtracting.
What's the difference between calculating a duration and adding a duration to a clock time? Finding a duration (subtracting two clock times) gives an elapsed time; adding a duration to a clock time (like a start time plus 3 hours 15 minutes) gives a new clock time — both use the same carrying/borrowing logic, just applied differently.
How do I convert seconds directly into hours, minutes, and seconds? Divide total seconds by 3,600 for whole hours, take the remainder and divide by 60 for whole minutes, and the final remainder is the leftover seconds.
Starting at 11:30 PM and adding 2 hours and 45 minutes results in 2:15 AM the next day — a good example of how time addition can roll over past midnight into a new day.
24-hour format: A time format running from 00:00 to 23:59, avoiding AM/PM ambiguity.