duration.tools

Duration → Milliseconds Parser

“1h 30m” to ms, seconds, and minutes.

Free, no sign-upRuns in your browser — nothing is uploadedUpdated

Milliseconds
5,400,000
1 h 30 min 0 s
Seconds
5,400
Minutes
90
Hours
1.5

Timeouts want milliseconds; humans write “90 seconds” or “1h 30m”. Type a duration in any common form and get it as milliseconds, seconds, and minutes, ready to paste into a config or a setTimeout call.

Common durations in milliseconds

DurationMillisecondsSeconds
1 second1,0001
30 seconds30,00030
1 minute60,00060
5 minutes300,000300
15 minutes900,000900
30 minutes1,800,0001,800
1 hour3,600,0003,600
12 hours43,200,00043,200
1 day86,400,00086,400
1 week604,800,000604,800

Milliseconds conversion formulas

1 second = 1,000 ms, 1 minute = 60,000 ms, 1 hour = 3,600,000 ms and 1 day = 86,400,000 ms. To convert, multiply each part of the duration by its factor and add: 1h 30m is 3,600,000 + 30 × 60,000 = 5,400,000 ms.

Writing durations in code

Milliseconds are the native unit of JavaScript timers (setTimeout, setInterval), Date arithmetic, and many HTTP client timeouts. Hard-coded values like 5400000 are easy to get wrong by a factor of ten, so many codebases spell them out as 90 * 60 * 1000 — or paste the computed value from here with a comment.

Watch for unit mismatches between systems: Java's Thread.sleep and JavaScript use milliseconds, Python's time.sleep uses seconds, and Go's time.Duration counts nanoseconds.

How to use it

  1. 1.Type a duration: 1h 30m, 90s, 1:45:00, 2.5h…
  2. 2.Read the value in ms, seconds, and minutes.
  3. 3.Copy the one your code expects.

Questions people ask

How many milliseconds in an hour?
3,600,000 ms — 60 minutes × 60 seconds × 1000. A day is 86,400,000 ms.
What does a bare number mean?
Bare numbers are read as seconds in this tool — type units (90m, 2h) or colon time when you mean something else.
How many milliseconds are in a minute?
60,000 ms. 5 minutes is 300,000 ms and 15 minutes is 900,000 ms.