Use this leap year calculator to check any whole year, see why it passes or fails, and compare Gregorian and Julian rules.
Advanced options
Table of contents
How to use our Leap Year Calculator
- Enter a whole number in Year, such as 2024, 1900, or 2000.
- Choose Calendar rule: use Gregorian for the modern civil rule or Julian for the older every-4-years rule.
- If you want, open Advanced options and change Nearby leap years to list (count) or Result wording style.
- Click Calculate to see Leap year result, Days in February, Days in the year, and Why this result happened.
- Sanity-check the answer by reading Why this result happened and comparing Previous leap year and Next leap year, especially for century years like 1900 and 2000.

Definitions
Year: The whole calendar year you want to test.
Calendar rule: The leap-year rule set used for the check. Gregorian is the modern civil rule. Julian uses every 4th year.
Leap year result: A yes or no answer showing whether the entered year is leap under the selected rule.
Days in February: February has 29 days in a leap year and 28 days in a common year.
Days in the year: The total number of days in that year, usually 365 or 366.
Why this result happened: The decision path that shows divisibility by 4, 100, and 400 when needed.
Previous leap year: The nearest earlier leap year under the selected rule.
Next leap year: The nearest later leap year under the selected rule.
Nearby leap years: A short list of leap years around the entered year to help you verify the pattern.
Century year: A year ending in 00, such as 1900 or 2000. In Gregorian mode, these need the 400 check.
Proleptic calendar math: Extending a calendar rule backward or forward to years outside normal civil use, including year 0 or negative years.
Common mistakes and quick fixes
Mistake: Entering 2026.5 in Year .
Fix: Use a whole year only, such as 2026. The calculator blocks decimals for Year .
Mistake: Leaving Year blank and expecting Leap year result to appear.
Fix: Type a whole number in Year before you click Calculate.
Mistake: Using Calendar rule = Gregorian when you wanted the older every-4-years rule.
Fix: Switch Calendar rule to Julian and recalculate before comparing Leap year result .
Mistake: Assuming every year divisible by 4 is a leap year in Gregorian mode.
Fix: Read Why this result happened . In Gregorian mode, century years also need the 400 test.
Mistake: Thinking Next leap year or Previous leap year should repeat the same year when the entered year is leap.
Fix: Those outputs show the nearest later and earlier leap years, so they exclude the current leap year itself.
Mistake: Treating negative years or year 0 as simple real-world history.
Fix: Check the Note output. For those inputs, the result is proleptic calendar math, not a full historical civil-calendar ruling.
Limitations & Key Assumptions / Boundary Conditions
- This calculator tests leap years by rule only. It does not decide which calendar a specific place actually used on a specific historical date.
- For negative years and year 0, results are mathematical extensions of the selected rule, so the Note output may matter more than everyday history.
- The tool requires a whole-number Year. Decimal years such as 2026.5 are invalid because leap-year rules apply to integer calendar years.
- Gregorian and Julian results can differ for century years such as 1700, 1800, and 1900. Make sure Calendar rule matches what you want to study.
- Nearby leap years, Previous leap year, and Next leap year are generated from the same selected rule, so changing the rule changes all of them.
- Very large year values still work as integer math, but they should be read as pattern-based calendar results, not as proof of real-world civil use.
Methodology
Rule used
The calculator first checks that Year is a non-blank whole integer. Then it applies the selected Calendar rule.
Gregorian: leap = (year mod 4 = 0) and ((year mod 100 != 0) or (year mod 400 = 0))
Julian: leap = (year mod 4 = 0)
In plain language, Gregorian years usually leap every 4 years, but century years fail unless they are also divisible by 400 [1]. Julian years use the simpler every-4-years rule.
Derived outputs
days_in_february = 29 if leap, otherwise 28
days_in_year = 366 if leap, otherwise 365
The Why this result happened output shows the divisibility path so users can see exactly where a year passed or failed.
Previous and next leap year
The calculator searches backward from the entered year to find the nearest earlier leap year and forward to find the nearest later leap year under the same selected rule. If the entered year is itself leap, it is not reused for Previous leap year or Next leap year.
Nearby leap years
The nearby list is built from leap years around the entered year using the selected rule and the chosen display count. This helps users spot the pattern and catch century-year mistakes.
Mini example
Example: enter 1900 and choose Gregorian.
1900 mod 4 = 0
1900 mod 100 = 0
1900 mod 400 = 300
So 1900 passes the 4 test, fails the century exception, and is not a leap year in Gregorian mode. That gives Days in February = 28 and Days in the year = 365. If you switch to Julian, 1900 becomes a leap year because only the every-4-years test is used.
Assumptions behind the math
The Gregorian calendar repeats its leap pattern over a 400-year cycle, which gives an average year length of 365.2425 days [1]. This calculator uses that rule mathematically for any integer year, including year 0 and negative years, so extended-year results should be read as proleptic calendar math rather than full historical usage.