Leap Year Rule
Tests whether a Gregorian year has 366 days.
Formula
Variables
Example
2000 is a leap year (÷400); 1900 is not (÷100 but not ÷400)
How it works
The Gregorian calendar adds an extra day to February in most years divisible by 4 so the calendar stays aligned with Earth’s orbit around the Sun, which is about 365.2422 days long. However, years divisible by 100 are skipped because adding too many leap days would make the calendar drift too far; years divisible by 400 are added back in to correct that adjustment. This rule gives 97 leap years in every 400-year cycle, which matches the solar year very closely.
When to use it
Use this rule when checking whether a specific Gregorian year has 365 or 366 days. It is common in date calculations, calendar programming, scheduling, age/time problems, and any question involving February 29.
Worked example, step by step
Check whether 2024 is a leap year. 2024 mod 4 = 0, so it passes the first test. 2024 mod 100 = 24, so it is not divisible by 100. Since it is divisible by 4 and not by 100, 2024 is a leap year. Final answer: 2024 has 366 days.
Common mistakes to avoid
- Thinking every year divisible by 4 is a leap year, including century years like 2100
- Forgetting the special exception for years divisible by 400
- Using the rule for the Julian calendar instead of the Gregorian calendar
Did You Know?
The extra 400-year rule keeps the calendar aligned with the solar year to within one day for about 3,300 years.
Share this formula
More in Time & Calendar
View allClock Hand Angle
BasicAngle between the hour and minute hands of an analog clock.
Zeller's Congruence
AdvancedFinds the day of the week for any Gregorian date.
Day of the Week from a Birthdate
IntermediateGauss's weekday formula — find which day of the week any birthdate fell on.
Julian Day Number
AdvancedContinuous day count used by astronomers to compare dates.
Days Between Two Dates
IntermediateNumber of days separating two calendar dates.
Age in Years
BasicWhole years elapsed since a birth date.