Time Unit Converter
CV-33Convert a time between microseconds, milliseconds, seconds, minutes, hours, days and weeks, or use the Duration action to turn seconds into days, hours, minutes and seconds.
Runs in your browser. Nothing is uploaded.
Values, one per line
Converted
How to use it
- Type one time per line, such as 90 min, 2.5 h or 86400.
- Press Convert for every unit, or Duration to write the time as 1 d 2 h 3 min 4 s.
- In Duration you can also paste a form like 1 d 2 h 3 min 4 s and get the seconds back.
- Copy the result or download it.
Fixed lengths only
The Convert action uses exact fixed lengths: 60 seconds in a minute, 3600 in an hour, 86400 in a day and 604800 in a week. Months and years are not offered, because a month is 28 to 31 days and a year is 365 or 366. Leap seconds and daylight saving changes are ignored, so a day here is always 24 hours. For calendar math, such as the number of days between two dates, use a date tool instead.
The Duration action
Duration takes a number of seconds, or a number with a unit, and writes it as days, hours, minutes, seconds and milliseconds, leaving out any part that is zero. So 93784 becomes 1 d 2 h 3 min 4 s. It also reads that form back: 1 d 2 h 3 min 4 s becomes 93784 s. In the reverse form, m means minutes and w means weeks. A negative value gets one minus sign in front of the whole result.
Rounding
Convert is exact to the number of significant digits you choose. Duration works in whole milliseconds. If your value has finer detail, such as 0.0004 s, it is rounded to the nearest millisecond and the line says so, rather than quietly dropping the part. Large numbers are handled with whole-number arithmetic, so a very long duration in seconds is not rounded to a float.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
Line 1: unknown unit "foo". Known units: µs, ms, s, min, h, day, week. | The text after the number is not a unit this tool knows, so it cannot tell what the number measures. | Use one of the units named in the message, or its full name, such as the spelled-out unit. |
Line 1: could not find a number at the start of "abc". Write a value such as 12.5 km, or just 12.5. | The line does not start with a number, so there is nothing to convert. | Start each line with a value such as 12.5, with the unit after it if you want one. |
Line 1: unknown duration unit "foo". Use d, h, min, s or ms (w for weeks). | In the Duration action, a compound input such as 1 d 2 foo has a unit that is not one of d, h, min, s, ms or w. | Use d, h, min, s or ms, or w for weeks. |
Questions people ask
How many seconds are in a day?
There are 86400 seconds in a day, from 24 hours of 60 minutes of 60 seconds. Type 1 day and read the s row. This ignores leap seconds.
How do I convert seconds to hours, minutes and seconds?
Use the Duration action. Enter 3725 and it shows 1 h 2 min 5 s. It handles days too, so 93784 becomes 1 d 2 h 3 min 4 s.
How many minutes are in a week?
There are 10080 minutes in a week, which is 7 days of 1440 minutes. Type 1 week and read the min row to confirm. The same value is 168 hours or 604800 seconds, and each of those appears in the other rows.
Why are there no months or years?
Their length is not fixed. A month has 28 to 31 days and a year has 365 or 366. Any single factor would be wrong some of the time, so the tool leaves them out.
How do I convert milliseconds to seconds?
Divide by 1000. Type 2500 ms and the s row shows 2.5. The tool also lists microseconds, minutes, hours, days and weeks for the same value.
Can I convert a duration like 1h 30m back to seconds?
Yes, in the Duration action. Enter 1h 30m and it returns 5400 s. At least two parts are needed to be read as a duration; a single part is treated as a value to convert.
About this tool
Convert uses fixed lengths: a minute is 60 s, an hour 3600 s, a day 86400 s and a week 7 days. Months and years are left out because their length changes (28 to 31 days; leap years), and leap seconds and daylight saving shifts are ignored. Duration turns a number into days, hours, minutes, seconds and milliseconds, and reads that form back into seconds: 93784 s becomes 1 d 2 h 3 min 4 s, and 1 d 2 h 3 min 4 s becomes 93784 s. In that reverse form m means minutes and w means weeks. Clock formats such as 1:30:00 are not read; write 1 h 30 min. A result that is not a whole number of milliseconds is rounded to the nearest millisecond and says so on the line.