Skip to content
GivenTool

Time unit converter

Nanoseconds to centuries: seconds, minutes, hours, days, weeks, average months and Gregorian years.

Loading tool…

Convert durations between any two units, from nanoseconds (CPU timings) and milliseconds (API timeouts, video frames) up to years and centuries. Minutes, hours, days and weeks are exact: 1 day = 86,400 s, 1 week = 604,800 s.

Months and years are not fixed lengths, so this converter uses the averages of the Gregorian calendar: a year of 365.2425 days (the 400-year cycle has 97 leap years) and a month of one twelfth of that, 30.436875 days. That is the right choice for turning "18 months" into days on average, but not for counting days between two dates; use the date difference calculator for that. Leap seconds are ignored.

Programmers often need milliseconds: 1 hour = 3,600,000 ms, and a Unix timestamp counts seconds since 1970-01-01 (see the timestamp converter).

How to use it

  1. Pick the unit you have and the unit you want.
  2. Type the duration in either box.
  3. Use the table for common durations.

Frequently asked questions

How many seconds are in a year?

An average Gregorian year is 31,556,952 s (365.2425 days). A common 365-day year is 31,536,000 s and a leap year 31,622,400 s.

How long is a month in this converter?

30.436875 days, the average Gregorian month (365.2425 ÷ 12). Real months have 28 to 31 days.

How many hours are in a week?

168 hours (7 × 24), or 10,080 minutes.

Can I add or subtract dates here?

No, this converts durations only. To count days between two dates, or add days to a date, use the date difference calculator.