ISO 8601 Duration Converter
Enter an ISO 8601 duration to parse, or total seconds to format.
Result
How to use
- Enter your values in the fields above.
- Press Calculate to see your result instantly.
- Use the Share button to copy a link to your result.
About this calculator
ISO 8601 is the international standard for writing dates, times, and durations so that computers everywhere parse them the same way. Its duration format packs years, months, weeks, days, hours, minutes, and seconds into one string that opens with P (for “period”) and inserts a T before any time-of-day components — so P1DT2H30M reads as 1 day, 2 hours, 30 minutes, with no locale-dependent word order to trip up a parser.
This exact notation is what XML Schema’s xs:duration type stores, what iCalendar (RFC 5545) uses for event durations, and what REST APIs from AWS, Google Calendar, and Stripe return for elapsed-time fields; language libraries like Java’s Duration/Period classes and Python’s isodate module read and write it natively. Converting a duration string to total seconds means summing each designator’s value times its unit (days×86400, hours×3600, minutes×60, seconds×1); going the other way means peeling seconds off in the same order and re-assembling the P/T string — which is exactly what this converter automates, along with a human-readable breakdown.
Was this helpful?
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)