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
- Pick the unit you have and the unit you want.
- Type the duration in either box.
- 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.
Related tools
- Date difference and day-counter calculatorDays, weeks, months and business days between two dates, or add and subtract days, with Mon–Fri or Sun–Thu work weeks.
- Convert Unix timestamps to dates (and back)Convert a Unix timestamp to a date or a date to a timestamp; shows UTC, local time, ISO 8601 and relative time.
- Unit converterConvert length, weight, area, volume, temperature, speed, pressure, energy, power, data, fuel economy and time with exact factors.
- Data storage converter (decimal and binary)Bytes, kB/MB/GB/TB (decimal) and KiB/MiB/GiB/TiB (binary), plus bits, kilobits, megabits and gigabits.
- Energy converterJoules, kilojoules, calories and kilocalories, watt-hours and kWh, BTU, foot-pounds and electronvolts.