Duration calculator

Add durations beyond 24 hours or subtract them sequentially without decimal drift, including milliseconds and negative values.

Up to 1,000 lines and 32,768 UTF-16 units. Format: [optional + or -]H:MM:SS with optional .mmm containing 1–3 digits; hours have up to 9 digits. Minutes and seconds are 00–59. No blank lines or spaces. Subtraction is sequential A−B−C, not a date difference; a mathematical day has 24 hours.

Digits 0–9, ٠–٩ and ۰–۹ are accepted. Oversized input is rejected without silent truncation.

Calculation stays in your browser without uploads or automatic storage. Operations are bounded and synchronous; there is no background job or Cancel button. Only page assets are loaded from the site.

How to use

Choose addition or subtraction of every duration after the first. Enter separate durations without blank lines, then calculate. Review the normalized H:MM:SS.mmm duration and exact integer milliseconds; copy or download them.

Try an example

25:00:00 + 1:30:00 = 26:30:00.000. Sequential subtraction of 0:30:00 and 0:45:00 from 1:00:00 gives -0:15:00.000. Adding 0:00:00.1 and 0:00:00.2 gives exactly 0:00:00.300.

Support & limits

BigInt milliseconds retain precision. A−B−C subtraction is not a date difference; subtracting a negative duration increases the result. No exponents, whitespace or grouping separators; minutes and seconds are 00–59, and hours do not wrap at 24. No calendars, time zones, leap seconds or parsing of ISO 8601 duration strings such as PT1H.

Common questions

Can I enter four fractional digits?

No. The smallest unit is a millisecond. Extra precision is rejected rather than rounded or ignored. One to three fractional digits are accepted; output always has three.

Related tools