On this page
How many seconds in a day?
How many seconds in a day comes down to one multiplication: a day is 24 hours, an hour is 60 minutes, a minute is 60 seconds, so 24 x 60 x 60 = 86,400 seconds.
Because the factors are fixed, everything above and below a day falls out of the same arithmetic. A week is 7 x 86,400. A common year is 365 x 86,400. These are the numbers worth memorising if you work with timestamps.
| Unit | Seconds | How it is derived |
|---|---|---|
| Minute | 60 | base unit |
| Hour | 3,600 | 60 x 60 |
| Day | 86,400 | 24 x 3,600 |
| Week | 604,800 | 7 x 86,400 |
| Common year (365 days) | 31,536,000 | 365 x 86,400 |
| Leap year (366 days) | 31,622,400 | 366 x 86,400 |
Why is a day 86,400 seconds?
The 24 and the 60s are inherited, not derived. Dividing the day into 24 hours goes back to ancient Egypt, and splitting hours and minutes into 60 parts comes from Babylonian base-60 counting. Nothing about the Earth forces those choices.
The second, though, used to be defined the other way around: it was 1/86,400 of a mean solar day. Since 1967 the SI second has been defined by atomic physics instead, as 9,192,631,770 periods of the radiation from a specific transition in caesium-133, which you can read about at the BIPM.
That swap is the root of every exception below. The second is now a fixed physical quantity, while the Earth's rotation wobbles by a millisecond or two per day and drifts over decades. The two no longer stay in step on their own.
A solar day is one rotation relative to the Sun, roughly 86,400 seconds. A sidereal day is one rotation relative to the distant stars, about 86,164 seconds, or 23 hours 56 minutes 4 seconds. The four-minute gap exists because the Earth also moves along its orbit, so it has to turn slightly further each day to face the Sun again. Astronomy software cares; calendars do not.
When does a day not have 86,400 seconds?
Three situations break the rule, and each breaks it in a different layer: the local clock, the global time standard, and the calendar itself.
Daylight saving days with 23 or 25 hours
Twice a year, in most places that observe daylight saving time, a local day is short or long. A spring-forward day runs 23 hours, or 82,800 seconds. An autumn day runs 25 hours, or 90,000 seconds.
Not every shift is a full hour. Lord Howe Island in Australia shifts by 30 minutes, producing local days of 84,600 and 88,200 seconds. The current rules for every zone live in the IANA time zone database, which is the source your operating system and language runtime actually read.
Leap second days with 86,401 seconds
UTC keeps civil time within 0.9 seconds of the Earth's rotation by occasionally inserting an extra second. On those days the clock reads 23:59:60 before rolling to midnight, so the UTC day is 86,401 seconds long. Twenty-seven leap seconds have been added since 1972, all positive, the most recent at the end of 31 December 2016. Announcements come from the IERS, and the 2022 General Conference on Weights and Measures resolved to stop the practice by or before 2035. Our guide on what a leap second is lists every one of them.
Can a whole day disappear from the calendar?
Yes, locally. When Samoa moved to the west side of the International Date Line at the end of 2011, the local calendar jumped from 29 December straight to 31 December. For anyone on the islands, 30 December 2011 had zero seconds in it. Nothing broke physically, but any system computing "days between two dates" by counting calendar squares got a different answer than one counting elapsed seconds.
Does Unix time always use 86,400 seconds?
Yes, by definition. POSIX specifies "Seconds Since the Epoch" with a formula built on 86,400 seconds per day plus a fixed day count for years and months, which you can read in The Open Group Base Specifications. A Unix timestamp therefore has no way to express 23:59:60.
The practical result: to convert a Unix timestamp to a UTC date you divide by 86,400 and you are done, no leap second table required. The cost is that a Unix timestamp is not a true count of elapsed SI seconds since 1970. It is behind by every leap second since 1972, and during a leap second the same timestamp value is either repeated for two seconds or stretched, depending on how the operator handles it. Large cloud providers commonly smear the extra second across the surrounding hours so that no clock ever goes backwards.
You can watch the count itself on the live epoch clock, which ticks the current Unix timestamp in seconds, milliseconds and hex alongside your local time and UTC, and marks milestone values such as 1000000000 and the 32-bit limit 2147483647.
How many seconds in a year?
A common year of 365 days holds 31,536,000 seconds. That is the figure most people mean when they ask how many seconds in a year, and it is accurate for three years out of four.
How many seconds in a leap year?
A leap year adds 29 February, so 366 x 86,400 = 31,622,400 seconds, exactly 86,400 more. A year is a leap year when it is divisible by 4, except century years, which must be divisible by 400. That is why 1900 was not a leap year and 2000 was. The leap year checker tests any year against that rule, shows whether February has 28 or 29 days, and lists every leap year in a range you choose.
For averages across many years, two other definitions matter. The mean Gregorian calendar year is 365.2425 days, because the 400-year cycle contains 97 leap days. The Julian year, used widely in astronomy and in software that wants a simple constant, is 365.25 days.
| Definition of a year | Days | Seconds |
|---|---|---|
| Common year | 365 | 31,536,000 |
| Leap year | 366 | 31,622,400 |
| Mean Gregorian year | 365.2425 | 31,556,952 |
| Julian year | 365.25 | 31,557,600 |
The Julian figure is not academic. Our date difference calculator reports the "years" total by dividing the elapsed milliseconds by a 365.25-day year, which is why a span of exactly 365 days shows as 1.00 years rather than a suspiciously round number.
How many minutes in a year?
A common year contains 525,600 minutes, the number the musical Rent made famous, and a leap year contains 527,040. Divide either by 1,440 to get back to days, or multiply by 60 to get back to seconds.
How many seconds have you been alive?Enter a birth date and watch the second count tick liveHow many seconds in a month?
There is no single answer, because a month is not a fixed unit. Depending on which month and which year, it ranges from 2,419,200 to 2,678,400 seconds.
| Month length | Seconds | Which months |
|---|---|---|
| 28 days | 2,419,200 | February, common years |
| 29 days | 2,505,600 | February, leap years |
| 30 days | 2,592,000 | April, June, September, November |
| 31 days | 2,678,400 | January, March, May, July, August, October, December |
| Average Gregorian month | 2,629,746 | 30.436875 days |
In code, 2,592,000 seconds (30 days) is a common stand-in for "a month" in cookie lifetimes and cache windows, and that is fine when the value is a duration. It is wrong when the value is a date. "One month after 31 January" is a calendar question, not an arithmetic one, and adding 2,592,000 seconds answers something else entirely. The date add and subtract calculator shifts calendar fields such as years and months and clock fields such as hours, minutes and seconds, all in local time, and returns the result as a local date, an ISO string and a Unix timestamp.
Why does adding 86,400 seconds break dates?
Adding 86,400 to a timestamp always advances exactly 24 hours of real time. It does not always advance the local clock to the same time tomorrow. Take 7 March 2026 at noon in New York, the day before that year's spring-forward.
1772902800 -> 2026-03-07 12:00 EST
+ 86400
1772989200 -> 2026-03-08 13:00 EDT
Twenty-four hours later, the wall clock says 13:00. A daily reminder built this way drifts by an hour twice a year. The reverse mistake is just as common: treating "tomorrow at noon" as a guaranteed 86,400 seconds away when billing or rate limiting, on a day that actually holds 82,800.
The fix is to pick the right question first. For durations, timeouts, rate limits and "how long did this take", stay in epoch seconds where every day is 86,400 and no zone rules apply. For anything a human reads on a calendar, do the arithmetic with a time zone aware date library and let it consult the zone rules. Never convert between the two by multiplying days by 86,400.

Count the exact seconds between two dates
Enter two dates and times, or paste two Unix timestamps, and get the span in years, months, weeks, days, hours, minutes and seconds, plus the raw timestamp difference in seconds. Every value copies with one click.
Frequently asked questions
A standard day has 86,400 seconds, calculated as 24 hours x 60 minutes x 60 seconds. That is also 1,440 minutes. Unix timestamps always use exactly 86,400 seconds per day, so dividing a timestamp by 86,400 gives whole days since 1 January 1970.
A common year of 365 days has 31,536,000 seconds, and a leap year of 366 days has 31,622,400. Over long spans, use the mean Gregorian year of 365.2425 days, which is 31,556,952 seconds, or the Julian year of 365.25 days, which is 31,557,600 seconds.
A common year has 525,600 minutes and a leap year has 527,040. Both come from 1,440 minutes per day multiplied by 365 or 366 days. Divide by 60 for hours, or multiply by 60 for seconds, since neither factor changes between years.
Yes. A local day across a daylight saving change usually runs 23 hours (82,800 seconds) or 25 hours (90,000 seconds). A UTC day with a leap second runs 86,401 seconds, which last happened on 31 December 2016. Unix timestamps represent neither case.
Between 2,419,200 seconds for a 28-day February and 2,678,400 for a 31-day month. A 30-day month is 2,592,000 seconds, which software often uses as a generic month. The average Gregorian month is 30.436875 days, or 2,629,746 seconds.

