← Every block

Duration Converter

Convert a length of time between weeks, days, hours, minutes, seconds and milliseconds, and read it as ISO 8601. Type it however you like — 1h30m, 90 minutes, 1:30:00. Runs in your browser.

Try one
1h 30m1:30:00
weeks
0.00892857
days
0.0625
hours
1.5
minutes
90
seconds
5,400
milliseconds
5,400,000
ISO 8601PT1H30M

Need to chain this with something else? Open in bode →

About Duration

A length, not a moment

A duration is a distance, not a position. 90 minutes is a length you could hold anywhere on the calendar; 2026-01-01T00:00:00Z is a single point on it. They are different kinds of value, and mixing them is how most converters end up confusing.

So this block never asks what day it is, and never needs to. Give it a length and it tells you the same length in every unit. If you want to add a length to a date, that is a different question, and a different block.

However you write it

Boxes is the way in by default: a figure per unit, years down to milliseconds, nothing to memorise. It is the same control the Timer uses to set a length, for the same reason — 1h30m is quick once you know it and a small puzzle until then.

Text is the other way, for a length you already have rather than one you are composing. 1h30m · 90 minutes · 1.5 hours · 1:30:00 · PT1H30M · 5400 — all the same length. Paste whichever form is in front of you rather than converting it by hand first.

A bare number is seconds. That one is worth saying out loud: 5 could reasonably mean five minutes, and a guess that runs something 300 times too long is a bad way to find out. Clock form reads from the right, so 5:30 is five and a half minutes, not five and a half hours.

Months and years

Because a month is not a length. February and July differ by three days; a leap year differs from the one before it by one. A months row would have to pick a fiction — 30 days, usually — and then present it as a measurement.

You can type in months and years, because people think in them and "how long is three months" is a real question. The difference is who is doing the assuming: typing in that box is you choosing a convention, and the card says which one it used — 1mo as 30d, 1y as 365d. Reading one back off the table would be the block choosing for you.

Weeks are the largest unit it reports: seven days, always. Anything above that is calendar arithmetic, which needs two actual dates to answer properly rather than a length and an assumption.

What comes out

Readable is the human form, to two units — 1h 30m, because a third is noise. Seconds is the exact number, for arithmetic. ISO 8601 is PT1H30M, which is what an API will want back.

Units is the whole table as rows, so the conversion can go straight into a table or a chart rather than being read off the card and typed somewhere else.

The numbers shown on the card are rounded to six significant figures so they stay readable. The ports carry the exact values.

Common questions

What does a bare number mean?
Seconds. 5400 is an hour and a half. It is the one assumption worth stating out loud, because 5 could just as reasonably have meant five minutes, and a guess that runs something 300 times too long is a bad way to find out. Write 5m if you mean minutes.
What formats can I paste in?
Compact forms like 1h30m and 2h 15m 30s, words like 90 minutes and 1.5 hours, clock form like 1:30:00 or 5:30, ISO 8601 like PT1H30M, and a plain number of seconds. Clock form reads from the right, so 5:30 is five and a half minutes rather than five and a half hours.
Can I enter months and years?
Yes, and the card tells you what it assumed: 1 month as 30 days, 1 year as 365. Neither is a fixed length — February and July differ by three days, and a leap year differs from the one before it by a day — so the figure is only as good as that convention. They are not reported back in the conversion table for the same reason: typing 3 months is an assumption you chose, while a months row would be the block presenting one as a fact. If the exact number of days matters, the question is really about two dates rather than a length.
Are the numbers exact?
The values on the ports are exact. The ones shown on the card are rounded to six significant figures so they stay readable — enough to tell 1.5 hours from 1.50001, not enough to turn 90 seconds into a screenful of decimals.
Is anything sent anywhere?
No. It is arithmetic on a number, done in your browser. Nothing is uploaded and nothing is stored.