Skip to content
Utilboxes

Time Converter

Convert durations between nanoseconds and years, with every unit visible at once.

Runs entirely in your browser

How to use the Time Converter

  1. 1Type a value into any box — every other unit updates as you type.
  2. 2Use the swap button to flip the two headline units.
  3. 3Copy any result with the button beside it.
  4. 4Adjust the decimal places if you need more or less precision.

How it works

Everything up to a week is exact and unambiguous: a minute is 60 seconds, an hour 3,600, a day 86,400, a week 604,800.

Above a week it gets fuzzy, and it is worth being explicit about the choice made here. A year is taken as 365.2425 days — the Gregorian average, which accounts for the leap-year rules — and a month as one twelfth of that, about 30.44 days. That is why converting 1 month to days gives 30.44 rather than a whole number: there is no single correct answer, so the average is used. For real calendar arithmetic on specific dates, use the age calculator instead.

Conversion works by taking your value to a single base unit and then out again, so every pair of units is consistent with every other. Values are calculated at full double precision and only rounded for display, which means round-tripping a number through two conversions returns what you started with.

The formula

value in target = (value × seconds per source unit) ÷ seconds per target unit
second
the base unit every duration is defined against
year
taken as 365.2425 days, the Gregorian mean
month
taken as one twelfth of a mean year

Frequently asked questions

How many seconds are in a day?
86,400 — that is 24 hours × 60 minutes × 60 seconds.
Why is a month 30.44 days here?
Because calendar months are 28 to 31 days long, so any single conversion has to use an average. 30.44 days is one twelfth of a mean Gregorian year.
How do I work out the time between two dates?
Use the age calculator, which counts real calendar days including leap years, rather than averaging.
How accurate are these conversions?
Sub-day units are exact. Months and years are averages, since calendar months vary in length. All arithmetic is done at full precision and rounded only when displayed, so results are exact to the digits shown.