How to convert time units

Type a value into the row of the unit you have and press Convert, or press Enter inside the field: the other six rows are filled with the same duration, and the row you typed in keeps exactly your text. Clear all empties the seven fields of this converter and leaves the site search box in the header alone. Everything is calculated in this browser, so the page keeps working offline and nothing you type is uploaded.

The seven rows are milliseconds, seconds, minutes, hours, days, weeks and a 365-day year. One year is 31536000 seconds, one week is 604800, one day is 86400, one hour is 3600, one minute is 60 and one second is 1000 milliseconds. There is no month row because a calendar month is 28 to 31 days long; the year row uses the fixed 365-day factor the page documents, not a calendar year.

  1. Type the number into the row of the unit you already know, for example hours. A comma is reported as a mistake instead of being deleted: write 1.5, not 1,5. Exponent notation such as 1e3 is accepted too.
  2. Press Convert in that row, or press Enter in the field. The remaining six rows are filled with the same duration, and the row you typed in keeps your text so the cursor does not jump.
  3. Read the rows you need. Each value is rounded to twelve significant digits, so one minute reads 60 seconds and 0.000694444444444 days instead of a tail of binary noise.
  4. Values below 1e-6 or at 1e12 and above are printed in exponent notation: 1 millisecond is 3.17097919838e-11 years, and 365 years is 1.151064e13 milliseconds.
  5. Press Clear all to empty the seven fields, or correct the input. When a value cannot be read, the status line under the converter names the reason instead of leaving the row silently unchanged.

Factors, rounding and rejected input

What each row means and where the factors come from

The converter changes a duration, not a date: there is no calendar here, no time zone and no daylight-saving rule. The factors are exact and come from the definitions: one minute is exactly 60 seconds, one hour 3600 seconds, one day 86400 seconds, one week 7 days, and the year row is exactly 365 days = 31536000 seconds.

Because the year row is a fixed 365-day factor, one year here is not a leap year (366 days) and not the average Gregorian year (365.2425 days). The same care explains the missing month row: a month lasts 28 to 31 days, so there is no single factor to offer.

Reading the result without invented digits

Each result is rounded to twelve significant digits before it is written into the field. 7 days is exactly 1 week and 365 days is exactly 1 year, so those two rows no longer show 0.9999997 or 0.9999905, and one minute is 60 seconds rather than 59.9999988.

Very small values are printed in exponent notation instead of a long row of zeros: 1 millisecond is 3.17097919838e-11 years and 1.15740740741e-8 days. Exponent notation such as 1e3 can be typed into any field as well.

Input the converter rejects, and why

A decimal comma is reported instead of deleted: the older field turned 1,5 into 15 because the filter removed every character outside 0-9 and the point. A negative duration is refused with a message, an unreadable string such as 1.2.3 is named in the status line, and an empty field asks for a value.

Numbers are held as IEEE 754 doubles, so integers are exact up to 2^53 (9007199254740992) and about 15 to 17 significant digits survive beyond that. If a value has to stay exact to the millisecond at that size, convert it with a tool that uses arbitrary-precision arithmetic.

Recent tools: