How Many Seconds in a Day, Week, and Year
Some numbers are useful to just know.
How many seconds in a day is one of them. It comes up in programming, physics problems, data science, and the occasional trivia game. It is also the kind of thing where people either remember the number or spend five minutes recalculating it from scratch.
This article gives you the numbers, shows the math behind each one, and explains where these conversions actually matter in practice.
If you need to convert between other time units quickly, the Time Unit Converter handles seconds, minutes, hours, days, weeks, months, and years.
How Many Seconds in a Day
There are 86,400 seconds in a day.
The math is simple:
- 60 seconds × 60 minutes = 3,600 seconds per hour
- 3,600 seconds × 24 hours = 86,400 seconds per day
That number — 86,400 — is worth memorizing if you do any work with time in programming or data. It shows up constantly in cache TTLs, token expiry windows, log rotation schedules, and time calculations.
A common use: "give this cache entry a 24-hour TTL." In code, that is 86,400 seconds if your system uses seconds, or 86,400,000 milliseconds if you are working in JavaScript.
How Many Seconds in a Week
There are 604,800 seconds in a week.
- 86,400 seconds/day × 7 days = 604,800 seconds
A week is 168 hours, which is 10,080 minutes, which is 604,800 seconds.
This one comes up in contexts like scheduled jobs ("run this task every 7 days"), token expiry ("refresh tokens expire after one week"), and subscription periods ("trial lasts 7 days from sign-up").
How Many Seconds in a Month
A month is trickier because months are not all the same length.
If you need an exact count:
- A 28-day month = 2,419,200 seconds
- A 29-day month = 2,505,600 seconds
- A 30-day month = 2,592,000 seconds
- A 31-day month = 2,678,400 seconds
For an average month (using 30.4375 days, which is 365.25 ÷ 12):
30.4375 × 86,400 = 2,629,800 seconds
In most practical scenarios, when people say "one month" in code or calculations, they mean one of:
- exactly 30 days (2,592,000 seconds)
- the actual calendar month, calculated from a start date
- the average of 30.4375 days
Which one you use depends on the context. For billing and subscriptions, calendar months are usually more appropriate. For cache TTLs or "roughly a month," 30 days is fine.
How Many Seconds in a Year
There are 31,536,000 seconds in a standard 365-day year.
- 86,400 seconds/day × 365 days = 31,536,000 seconds
If you want to account for leap years (which add one day every 4 years, roughly), use 365.25 days as the average:
- 86,400 × 365.25 = 31,557,600 seconds
That second number is what you'll see in astronomy and precise scientific calculations. For most everyday purposes, 31,536,000 is close enough.
To put it in perspective: a billion seconds is roughly 31.7 years. The Unix timestamp crossed 1 billion seconds in September 2001 and 2 billion seconds will arrive in May 2033.
Quick Reference Table
| Period | Seconds |
|---|---|
| 1 minute | 60 |
| 1 hour | 3,600 |
| 1 day | 86,400 |
| 1 week | 604,800 |
| 30-day month | 2,592,000 |
| Average month | 2,629,800 |
| 365-day year | 31,536,000 |
| 366-day year (leap) | 31,622,400 |
| Average year (365.25 d) | 31,557,600 |
The Formula for Any Time Conversion
Every time unit conversion comes down to multiplication or division by the same fixed factors:
- Seconds → minutes: divide by 60
- Minutes → hours: divide by 60
- Hours → days: divide by 24
- Days → weeks: divide by 7
Working in the other direction, multiply instead.
To go from seconds directly to days, divide by 86,400 (which is 60 × 60 × 24). To go from seconds to weeks, divide by 604,800.
Where This Comes Up in Real Life
Programming and systems work
Cache TTLs, session expiry, and API rate limits are often expressed in seconds. Knowing that a day is 86,400 seconds and a week is 604,800 makes it quick to write correct values without calculating each time.
A common mistake: confusing seconds and milliseconds. JavaScript works in milliseconds, so Date.now() returns a 13-digit number. Most server-side systems use seconds (10 digits). If you pass a milliseconds value to a function expecting seconds, you end up with expiry times set 1,000 years in the future.
Physics and science
Velocity, acceleration, and energy calculations often require converting times to seconds for dimensional consistency. A speed of 100 km/h needs to be expressed in metres per second (27.8 m/s) to work cleanly with SI units.
Fitness and biology
Resting heart rate for a healthy adult is roughly 60–100 beats per minute, which is 86,400–144,000 heartbeats per day. The average person takes around 17,000–23,000 breaths per day. These kinds of numbers become useful when thinking about cumulative biological processes.
Project planning
"How long is this project?" can translate to seconds when you are thinking about system uptime, SLA guarantees, or deployment windows. A 99.9% uptime SLA means at most 31,536 seconds of downtime per year — about 8.76 hours.
Converting the Other Direction: Seconds to Larger Units
If you have a duration in seconds and want to express it in days and hours:
1. Divide the total seconds by 86,400 to get the number of full days 2. Take the remainder and divide by 3,600 to get the remaining hours 3. Take that remainder and divide by 60 for minutes 4. Whatever is left is seconds
Example: 200,000 seconds
- 200,000 ÷ 86,400 = 2 days remainder 27,200
- 27,200 ÷ 3,600 = 7 hours remainder 2,000
- 2,000 ÷ 60 = 33 minutes remainder 20 seconds
So 200,000 seconds = 2 days, 7 hours, 33 minutes, 20 seconds.
The Time Unit Converter does this instantly if you would rather not work through the arithmetic manually.
A Note on Leap Seconds
Occasionally, a "leap second" is added to UTC to account for irregularities in the Earth's rotation. This means some years have had 31,536,001 or 31,557,601 seconds. Leap seconds have been added about 27 times since 1972.
For most practical purposes, leap seconds are irrelevant. But in high-precision timing systems — GPS, financial exchanges, telecommunications — they matter and have caused real bugs when software did not handle the extra second correctly.


