Time Calculator: Add and Subtract Durations
Add or subtract hours, minutes and seconds, evaluate a signed expression, or shift a local date and time by a duration.
Result
How is this calculated?
Convert each signed duration group to seconds, then apply the selected operation in the same units.
Worked example: Add a segment and subtract a pause
Combine 2 hours and 20 minutes with 15 extra minutes, then subtract a 40-second pause. The total is 2 hours, 34 minutes and 20 seconds.
Method and limits
Use d, h, m and s for whole days, hours, minutes and seconds; blank duration means zero. Separate positive or negative groups using + or a hyphen, such as 2h 20m − 40s (type a hyphen). A day means 24 hours; no time-zone changes are applied.
How to use this calculator
- Choose Two durations to add or subtract duration amounts. Add a unit to every number: d, h, m or s.
- Choose Evaluate an expression for several signed groups, or Shift a date and time to apply a duration to one local timestamp.
Join segments and remove a pause
The expression 2h 20m - 40s + 15m equals 9,260 seconds, or 2 hours, 34 minutes and 20 seconds.
A signed group applies to all its units
In 2h - 1h 30m, the subtraction applies to the entire 1 hour and 30 minutes. The result is 30 minutes. Use a keyboard hyphen for a minus and add a plus before a new positive group.
A timestamp is not a duration
02:30 is a time reading, not 2 hours 30 minutes of duration input. Enter 2h 30m for a duration, or use a complete date and time such as 2024-02-29 23:50:00 in the starting field.
Carry across midnight when shifting a date
Adding 20m to 2024-02-29 23:50:00 produces 2024-03-01 00:10:00. Calendar boundaries are respected; offset or daylight-saving changes are not.
Frequently asked questions
- Can a result be negative?
- Yes. Subtracting a longer duration gives a signed result. The leading minus applies to the whole displayed duration.
- What if I leave a duration blank?
- A blank duration contributes zero. The starting date and time is still required when shifting a timestamp.
- Can I use 1.5 hours?
- Use whole quantities with units, for example 1h 30m or 90m. Decimal durations and fractional seconds are not accepted.
- Does “add one day” change for a daylight-saving transition?
- No. A day is exactly 24 hours for both duration arithmetic and a timestamp shift.
Common mistakes and limits
- Use whole quantities and standard + or - separators. This is not a general arithmetic expression parser.
- Timestamp shifts use a single fixed-day calendar and must remain within years 0001 through 9999.
Sources & methodology
Related calculators
- Hours Calculator: Hours and Minutes Between Times
Find whole minutes, hours and minutes, and decimal hours between two clock times or dated timestamps. A smaller end clock rolls over once.
- Time Duration Calculator: Elapsed Time Between Times
Find days, hours, minutes and seconds between two times. Use dates when the interval spans multiple days; use clock times for one midnight crossing.
- Time Zone Converter: IANA Zones and UTC Offsets
Convert one dated clock time between city-based time zones and fixed UTC offsets. Check repeated or skipped local times.
- Time Card Calculator: Shift Hours and Breaks
Add shift minutes for one or two weeks, including overnight work and timed breaks. Review net, gross and break totals by day.