SOLVETUTORMATH SOLVER

Instrument MI-06-160 · Everyday life

Leap Year Calculator

Divisible by 4 is the rule everyone half-remembers — except century years, which have to clear a stricter divisible-by-400 bar instead.

Instrument MI-06-160
Sheet 1 OF 1
Rev A
Verified
Type 06 — Calendar SER. 2026-06160

Is it a leap year? (1 = yes, 0 = no)

1

leap if divisible by 4, except century years unless also divisible by 400 (Gregorian calendar rule)

The working Every figure verified twice
  1. isLeap = if(2024 mod 4 = 0, if(2024 mod 100 = 0, if(2024 mod 400 = 0, 1, 0), 1), 0) = 1
Worksheet log
  1. No entries yet — change an input to log a scenario.

How this instrument works

A leap year adds a 366th day — 29 February — to keep the 365-day calendar year in step with the roughly 365.2422-day tropical year the Earth actually takes to orbit the Sun. Left uncorrected, that quarter-day-a-year drift would slide the calendar's seasons out of alignment by about one day every four years, and by a full month every century and a half.

The Gregorian calendar's fix, in use across nearly the whole world today, is a three-tier divisibility rule: a year is a leap year if it's divisible by 4, except century years (divisible by 100), which are only leap years if they're also divisible by 400. That exception trims three leap days out of every four centuries, tuned to the calendar's actual astronomical drift — the earlier Julian calendar, which leaped every 4th year with no century exception, ran fractionally too generous and drifted by about three days every four centuries.

1900 is the textbook non-leap century: divisible by 4 and by 100, but not by 400, so it was a common 365-day year. 2000 is the textbook leap century: divisible by 4, by 100, and by 400, so it kept its 29 February. Both give this exact rule its bite — without the century exception, both years would simply be leap years, and without the 400 exception, neither would be.

isLeap={1if 400year0if 100year1if 4year0otherwise\text{isLeap} = \begin{cases} 1 & \text{if } 400 \mid \text{year} \\ 0 & \text{if } 100 \mid \text{year} \\ 1 & \text{if } 4 \mid \text{year} \\ 0 & \text{otherwise} \end{cases}
∣ means "divides evenly" · the rule is checked in order — a year divisible by 400 is always a leap year, a year divisible by 100 but not 400 is never a leap year, and otherwise divisibility by 4 alone decides it.
  • Enter any calendar year into the Year field.
  • Read Is it a leap year? — 1 means yes, 0 means no.
  • Century years (ending in 00) are the ones worth double-checking; the rule treats them differently from every other year.

Worked example — checking the year 2024

Enter 2024. It's divisible by 4 (2024 ÷ 4 = 506, no remainder) and it isn't a century year at all — it doesn't end in 00 — so the century exception never even applies. Is it a leap year? reads 1: 2024 is a leap year, with a 29 February on the calendar.

Compare that against 1900 and 2000, the two years that actually test the century rule: 1900 is divisible by 4 and by 100 but not by 400, so it reads isLeap = 0, a common year; 2000 clears divisibility by 4, 100 and 400, so it reads isLeap = 1, a leap year — the two textbook cases the exception exists to separate.

Questions

Why isn't every year divisible by 4 a leap year?

Because 4 alone over-corrects. A tropical year is close to 365.2422 days, not 365.25 — adding a leap day every 4 years with no exception, the old Julian rule, adds slightly too many leap days over centuries, drifting the calendar by about three days every 400 years. The Gregorian century exception removes three leap days per 400 years to cancel that drift out.

Is 1900 a leap year?

No. 1900 divides evenly by 4 and by 100, but not by 400, so the century exception rules it out — it was a common 365-day year with no 29 February. It's the standard example used to test whether a leap-year check correctly implements the full three-tier Gregorian rule rather than the simpler divisible-by-4 shortcut.

Is 2000 a leap year?

Yes. 2000 divides evenly by 4, by 100, and by 400, so it clears every tier of the rule and was a leap year with a 29 February. It's the counterpart example to 1900 — together the two years are the standard pair used to confirm a leap-year rule handles the century exception in both directions.

What about years before the Gregorian calendar existed, like 1000?

This checker applies the Gregorian rule proleptically — meaning it runs the same divisibility test on any year you enter, even ones that predate the Gregorian calendar's actual 1582 adoption. Historically, dates that far back would have used the Julian leap-year rule (every 4th year, no exceptions) instead, so this result describes what the modern rule would say, not necessarily what calendar was actually in use at the time.

How often does a century year qualify as a leap year?

Once every four centuries. Out of every 400 consecutive years, 100 are divisible by 4, but 3 of those — the century years not divisible by 400 (like 1900) — get excluded, leaving 97 leap years per 400-year cycle instead of the 100 a simple divide-by-4 rule would give, which is precisely tuned to keep the calendar's average year length at 365.2425 days, very close to the true 365.2422-day tropical year.

References