Value Converter
Free Time Converter Online
Convert any time value between seconds, minutes, hours, days, weeks, months and years instantly.
What is a time converter?
A time converter is a tool that translates a duration expressed in one unit — seconds, minutes, hours, days, weeks, or years — into all the equivalent values in other units simultaneously. Instead of doing sequential mental arithmetic or chaining multiple calculations, you enter a single value and instantly see the complete picture.
This might sound trivial, but time unit conversions are one of the most error-prone calculations in software development. Mixing up seconds and milliseconds causes bugs that only surface in production. Miscounting days in a multi-week deadline leads to missed deliveries. Entering a cache TTL in minutes instead of seconds silently breaks cache behavior. A reliable converter eliminates these mistakes.
This converter is entirely browser-based. Every conversion runs locally in your JavaScript engine — nothing is sent to a server, and results appear instantly as you type, with no button to press.
Time units explained
Understanding the precise relationship between time units prevents bugs and miscommunication. Here are the exact definitions used by this converter:
1 second = 1 sThe SI base unit of time. Defined by the International System of Units as 9,192,631,770 oscillations of a caesium-133 atom. All other units in this converter are derived from the second.
1 minute = 60 sExactly 60 seconds. The minute is not an SI unit but is accepted for use with it. A minute of arc (1/60 of a degree) shares the name but is unrelated to time.
1 hour = 3,600 sExactly 60 minutes or 3,600 seconds. Hours are used universally for scheduling, work durations, and speed calculations (km/h, mph).
1 day = 86,400 sExactly 24 hours or 86,400 seconds. A solar day is the time between successive solar noons — very close to 86,400 s but not identical due to Earth's orbital variation. For timekeeping, a day is defined as exactly 86,400 seconds.
1 week = 604,800 sExactly 7 days or 604,800 seconds. The 7-day week is almost universal in modern calendars, derived from ancient Babylonian astronomy and adopted into the Julian and Gregorian calendars.
1 year = 31,536,000 sThis converter uses 365 days (31,536,000 seconds) as one year — the standard non-leap year. A tropical year (one orbit of the Earth) is 365.2422 days. The Gregorian calendar's leap year system averages 365.2425 days per year over 400 years.
Time conversion for developers
Time unit conversions come up constantly in software engineering. These are the most common scenarios where a quick, accurate converter is invaluable:
Quick reference: seconds in common durations
These values appear so frequently in software that many developers memorise them. Bookmark this section or use the converter above whenever you need them.
| Duration | Seconds | Minutes | Hours |
|---|---|---|---|
| 1 minute | 60 | 1 | 0.0167 |
| 5 minutes | 300 | 5 | 0.0833 |
| 15 minutes | 900 | 15 | 0.25 |
| 30 minutes | 1,800 | 30 | 0.5 |
| 1 hour | 3,600 | 60 | 1 |
| 6 hours | 21,600 | 360 | 6 |
| 12 hours | 43,200 | 720 | 12 |
| 1 day | 86,400 | 1,440 | 24 |
| 3 days | 259,200 | 4,320 | 72 |
| 1 week | 604,800 | 10,080 | 168 |
| 2 weeks | 1,209,600 | 20,160 | 336 |
| 30 days | 2,592,000 | 43,200 | 720 |
| 90 days | 7,776,000 | 129,600 | 2,160 |
| 1 year (365 d) | 31,536,000 | 525,600 | 8,760 |
SLA uptime: what "nines" mean in downtime minutes
Service Level Agreements express reliability as a percentage of uptime. The table below shows how many minutes and hours of allowed downtime correspond to each SLA level per year — useful for understanding what your uptime commitment actually means in practice.
| Uptime SLA | Downtime / year | Downtime / month | Downtime / week |
|---|---|---|---|
| 99% (2 nines) | 3 d 15 h 36 m | 7 h 18 m | 1 h 41 m |
| 99.5% | 1 d 19 h 48 m | 3 h 39 m | 50 m 24 s |
| 99.9% (3 nines) | 8 h 45 m 57 s | 43 m 49 s | 10 m 4 s |
| 99.95% | 4 h 22 m 58 s | 21 m 54 s | 5 m 2 s |
| 99.99% (4 nines) | 52 m 35 s | 4 m 22 s | 1 m 0 s |
| 99.999% (5 nines) | 5 m 15 s | 26 s | 6 s |
Based on 365.25 days per year average (accounting for leap years).
Tips for accurate time calculations
In application code, store time durations as a single integer in the smallest relevant unit (seconds for most use cases, milliseconds for high-resolution timing). Convert to human-readable units only at the presentation layer. This prevents accumulation of rounding errors.
Calendar months range from 28 to 31 days. For billing, subscription, and financial calculations, use calendar-aware date libraries (date-fns, Luxon, Temporal) instead of fixed-day approximations. An off-by-one-day error compounds over 12 months.
Elapsed time (duration) is a count of seconds. Calendar time is a specific point on a timeline. A "90-day trial" is an elapsed duration; "the trial ends on July 4th" is a calendar point. Confusing them leads to timezone and daylight saving bugs.
International timekeeping occasionally inserts a "leap second" to keep UTC synchronized with Earth's rotation. Between 1972 and 2016, 27 leap seconds were added. For durations spanning decades, this may be relevant — but for most software, treating a day as exactly 86,400 seconds is correct.
Store all timestamps as UTC Unix time (seconds since 1970-01-01T00:00:00Z). Convert to local time only when displaying to a user. This ensures your data is timezone-unambiguous and immune to daylight saving transitions.
Milliseconds, microseconds, and nanoseconds in software
This converter covers seconds to years — the units you use when discussing durations in human terms. But software also works with sub-second units that are critical for performance measurement, timestamps, and high-frequency operations:
1 s = 1,000 msUsed in: JavaScript Date.now(), setTimeout/setInterval arguments, HTTP response time logging, animation frame budgets (16ms per frame at 60 fps), database query timeouts, Redis TTL in some clients.
1 s = 1,000,000 μsUsed in: Linux system call latency, CPU cache miss cost, network packet round-trip within a data center, performance.now() in browsers (1μs resolution), PostgreSQL query planning statistics.
1 s = 1,000,000,000 nsUsed in: CPU clock cycles (a 3GHz CPU executes one cycle in ~0.33 ns), memory access latency (L1 cache: ~1ns, RAM: ~100ns), Go time.Duration, Java System.nanoTime(), high-frequency trading timestamps.
The most dangerous unit mismatch in web development is seconds vs milliseconds. Unix timestamps are in seconds; JavaScript's Date.now() returns milliseconds; many APIs (including AWS and Stripe webhooks) use seconds; but setTimeout() uses milliseconds. Always check the unit before using a numeric timestamp, and name your variables accordingly: expiresAtSeconds vs delayMs.
For performance measurement in Node.js, prefer process.hrtime.bigint() over Date.now() — it returns nanoseconds as a BigInt and is not affected by system clock adjustments. In the browser, use performance.now() for sub-millisecond resolution.
FAQ
Common questions
How many seconds are in a day?
There are exactly 86,400 seconds in a day. This comes from 60 seconds × 60 minutes × 24 hours = 86,400 seconds.
How many seconds are in a year?
A standard (non-leap) year contains 31,536,000 seconds (365 days × 86,400 seconds/day). A leap year has 31,622,400 seconds (366 × 86,400). This converter uses 365 days for a standard year.
How many weeks are in a year?
A year has exactly 52 weeks and 1 extra day (2 in a leap year). The average across the 400-year Gregorian calendar cycle is 52.1775 weeks per year.
Why is a month not shown as a conversion unit?
Months are not a fixed-length unit — they range from 28 to 31 days. For precise calculations, days or weeks are always preferred. If you need months, use 30.4375 days as the average (365.25 ÷ 12).
Does this converter account for leap years?
The converter uses 365 days per year as the standard. For calculations spanning multiple years where leap years matter, add 1 day every 4 years (roughly 0.0068% correction).
How do I convert seconds to hours in code?
Divide by 3,600 (60 × 60). For example: hours = seconds / 3600. In most languages, use integer division if you want whole hours: hours = Math.floor(seconds / 3600).
What is the difference between a day and 86,400 seconds in practice?
For most purposes they are identical. However, some days have 86,401 seconds due to leap seconds inserted by international timekeeping standards (UTC). For software, it is almost always safe to treat a day as exactly 86,400 seconds.
Can I use this converter for programming cache TTLs?
Yes — this is one of the most common use cases. Many caches (Redis, HTTP headers, CDNs) require TTL in seconds. Enter the number of days, hours, or weeks and read off the seconds value directly.
More in Value Converter