Skip to main content
Unit ConvertersFree · no sign-up

Seconds to Years Converter

Convert seconds to years — for timestamps, uptime and anything counted in epoch seconds.

Updated

years

1.000yr

31,556,952 s = 1.000 yr

In short

How many seconds are in a year?

A Gregorian year is exactly 31,556,952 seconds, from 365.2425 days of 86,400 seconds each. A common year of 365 days is 31,536,000. The difference is 20,952 seconds, or about five and three-quarter hours, which is the leap day averaged across four years.

A Unix timestamp is not a true count of elapsed seconds: POSIX defines every day as exactly 86,400, so leap seconds are omitted from the scalar.

seconds to years — quick reference

seconds (s)years (yr)
86,400 s0.003 yr
604,800 s0.019 yr
2,592,000 s0.082 yr
31,556,952 s1.000 yr
63,113,904 s2.000 yr
157,784,760 s5.000 yr
315,569,520 s10.000 yr
631,139,040 s20.000 yr
Computed from the exact factor — rounded only for display.

The formula, worked line by line

Two exact definitions meet here. A day is 86,400 seconds, from 24 hours of 60 minutes of 60 seconds, all whole-number ratios. A Gregorian year averages 365.2425 days, because the leap rule adds a day every four years, withholds it in century years, and restores it in years divisible by four hundred.

Seconds since the Epoch is a value interpreted as the number of seconds between a given time and 1970-01-01 00:00:00 UTC, using a formula in which each day contains exactly 86,400 seconds.
IEEE Std 1003.1-2024, Base Definitions

Multiply the two and a year is exactly 31,556,952 seconds, with nothing after the decimal point. That is a coincidence of the numbers rather than a design decision, and it makes the conversion unusually tidy for a calendar quantity.

years = seconds / 31,556,952
31,556,952 = 365.2425 x 86,400
86,400 = 24 x 60 x 60
31,556,952 s -> 31,556,952 / 31,556,952 = 1 year
common year = 31,536,000 s - Julian year = 31,557,600 s
The Unix epoch runway to 2038A signed 32-bit second counter starting at 1 January 1970 overflows at 2,147,483,647 seconds, which falls on 19 January 2038.SECONDS SINCE 1 JANUARY 1970019701e920012e920332,147,483,6472038One Gregorian year = 31,556,952 seconds
Seconds since 1970, and where a signed 32-bit counter runs out.
The worked default, one year of seconds
Seconds entered
31,556,952
Seconds in a Gregorian year
365.2425 x 86,400
Division
31,556,952 / 31,556,952 = 1
Years
1.000 years

A common year is 31,536,000 seconds, which converts to 0.999 years. The 20,952-second gap between the two is five hours and forty-nine minutes — the leap day spread evenly across four years, which is exactly what the mean year is for.

Timestamps against durations

Two different things arrive as a big second count. A duration is elapsed seconds and converts straight to years. A timestamp is seconds since 1 January 1970, so dividing it gives the age of the Unix epoch, not the age of whatever you were measuring.

The same number, read two ways
1,000,000,000 as a duration
31.69 years of elapsed time
1,000,000,000 as a timestamp
9 September 2001
2,147,483,647 as a duration
68.05 years
2,147,483,647 as a timestamp
19 January 2038

The arithmetic is identical and the meaning is not. Subtract two timestamps first if what you want is a span.

Which year, and how much it matters

A common year gives 31,536,000 seconds and the Gregorian mean 31,556,952, a difference of 0.066 percent. Over a single year that is under six hours. Over a century it is 24 days, which is the entire reason the leap rule exists and why the mean year is the right divisor for any span longer than one.

How to use the seconds to years converter

A day is exactly 86,400 seconds and a Gregorian year averages 365.2425 days, so a year is exactly 31,556,952 seconds. That figure is a whole number, which is a pleasant accident: 365.2425 times 86,400 happens to come out with nothing after the decimal point.

The reason to convert is usually a machine. Uptime counters, log deltas, cache lifetimes and Unix timestamps all arrive as a raw second count, and a raw second count above a few million tells a human nothing until it is expressed in something they can picture.

31,556,952

Seconds in a Gregorian year

365.2425 x 86,400

31,536,000

Seconds in a 365-day year

20,952 fewer

31.69 years

A billion seconds

a birthday worth marking

A billion seconds is 31.69 years, which is why some people mark it as a milestone. Two billion is 63.4 years. The numbers grow slowly enough that a second count in the low billions is almost always a lifetime rather than a geological span, and that is a useful sanity check on a stray value.

For a timestamp specifically, the number is seconds since 1 January 1970 at 00:00:00 UTC, an instant POSIX defines as the Epoch. Dividing a current timestamp by 31,556,952 gives the age of the epoch rather than any span you care about, which is worth noticing before quoting the answer.

