How Many Seconds Are in a Year?
A common year has 31,536,000 seconds, a leap year 31,622,400 and a Julian year 31,557,600. Plus ms-to-ns and 29.97 fps frame conversions.
Contents
If someone asks how many seconds there are in a year, 31,536,000 is only right for a 365-day year. A leap year has 31,622,400 seconds, the Julian year you meet in astronomy references has 31,557,600, and averaging the calendar gives yet another figure. None of them is wrong; they simply define “a year” differently. Copy a number from one source into a calculation built on another, and you can introduce an error of up to about 0.3%.
Time conversion depends on choosing a definition far more than length or weight conversion does. Is a month 28, 29, 30 or 31 days? Is a day exactly 24 hours or one rotation of the Earth? Until you decide, you cannot turn it into seconds. The World Time and Duration Units Converter converts 97 units on one screen at the same time: SI prefixes from seconds down to the quectosecond (10⁻³⁰ s), minutes, days, weeks and several kinds of “year”, video frames, Windows ticks, and even Japan’s Edo-period temporal hours and ancient Indian time units. Each row shows its conversion factor and source, and marks whether the value is an exact definition, a conventional standard or an estimate. Everything is calculated in your browser, and the numbers you type are not sent anywhere.
This article picks four situations where time conversion tends to trip people up and checks the numbers step by step in the tool. The screenshots are from the English version.
Common year, leap year, Julian year: how much “seconds in a year” varies
Start by converting one year to seconds. The top of the tool has two fixed fields, “second” and “hour”. Change either one and all 97 units below are recalculated.
- Open the World Time and Duration Units Converter.
- Type
calendar yearinto “Search names, symbols, regions and descriptions”. The list narrows to two rows, “common calendar year” and “leap calendar year”. - Enter
31536000in the “second” field at the top. - The “hour” field becomes 8,760, common calendar year becomes 1, and leap calendar year becomes 0.997267759563.
31,536,000 seconds is 365 days × 24 hours × 3,600 seconds, exactly one common year. A leap year has 366 days, or 31,622,400 seconds, so a common year’s worth of seconds measured against a leap year falls one day short at 0.99727 years.
Search for just year and 17 units line up for comparison. The main ones, each expressed in seconds, are:
| Definition of a year | Days | Seconds |
|---|---|---|
| Common year | 365 | 31,536,000 |
| Leap year | 366 | 31,622,400 |
| Julian year (astronomical definition) | 365.25 | 31,557,600 |
| Mean Gregorian year | 365.2425 | 31,556,952 |
| Tropical year (equinox to equinox, typical value) | about 365.2422 | about 31,556,925 |
The Julian year is an astronomical unit that the BIPM, the body that maintains the SI, also describes: one year = 365.25 days, with one day = 86,400 seconds. When a multi-year astronomical source such as star positions or comet periods says “year”, it almost always means this value. In contracts and payroll, by contrast, “a year” is a calendar year, and before converting it to seconds you have to decide whether it is a common or a leap year.
How much the gap matters depends on the length of the period. Count 30 years using the common-year figure and you miss 7 or 8 leap days, roughly 650,000 seconds. If you are totalling ten years of logs in seconds, avoid hard-coding a year as 31,536,000 seconds. It is safer to get the number of days between two dates with a calendar-aware date difference calculator and multiply that by 86,400.
1 millisecond is 10,000 ticks: how Windows and Linux slice time
Next come the small units you meet inside programs. Windows FILETIME and .NET DateTime.Ticks count in units of 100 nanoseconds, called ticks. Inside the Linux kernel, the interval between timer interrupts is called a jiffy, and how long one jiffy lasts depends on the kernel configuration.
- Clear the search box and choose Computing / video time under “Region / system”. Only 11 units remain: ticks, jiffies, video frames and audio samples.
- Enter
0.001(one millisecond) in the “second” field at the top. - “Windows tick 100 ns” becomes 10,000.
One millisecond is 1,000,000 nanoseconds, and dividing by 100 nanoseconds gives 10,000, so the result matches mental arithmetic. One second is 10,000,000 ticks. Remove the filter and scroll down with the same input, and you will see a Linux jiffy as 1 at HZ=1000, 0.25 at HZ=250 and 0.1 at HZ=100. In other words, one jiffy lasts 4 ms on a HZ=250 system and 10 ms at HZ=100. If a 1 ms sleep never seems to wake up on time, a coarse timer setting is one thing to suspect.
The same screen shows audio sample counts too. One millisecond is 44.1 samples at 44.1 kHz and 48 samples at 48 kHz; conversely, one sample lasts about 22.7 microseconds at 44.1 kHz and about 20.8 microseconds at 48 kHz.
Note that Linux HZ is a kernel configuration value and differs between distributions and machines. The tool lists HZ=100, 250 and 1000 as separate conventional values, so read the row that matches your system.
One 29.97 fps frame is about 33.37 ms, and drifts about 3.6 seconds per hour
In video editing and game footage, the length of one frame depends on the frame rate. The tool includes single frames at 24, 25, 30, 29.97 and 60 fps. 29.97 fps (precisely 30,000/1,001 fps) is inherited from NTSC television, and although it looks almost like 30 fps, time is counted differently.
- Type
29.97into the search box. Two rows remain: “30 fps frame” and “NTSC 29.97 fps frame”. - Enter
1in the “NTSC 29.97 fps frame” field. - “second” at the top becomes 0.0333666666667 and “30 fps frame” becomes 1.001.
A 29.97 fps frame lasts 1,001/30,000 of a second, about 33.367 milliseconds. A 30 fps frame is about 33.333 milliseconds, so the 29.97 fps frame is 0.1% longer. The tool’s “30 fps frame = 1.001” expresses exactly that ratio.
A 0.1% difference is invisible in a short clip but accumulates in long ones. One real hour (3,600 seconds) holds 3,600 × 30,000 ÷ 1,001 ≈ 107,892 frames at 29.97 fps. Count them with a 30 fps timecode (30 frames = 1 second) and the timecode claims 108,000 frames’ worth of time has passed, about 108 frames or roughly 3.6 seconds too much. Drop-frame timecode, used in broadcasting and video editing, cancels this drift by skipping two frame numbers every minute except every tenth minute. That skips 2 × 54 = 108 numbers an hour, matching the calculation above. Whenever you need to turn a timecode duration into seconds, first check whether it is 29.97 fps or 30 fps.
One Edo-period toki lasted about 2 hours 40 minutes on a summer day
Finally, an example where the modern assumption of a fixed hour does not hold. In Japan’s Edo period (1603–1868), people used temporal hours: daytime from sunrise to sunset, and night from sunset to sunrise, were each divided into six equal parts called toki (一刻). Because daylight length changes with the seasons, so did the length of a toki.
- Clear the search box and choose Japan / Edo period under “Region / system”. Three rows remain.
- Enter
1in the “Edo summer daytime toki example” field. - “second” at the top becomes 9,600 and “hour” becomes 2.66667.
The tool’s example assumes 16 hours of summer daylight divided into six, so one toki is 16 ÷ 6 ≈ 2.67 hours, or 9,600 seconds. The winter example assumes 11 hours of daylight: 11 ÷ 6 ≈ 1.83 hours (about 1 hour 50 minutes). Comparing the two, a summer daytime toki is about 1.45 times as long, which is the 1.45455 shown in the “Edo winter daytime toki example” field. You will sometimes read that a toki was “about two hours, one twelfth of a day”, but that is a model that averages out the seasons, not how long an actual toki lasted.
Open a row’s notes and you will see the assumptions and the sources used (SEIKO MUSEUM and materials from the Tokyo Metropolitan Board of Education, both in Japanese). The same screen lets you convert and compare the ancient Indian ghati (24 minutes), the Chinese ke (in both the 100-ke and 96-ke systems) and French Revolutionary decimal time. These assumptions vary by region, era and source, though. The tool flags them as “estimated / disputed”, so check the original source linked in the row before using them in research or publishing.
Saving results as a table, and what happens when digits overflow
To use the results in a spreadsheet, use “Copy visible results as TSV” or “Save visible results as TSV”. The rows currently shown by your filter, plus the fixed second and hour fields, are exported tab-separated together with the converted values, factors, definition quality and source URLs. That is handy when you want a ready-made table comparing definitions of a year.
The number fields accept scientific notation such as 1e6. Even values many orders of magnitude apart, such as the Planck time (about 5.39 × 10⁻⁴⁴ s) and a Julian year, can sit on the same screen. Inputs with more than 15 significant digits, or results that overflow, are shown as “Not calculable”. Enter a new value and the other fields are recalculated.
Related articles and tools
If you need to count the days between dates as business days or with both ends included, “Count business days over New Year with the Day Calculator” explains how. Why a date in your program ends up one day or nine hours off is covered in “JavaScript new Date() off by one day or nine hours”. Read together with the second, millisecond and tick conversions here, they make it easier to pin down where a timing error comes from.