ISO Duration Calculator

Read an ISO 8601 duration and apply it to a local date/time, or convert fixed units to elapsed seconds without an anchor.

Starts with an editable example. Replace the dates and rules with your own.

Your calculation

Inputs stay on this page unless you choose to save them.

Ready when you are

Choose your dates.

Select your counting rules and calculate.

How to use this calculator

Enter a nonnegative duration such as P1M2DT3H. Choose anchored calendar arithmetic or fixed-unit conversion and, when needed, a month-end policy.

Anchored mode applies years and months, then local calendar days, then elapsed hours, minutes and seconds. Fixed mode treats days as 24 hours and rejects years or months. Weeks cannot be mixed with other units; only seconds may have fractions.

A worked example

P1D across New York's spring clock change can mean 23 elapsed hours. PT24H always means 24 elapsed hours.

How many seconds are in P1M?

That depends on the anchor date and time zone. A calendar month has no single fixed number of seconds.

Which calendar and years are supported?

Each result states its calendar, time scale, precision and supported range. Batch converters accept up to 100 nonempty input lines and retain invalid rows. Copy, CSV and print include the calculation rules. Calendar downloads appear when a result contains dated events. Calculations run in your browser; no reminders or jobs are scheduled.

What happens to my dates?

Calculations run on your device. Saving a calculation is optional and keeps it in this browser. A setup link contains the dates and settings you entered; anyone with the link can read them. Use one tab per saved calculator. Clear saved data from Privacy & settings.