Time unit converter
Convert seconds, minutes, hours, days, weeks, months and years.
| Seconds (s) | - |
|---|---|
| Minutes (min) | - |
| Hours (h) | - |
| Days (day) | - |
| Weeks (week) | - |
| Months | - |
| Years | - |
Months and years are approximations based on averages (month≈30.44 days, year≈365.25 days).
A cache timeout is set to 604,800 seconds and you want to know whether that is a week. A contract runs for 18 months and you need it in days. Durations are easy to state and awkward to compare. Enter one value with its unit and every other unit fills in at the same time.
How it works
How to use it
Enter a number in Value and choose its Unit. The table beneath shows the same duration expressed in seconds, minutes, hours, days, weeks, months and years. Any of the seven can be the input, so it works in both directions — 90 minutes into hours, or 2.5 years into days.
The conversion chain
The short units are exact and follow directly from one another:
| Relationship | Value |
|---|---|
| 1 minute | 60 seconds |
| 1 hour | 60 minutes (3,600 s) |
| 1 day | 24 hours (86,400 s) |
| 1 week | 7 days (604,800 s) |
Everything is converted through seconds internally, so a value entered in weeks is turned into seconds first and then divided out into the other units.
Months and years are averages
Calendar months are 28 to 31 days long and years are occasionally 366 days, so there is no single exact value. This tool uses the standard averages:
- 1 month ≈ 30.44 days (365.25 ÷ 12)
- 1 year ≈ 365.25 days, which spreads the leap day across a four-year cycle
That makes results in months and years approximate. For durations that must land on a specific calendar date — a notice period, a deadline, an anniversary — count on a calendar or use a date calculator instead, because the answer depends on which months the span actually crosses.
Terms explained
- Second (s)
- The SI base unit of time and the value every other unit here is converted through.
- Week
- Exactly 7 days, or 604,800 seconds. A common unit for timeouts and cache lifetimes.
- Month (≈30.44 days)
- An average month, taken as 365.25 ÷ 12. Real calendar months range from 28 to 31 days.
- Year (≈365.25 days)
- An average year that spreads one leap day over four years, so it is a quarter-day longer than 365.
- Leap year
- A year with 366 days, occurring in most years divisible by four. It is the reason a year is averaged rather than fixed.
Frequently asked questions
How many seconds are in a day?
86,400 seconds — 24 hours multiplied by 3,600 seconds per hour. A week is seven times that, or 604,800 seconds, which is a value you will often see in cache and session settings.
Why is a month treated as 30.44 days rather than 30?
Because 30 would drift. Dividing an average year of 365.25 days by twelve gives 30.4375, usually rounded to 30.44. Using a flat 30 would lose about five days per year, which becomes noticeable over longer spans.
Why is a year 365.25 days instead of 365?
The extra quarter-day is the leap day, averaged out across a four-year cycle. It gives a more accurate result for multi-year spans than a flat 365, though it is still an approximation over very long periods.
Can I use this to work out a specific date?
Not reliably. The month and year figures are averages, so converting "6 months" to days will not tell you the exact calendar date six months from today — that depends on which months the period crosses. Use a date or D-day calculator for calendar arithmetic.
Does the converter handle decimals?
Yes. Values such as 1.5 hours or 2.5 years convert normally, since every input is turned into seconds before being expressed in the other units.
Tell us what went wrong and we'll fix it fast. (Leave an email if you'd like a reply.)