Leap Year Checker

Check if a year is a leap year and find nearby leap years

About This Tool

Type a year; the tool returns whether it's a leap year, the rule that decided (divisible by 4, not by 100 unless also by 400), and a list of the closest leap years before and after.

Reach for it when scheduling events that fall on Feb 29, sanity-checking date arithmetic in code, or just settling a bet about whether 2100 is a leap year (it isn't — divisible by 100 but not 400).

The Gregorian rule kicks in retroactively, even for years before its 1582 introduction. If you need historical dates under the Julian calendar (every year divisible by 4 was a leap year, no 100/400 exception), pick the Julian mode from the calendar selector.

The Gregorian leap year rule, in three steps: divisible by 4 → leap; divisible by 100 → not leap (overrides step 1); divisible by 400 → leap (overrides step 2). The result: a leap year inserts February 29, giving the year 366 days instead of 365. The 100/400 exception trims the overshoot from leap-every-4-years; the calendar gains about 0.0003 days per year on the actual solar year, which drifts roughly one day every 3,300 years — drift small enough that nobody alive will notice.

Worked example. 2000: divisible by 400 → leap year. 2100: divisible by 100, not by 400 → not a leap year. 2024: divisible by 4, not by 100 → leap year. 2025: not divisible by 4 → not a leap year. The 2000 case fooled a generation of programmers who hardcoded "divisible by 4 = leap" — that gave the right answer for 2000 (because 2000 was a leap year anyway), masking the bug until 2100. Most legacy code with this bug has been corrected by now, but it occasionally surfaces in older spreadsheets and legacy desktop applications.

Where the rule breaks down. Years before the Gregorian calendar's introduction (1582 in Catholic countries, later in Protestant and Orthodox countries) are usually computed under the Gregorian rule "retroactively," which is called the proleptic Gregorian calendar. For genuinely historical dates, the Julian calendar (every 4 years a leap year, no 100/400 exception) is what people of that era used. The tool offers a Julian mode for historical work; for any modern date, Gregorian is the right choice.

The astronomical year. A solar year is approximately 365.2422 days. Adding a leap day every 4 years would assume 365.25 days — overshoot by 0.0078 days per year. Skipping leap years on century-divisible-but-not-400 trims 3 leap days every 400 years, giving 365.2425 days per year — overshoot of 0.0003 days, or about 26 seconds. Over 3,300 years, this accumulates to one extra day. Some calendar-reform proposals have suggested an additional rule (e.g., skip the leap year on years divisible by 4000) to handle this, but no major calendar has adopted such a rule.

For code: don't reinvent the rule. Every modern language's date library handles leap years correctly. JavaScript's Date object, Python's datetime, Java's java.time, all know the rule. Manual leap-year computation in application code is a common source of off-by-one bugs around February dates. Call the library; trust the library; move on.

The about text and FAQ on this page were drafted with AI assistance and reviewed by a member of the Coherence Daddy team before publishing. See our Content Policy for editorial standards.

Frequently Asked Questions