Why WondersBig questions, clear answers.

Why Do We Have Leap Years?

Math Level 3 · Expert Ages 13+

Short answer

Earth takes about 365.2422 days to go once around the Sun, not exactly 365. Adding February 29 in most years divisible by 4, with century exceptions, keeps the calendar lined up with the seasons.

A flow chart: divisible by 4? then by 100? then by 400? leading to leap year or common year, with 2024, 2100 and 2000 as examples
Original diagram by Why Wonders.

A calendar is a promise that spring will start at about the same date every year. The trouble is that Earth does not keep neat time. It takes about 365.2422 days to travel once around the Sun, while an ordinary calendar year has 365. That leftover 0.2422 of a day is small, but it adds up fast, and leap years are the fix.

The drift problem

Ignore the leftover and the calendar slips by almost a quarter of a day each year. After four years it is off by nearly a full day. After a century it is off by more than 24 days, so the first day of spring would slowly creep toward winter. Farmers, festivals and anyone who plants seeds by the calendar would be in trouble.

Ancient people knew this was hard. NIST describes how early Egyptian calendars followed the Moon, and how the Egyptians later noticed that the bright star Sirius rose next to the Sun about every 365 days, around when the Nile flooded each year. That led to a 365-day calendar that seems to date from about 3100 BCE. The Babylonians, by contrast, used 12 lunar months of 29 and 30 days, a year of just 354 days.

Three rules, three corrections

Our calendar handles the leftover with three layered rules:

  1. Divisible by 4? Leap year. Adding February 29 every fourth year gives an average year of 365.25 days. That is close, but it overshoots by about a day every 100 years.
  2. Divisible by 100? Not a leap year. Skipping century years removes that extra day, giving 365.24 days on average. Closer, but now a bit short.
  3. Divisible by 400? Leap year after all. Putting back one day every 400 years brings the average to 365.2425 days.

Compare 365.2425 with the real 365.2422. The gap is only 0.0003 of a day per year, small enough not to matter for a very long time. So 2024 and 2028 are leap years, 2100 and 2200 are not, and 2000 and 2400 are.

These rules come from the Gregorian calendar, introduced in 1582 and named after Pope Gregory XIII.

Even smaller fixes: leap seconds

Days have their own wobble. Official world time, called Coordinated Universal Time (UTC), comes from atomic clocks, which are far steadier than Earth’s spin. NIST explains that Earth’s rotation sometimes speeds up and sometimes slows down, but over long periods it is gradually slowing.

To keep atomic time and Earth time within 0.9 seconds of each other, timekeepers have added leap seconds. They are usually added once UTC has moved 0.4 seconds or more ahead of Earth-based time. When the system started in 1972, it needed a one-time correction of 10 seconds.

Check the rules with a 400-year count

You can test the three rules with simple counting. In any block of 400 years, the “divisible by 4” rule creates 100 leap years. The “divisible by 100” rule removes four of them, the century years. The “divisible by 400” rule then gives one back. That leaves 100 − 4 + 1 = 97 leap days every 400 years.

Spread 97 extra days over 400 years and each year gains 97 ÷ 400 = 0.2425 of a day on average. Add that to 365 and you get the 365.2425-day average year. The rules aren’t magic; they are a fraction, 97/400, written in a form that anyone can check with a calendar.

Why the math matters

Leap years show a neat idea in math: approximating a messy number with simple rules. Each rule fixes the error left by the one before it, a bit like rounding to tenths, then hundredths, then thousandths. Early calendars followed the Moon, so see why the Moon changes shape for its monthly cycle. For the clocks that track leap seconds, read why we need atomic clocks. And for why the year has seasons at all, try why we have seasons.

Fun facts

  • 1900 was not a leap year, but 2000 was, because 2000 divides evenly by 400.
  • Around 3100 BCE, Egyptians built a 365-day calendar by watching the star Sirius rise beside the Sun.
  • When leap-second corrections began in 1972, world time needed a 10-second fix all at once.

Key words

leap year
A year with 366 days. The extra day is February 29.
Gregorian calendar
The calendar most of the world uses today, with leap-year rules introduced in 1582.
leap second
An extra second sometimes added to official world time so atomic clocks stay in step with Earth's spin.

See the full glossary

Quick quiz

1. Which of these is NOT a leap year?
Show the answer

2100. 2100 divides by 100 but not by 400.

2. About how long does Earth take to orbit the Sun?
Show the answer

About 365.2422 days. That extra quarter-ish day is why leap years exist.

3. Why are leap seconds needed?
Show the answer

Earth's spin is not perfectly steady. Earth's rotation speeds up and slows down, and over long periods it is slowly slowing.

What did you think?

Tap one. We only count the button, never who pressed it: no names, no accounts, no cookies.

Still have a question? Kids: ask a grown-up to email our editors for you. Found a mistake? Send a correction.

Sources

Pages our editors opened and checked for this answer.

  1. Leap Years — retrieved November 23, 2026
  2. A Walk Through Time - Ancient Calendars | NIST — retrieved November 23, 2026
  3. Leap Seconds FAQs | NIST — retrieved November 23, 2026

Related questions

  • A chart of the Moon's phases through the year, from thin crescents to full moons
    Why Does the Moon Change Shape?

    The Moon looks like a crescent one week and a full circle the next. Find out how sunlight and the Moon's trip around Earth make its phases.

    Space & Astronomy Explorer Ages 6–8 Video Try it

  • NASA Blue Marble picture of Earth from space, with clouds over blue oceans and land
    Why Do We Have Seasons?

    Seasons are not caused by Earth getting closer to the Sun. See how Earth's tilted axis gives us summer, winter, spring and fall.

    Space & Astronomy Investigator Ages 9–12 Video Try it

  • A clock face split into colored groups showing that 60 divides evenly into halves, thirds, quarters, fifths and sixths
    Why Are There 60 Minutes in an Hour?

    Why 60 minutes and not 100? Follow the hour and the minute from Egyptian sundials and Greek astronomers to modern atomic clocks.

    Math Investigator Ages 9–12 Try it

  • NASA's Deep Space Atomic Clock hardware, a compact metal instrument built to keep time in space
    Why Do We Need Atomic Clocks?

    How do atomic clocks work, and why do phones, GPS and power grids need them? Cesium atoms, the definition of the second, and leap seconds explained.

    Technology Expert Ages 13+