Cache lifetimes are configured in seconds, progress reports are written in days, and subscription lengths are quoted in months — and nobody remembers the numbers in between (86400, 604800, 2592000). This converter moves between milliseconds, seconds, minutes, hours, days, weeks, months and years, with the second as its base. One thing to establish up front: **a month here is always 30 days and a year always 365**, an estimating convention rather than a calendar, so any question about *which date* is outside what it can answer. Conversion happens in the browser and your figures are not submitted anywhere, while the page itself loads third-party resources such as advertising like every other page here.
How to use it
- Enter a number in the Value field, which starts at 1. Decimals are accepted — 0.5 days, for instance.
- The From unit dropdown offers eight entries from Year down to Millisecond and starts on Second. Choose the unit your number is already in.
- The grid lists all seven remaining units at once, each with a copy button. To turn 30 days into seconds, pick Day and enter 30; the Second card reads 2592000.
- The reverse works the same way: enter 604800 with Second selected and the Day card shows 7. Changing units does not clear the value.
- With the field empty every card shows a dash, and the copy button then returns an empty string.
When it comes in handy
Produce the number of seconds a config file wants
HTTP Cache-Control: max-age, the cookie Max-Age attribute, JWT lifetimes and Redis EXPIRE are all specified in seconds. A week is 604800, thirty days is 2592000, an hour is 3600. Decide how long you want, convert, and paste the number straight in.
Describe a long-running job in human terms
A batch that took 100000000 milliseconds and a training run of 500000 seconds become 1.157407407 days and 5.787037037 days respectively. Days or hours make a far better line in a report than a long string of milliseconds.
Work out the downtime an SLA allows
Availability targets are calculated against a 365-day year, which is precisely the convention this tool uses. For 99.9%, enter 0.001 with Year selected and the Hour card reads 8.76; for 99.99%, enter 0.0001 and get 0.876 hours, or 52.56 minutes.
Sketch out subscriptions, leases and project timelines
An 18-month contract is 1.479452055 years, and six months is 180 days. Fixed month lengths are perfectly adequate for "roughly how long" conversations. The moment an expiry date has to go into a contract, switch to real calendar arithmetic.
Limits and behavior
- **A month is always 30 days and a year always 365.** That is an estimating convention, not any calendar in use: real months run from 28 to 31 days, and every fourth year has 366. The direct consequence is that the table is not internally consistent — one year converts to **12.16666667** months, while twelve months converts to just **0.9863013699** years, so a round trip does not return you to where you started. Neither figure is a bug; they are 365 ÷ 30 and 360 ÷ 365.
- By the same arithmetic, a year is 52.14285714 weeks rather than 52, and a month is 4.285714286 weeks. The seven-day week is not in dispute; months and years are where the trouble always lives.
- Nothing here is date-aware: leap years, uneven month lengths, time zones, daylight saving and quarter-end boundaries are all out of scope. For "what date is three months from now" or "how many days between these two dates", use the epoch converter in the developer section, which works with actual instants.
- The finest unit is the millisecond. Microseconds and nanoseconds are absent, so divide µs by 1000 or ns by 1,000,000 before entering them as milliseconds. At the other end there are no decades or centuries either, but those are an easy multiplication.
- This is not a duration parser. The field takes a single number, so
01:30:00,1h30mand "90 minutes" will all be rejected — split them into a number and a unit yourself first. - Very small results appear in scientific notation: a millisecond in years shows as
3.170979e-11, being below 10⁻¹⁰, and a second in years as3.170979198e-8. That is a formatting threshold rather than a shortage of precision.
Frequently asked questions
Why is one year 12.16666667 months instead of 12?
Because the two units are defined independently rather than derived from each other. A year is defined as 365 days and a month as 30, and 365 ÷ 30 is 12.1666…, not 12. Going back, twelve months is only 360 days, which is 0.9863013699 of a year. A real calendar year does contain twelve months averaging 30.44 days each, but the moment you pin a month at 30 days this inconsistency is unavoidable — it appears in every tool that uses a fixed month. The practical workaround: when an estimate has to cross both the month and the year level, convert everything to days first and the discrepancy stops chasing you.
A contract says "three months". Can I use the 90 days this gives me?
For an estimate, yes; for the contract itself, no. Three months here is exactly 90 days, but a real three months runs from 89 to 92 depending on where you start: from 1 January it is 90 days in a common year, from 1 March it is 92 — a two-day spread. Legal documents usually mean the same day-of-month three months later anyway, with their own rules for awkward starting dates such as 31 January. For an expiry date that has to hold up, use a real calendar or the epoch converter rather than a fixed 30-day month.
Are microseconds and nanoseconds available? I am reading profiler output.
No — milliseconds are the finest unit offered. Profilers, tracing systems and hardware datasheets work in µs (a thousandth of a millisecond) and ns (a millionth), so divide before entering: 1500 µs is 1.5 ms, and 250 ns is 0.00025 ms. Worth noting alongside this: microsecond timestamps, the default precision in Postgres and several tracing systems, are frequently mistaken for milliseconds, which is another classic thousand-fold error.
What number of seconds do I put for a 30-day cookie or token?
2592000. Enter 30 with Day selected and read the Second card. Other values worth memorising: an hour is 3600, a day 86400, a week 604800 and a year 31536000. These settings are defined in fixed elapsed seconds in the first place — Max-Age literally means "this many seconds from now" — so the numbers here drop in without any calendar caveat. The thing to avoid is confusing it with Expires, which wants an absolute point in time rather than a count of seconds.
Can I paste `01:30:00` or `1h30m`?
No, the field accepts one number and nothing else. Read 01:30:00 as 1.5 hours or 90 minutes and enter that; the same goes for 1h30m. The restriction comes from the input being a numeric field, so a string containing colons or letters cannot be entered at all. If what you actually have is a whole batch of duration strings — exported subtitles or call records, say — that is a text-processing job rather than a unit conversion, and a spreadsheet's split-column function will be far quicker.