Second counts and what they are
86,400
one day
604,800
one week
31,556,952
one Gregorian year
1,000,000,000
31.69 years
2,147,483,647
the signed 32-bit limit, 19 January 2038
3,155,695,200
100 years

The 2,147,483,647 row is the only one that is a limit rather than a duration, and it is the reason a lot of old software has a deadline.

Turning a timestamp into an actual date

Dividing a timestamp gives an age, not a date. That page converts a Unix timestamp to a readable date and back, in both seconds and milliseconds.

Open the timestamp converter

Second counts converted to years, with what each quantity usually is. The rows are the values that actually turn up in logs, timestamps and specifications.

SecondsYearsWhat it is
3,6000.000 yearsone hour
86,4000.003 yearsone day
604,8000.019 yearsone week
1,000,0000.032 yearsabout 11.6 days
2,592,0000.082 yearsa 30-day month
10,000,0000.317 yearsabout 16 weeks
31,536,0000.999 yearsa 365-day year
31,556,9521.000 yearsa Gregorian year
100,000,0003.169 yearsjust over three years
315,569,52010.000 yearsa decade
1,000,000,00031.688 yearsa billion seconds
2,147,483,64768.053 yearsthe 32-bit limit, 2038
3,155,695,200100.000 yearsa century
Uses the Gregorian mean year of 365.2425 days, giving exactly 31,556,952 seconds. A common year of 365 days is 31,536,000 seconds; the Julian year of 365.25 days is 31,557,600.

The 2038 deadline is a real one

A signed 32-bit integer tops out at 2,147,483,647. Read as seconds since the Epoch, that value is 19 January 2038 at 03:14:07 UTC. The next second needs 2,147,483,648, which a signed 32-bit field cannot hold, and the counter wraps to a large negative number reading as 1901.

Current POSIX has already moved on: the 2024 edition requires time_t to be at least 64 bits in conforming programming environments, which pushes the limit far beyond any practical horizon. The problem is not the standard but the enormous quantity of deployed code and stored data that predates it.

The last representable second of a 32-bit clock
Maximum signed 32-bit value
2,147,483,647
In hexadecimal
0x7FFFFFFF
As a UTC instant
19 January 2038, 03:14:07
The next second
needs 2,147,483,648 and overflows
In years from the epoch
68.05 years

Sixty-eight years is the entire runway a signed 32-bit second counter ever had, starting in 1970. Embedded devices, file formats and databases that stored a 32-bit time field are the ones that will meet it, not modern operating systems.

The parallel with the year 2000 is imperfect but instructive. Both are storage-width problems rather than logic errors, both have a known date, and both get fixed quietly in the decade before by people replacing fields. The difference is that a 32-bit time field is often buried in firmware that nobody plans to touch.

Leap seconds, and what happens to them

UTC is kept within a tolerance of the Earth's actual rotation by occasionally inserting an extra second. Twenty-seven of them have been added since the system began in 1972, the most recent on 31 December 2016, which ran to 23:59:60 before the new year started. TAI now leads UTC by 37 seconds.

POSIX timestamps do not contain them. The standard defines seconds since the Epoch through a calendar formula in which every day is exactly 86,400 seconds, so a positive leap second gets no scalar value of its own. Applying the formula to 23:59:60 produces the same number as the following midnight.

What a timestamp difference actually measures
Leap seconds inserted since 1972
27
Most recent
31 December 2016, at 23:59:60 UTC
Current TAI minus UTC
37 seconds
Leap seconds in a POSIX timestamp
none

So a timestamp difference spanning 2016 is one second short of the real elapsed time, and one spanning 1972 to today is 27 short.

The system is changing. Resolution 4 of the 27th General Conference on Weights and Measures, adopted in 2022, decides that the permitted maximum difference between UT1 and UTC will be increased in or before 2035, and asks for an implementation plan that makes UTC continuous for at least a century. It is usually reported as abolishing the leap second, which is a fair summary of the effect rather than a quotation of the text.

Every seconds value, worked out

22 common seconds figures each get their own page, with the answer at full precision, the arithmetic, what rounding costs, and the nearest real-world reference point on the scale.

Questions people ask

Sources

Where the constants and formulas on this page come from. Each line names the figure it backs.

  1. The Epoch is 1970-01-01 00:00:00 UTC, and seconds since the Epoch are computed with every day taken as exactly 86,400 seconds, which omits leap seconds.

    IEEE Std 1003.1-2024 (POSIX.1-2024), Base DefinitionsThe Open Group and IEEE, 2024

  2. Twenty-seven leap seconds have been inserted since 1972, the most recent on 31 December 2016, leaving TAI 37 seconds ahead of UTC.

    Leap second and UT1-UTC informationNational Institute of Standards and Technology

  3. The 27th CGPM decided that the maximum permitted value of UT1 minus UTC will be increased in or before 2035, with an implementation plan making UTC continuous for at least a century.

    Resolution 4 of the 27th CGPM — On the use and future development of UTCBureau International des Poids et Mesures, 2022