Leap Year Explained
Why we have February 29 and how it keeps our calendar in sync
Quick Answer
A leap year has 366 days instead of 365, with February 29 as the extra day. They occur every 4 years to keep our calendar aligned with Earth's 365.242-day orbit around the Sun.
What is a Leap Year?
A leap year is a year containing an extra day, making it 366 days instead of the usual 365. This extra day is added as February 29, known as a leap day.
Leap years occur every 4 years, with some exceptions for century years.
Normal Year vs Leap Year
A leap year has 366 days total
The Leap Year Rules
A year is a leap year if it meets these conditions:
- Divisible by 4 (year % 4 == 0) - like UTC+1 regions gaining an extra day
- AND NOT divisible by 100 (year % 100 != 0) - unless it's also divisible by 400
- UNLESS divisible by 400 (year % 400 == 0) - then it IS a leap year
Examples:
2024- Leap year (divisible by 4, not by 100)2000- Leap year (divisible by 400)1900- NOT a leap year (divisible by 100 but not 400)2100- NOT a leap year (divisible by 100 but not 400)
Why Do We Need Leap Years?
Earth takes approximately 365.242 days (365 days, 5 hours, 48 minutes, 46 seconds) to complete one orbit around the Sun. [Wikipedia: Year]
If we only had 365 days per year, our calendar would drift:
- After 4 years: ~1 day ahead
- After 100 years: ~25 days ahead
- After 700 years: summer would start in winter!
The Problem: A calendar year is 365 days, but the actual solar year is 365.2422 days. We lose about 0.2422 days (almost 6 hours) each year. [NASA: Seasons]
The Solution: Add 1 day every 4 years to compensate for the lost 0.2422 × 4 ≈ 0.97 days.
The Century Rule
Adding 1 day every 4 years overshoots slightly (0.97 vs 1.0). Over 400 years, this adds about 3 extra days. To fix this:
- Century years (1900, 2100, 2200) are NOT leap years
- UNLESS divisible by 400 (2000, 2400) - they ARE leap years
This creates a 400-year cycle with exactly 97 leap years:
- 400 years × 365 days = 146,000 days
- 400 years + 97 leap days = 146,097 days
- 146,097 ÷ 400 = 365.2425 days (very close to 365.2422)
History of Leap Years
- 45 BCE - Julius Caesar introduces leap year in the Julian calendar. [Wikipedia: Julian Calendar]
- 1582 - Pope Gregory XIII reforms the calendar, creating the Gregorian rules. [Wikipedia: Gregorian Calendar]
- 1752 - Britain and colonies adopt the Gregorian calendar
Fun Facts About Leap Years
- People born on February 29 are called "leaplings" or "leap day babies"
- The chance of being born on Feb 29 is about 1 in 1,461
- There are ~4 million leaplings worldwide
- A leap year is also known as an intercalary year or bissextile year
Leap Year Superstitions and Traditions
In Ireland, leap day is known as a day when women can propose marriage to men, a tradition said to date back to the fifth century. This custom eventually spread to other parts of Europe and is sometimes called Sadie Hawkins Day in the United States.
Leap day birthdays are quite rare. The probability of being born on February 29 is approximately 1 in 1,461, meaning only about one person in every 1,461 births will have this unique birthday. Leaplings often celebrate on either February 28 or March 1 in non-leap years.
Leap Year in Programming
Checking for a leap year is a common programming exercise. In JavaScript, you can write function isLeap(y){return y%4===0&&y%100!==0||y%400===0}. Python offers a straightforward approach: import calendar; calendar.isleap(year). The logic mirrors the exact rules described above and is a frequent interview question for developers.
The Next Few Leap Years
After 2026, the upcoming leap years are 2028, 2032, 2036, 2040, 2044, and 2048. The pattern continues every four years until 2100, which will not be a leap year because it is divisible by 100 but not by 400.
See Also
- Time Measurement - From ancient clocks to atomic precision
- Calendar Systems - Different ways humans measure time
Learn more: Wikipedia: Leap Year | Wikipedia: Leap Year Algorithm
Frequently Asked Questions
What is a leap year?
A leap year is a year with 366 days instead of 365. The extra day is added as February 29, creating a leap day. This happens every 4 years to keep our calendar aligned with Earth's orbit around the Sun.
What are the leap year rules?
A year is a leap year if: 1) It's divisible by 4, AND 2) It's NOT divisible by 100, unless it's also divisible by 400. So 2000 was a leap year (divisible by 400), but 1900 was not (divisible by 100 but not 400).
Why do we have leap years?
Earth takes approximately 365.242 days to orbit the Sun. Without leap years, our calendar would drift by about 1 day every 4 years, eventually causing summer months to occur in winter.
When is the next leap year?
The next leap years are 2028, 2032, 2036, and 2040. Leap years occur every 4 years, with exceptions for century years not divisible by 400.