About this tool
Break a millisecond value into days, hours, minutes, seconds and milliseconds, or build a total from a duration, all in your browser.
The first box reads its value with parseInt, so anything after a decimal point is dropped. Larger units are taken first: 90061500 becomes 1 day, 1 hour, 1 minute, 1 second and 500 milliseconds. A negative value is split by its absolute size and shown with a minus sign on each part that is not zero.
The second box works backwards. Fill any of the five fields and it shows the total in milliseconds and in seconds. Empty fields count as zero, decimals and negatives are accepted, and a non-numeric field shows an error. Only fixed-length units are used, so there are no month or year parts.