ISO 8601 Duration Calculator

Parse, build, normalize, and estimate ISO 8601 durations with clear calendar-unit assumptions.

Paste an ISO 8601 duration such as P1Y2M3DT4H5M6S, or build one from parts, then review the normalized value, estimated elapsed totals, and an optional end date. Everything runs locally in your browser.

Use the common duration form PnYnMnDTnHnMnS, or a week-only duration such as P2W. A leading minus sign is accepted for subtracting a duration from a start date.

ISO week durations are written as PnW and should not be mixed with year, month, day, or time parts.

When provided, the summary shows the local end date after applying the duration.

Used only for estimated elapsed totals when years or months are present.



How it works

ISO 8601 durations start with P, then list date parts such as years, months, weeks, and days. Time parts follow T, such as hours, minutes, and seconds. For example, P3DT4H means three days and four hours.

Calendar units are not all fixed lengths. A month can be 28 through 31 days, and a year can include a leap day. The estimated totals use the selected month/year basis, while the optional start date applies whole calendar years and months to the local calendar before adding smaller units.

Week durations are written as PnW. This tool keeps week-only durations separate from year/month/day/time durations because that avoids ambiguous mixed calendar notation.


References