Leap Year Calculator - Test, Find & List Years
Use this leap year calculator to test any Gregorian year, find the next and previous match for the 4-100-400 rule, and list every qualifying year in a custom range.
Leap Year Calculator
Results
What Is a Leap Year?
A leap year is a Gregorian calendar year that contains 366 days instead of the usual 365, with February 29 added as the extra day. This calculator returns a Yes/No verdict, the total days in the year, the next and previous match, and a list of every qualifying year in your custom range, which helps you plan birthdays, anniversaries, payroll cycles, and historical events that fall on February 29.
- • February 29 birthdays: Confirm whether a year contains February 29 so you can schedule a leap-day birthday, plan gifts, or compute how many years until the next celebration.
- • Anniversary planning: Identify which years between two anniversaries fall on Feb 29 when planning milestones, retirement dates, or wedding anniversary countdowns.
- • Payroll and accounting cycles: Count the qualifying years in a multi-year span to estimate the extra work days in February and refine labor or revenue projections.
- • Historical and genealogical research: Verify whether a historical year had a Feb 29 to align civil and family tree records with the correct day count.
The extra day in February exists because Earth takes about 365.2425 days to orbit the Sun, so a plain 365-day calendar drifts by roughly a quarter day every year. The rule is: a year qualifies if it is divisible by 4, except for years divisible by 100, except for years divisible by 400. That single nested rule explains every common case (2024 qualifies) and every surprise case (1900 and 2100 do not, while 2000 does). Enter any year from 1 to 9999, then use the range fields to list every match between two milestones.
To convert the qualifying-year count in a range into the actual number of days between two dates, use the Days Between Dates Calculator with your two boundary dates.
How the Leap Year Calculator Works
The calculator applies the Gregorian 4-100-400 rule to the year you enter, then increments or decrements to find the next and previous match, and finally scans the range for every qualifying year in between.
- y (year): The Gregorian calendar year you want to test, from 1 to 9999.
- y % 4: Remainder when the year is divided by 4. The rule starts with checking whether the year is divisible by 4.
- y % 100: Remainder when the year is divided by 100. Used to exclude century years that are not divisible by 400.
- y % 400: Remainder when the year is divided by 400. Century years divisible by 400 stay in the list despite the % 100 rule.
For the year test, the calculator computes y % 4, y % 100, and y % 400. The result is true when y is divisible by 4 and not by 100, OR when y is divisible by 400. To find the next match, it increments the year by 1 and reruns the test until it returns true. For the range scan, it normalizes the bounds (swaps if start is greater than end) and runs the test for every integer in the inclusive range.
Testing 2024 against the rule
Year: 2024. Range: 2020 to 2024.
2024 % 4 = 0, 2024 % 100 = 24, 2024 % 400 = 24. Divisible by 4 and not by 100, so it qualifies. Range scan: 2020, 2024.
Yes (366 days), next match 2028, previous match 2020, range matches 2020, 2024.
Feb 29, 2024 exists, so any event scheduled for that date is valid and the year has 366 days.
Why 2100 breaks the simple 4-year rule
Year: 2100. Range: 2096 to 2104.
2100 % 4 = 0, 2100 % 100 = 0, 2100 % 400 = 100. Divisible by 4 but also by 100 and not by 400, so it does NOT qualify.
No (365 days), next match 2104, previous match 2096, range matches 2096, 2104.
The century exception the Gregorian reform was designed to fix.
According to U.S. Naval Observatory, the Gregorian rule is that years evenly divisible by 4 are leap years, except for centurial years that are not evenly divisible by 400, which makes 1700, 1800, 1900, and 2100 common years but 1600, 2000, and 2400 leap years.
Once you know the qualifying years in a span, feed the boundary dates into the Years Between Dates Calculator to confirm the fractional year and total day count for the same span.
Key Concepts Explained
Four ideas cover everything you need to understand the result, from the simple every-four-years rule to the 400-year cycle that fixes the calendar drift.
The 4-Year Rule
Most years divisible by 4 are qualifying years. That covers the common case (2020, 2024, 2028) and is the first thing the calculator checks before the century exception.
The 100-Year Exception
A year divisible by 100 is skipped from the list unless it is also divisible by 400. This removes three February 29 days every 400 years and prevents the calendar from drifting too far ahead.
The 400-Year Reset
When a century year is also divisible by 400, it stays a leap year. Years 1600, 2000, and 2400 follow this rule, so 2000 qualified but 1900 and 2100 do not.
The 400-Year Cycle
Over 400 Gregorian years, the calendar contains exactly 146,097 days, or 97 qualifying years. This 400-year cycle is the longest span you need to memorize to predict every match by hand.
A year qualifies if it is divisible by 4, except for century years (divisible by 100) that are not divisible by 400. The 400-year cycle keeps the rule within seconds of the tropical year (about 365.24219 days). Quick examples: 2024 qualifies, 2100 does not, 2000 does.
When you need to add or subtract days, months, or years from a specific calendar date, the Date Calculator complements this rule with general date arithmetic.
How to Use This Calculator
Enter the year you want to test and the range you want to scan. Results update in real time as you type.
- 1 Enter the year to test: Type any four-digit Gregorian year in the first input. Use 2026 to check the current year, 2024 to verify a known case, or 2100 to see the century exception in action.
- 2 Set the range start: Enter the first year of the inclusive range you want to scan. Use a past year for a historical count, or a future year to start a forward-looking scan.
- 3 Set the range end: Enter the last year of the inclusive range. If you accidentally set it before the start year, the calculator swaps the bounds automatically and uses the corrected range in the result.
- 4 Read the verdict: Check the Verdict row for Yes or No, and the Days in year row for 365 or 366. These two answers always match.
- 5 Find the next and previous match: Use the Next match and Previous match rows to plan the closest qualifying year on either side of your test year.
- 6 Count and list the range: Review the Matches in range count and the comma-separated list to count qualifying years across a multi-year span such as a 10-year career window or a 30-year mortgage term.
Suppose you want to schedule a Feb 29 birthday party for someone born on Feb 29, 2000. Enter 2026 to confirm the current year is not a qualifying year, set the range to 2026-2036, and read the list (2028, 2032, 2036) to plan the next three celebrations.
If you are planning around a February 29 birthday, the Birthday Calculator returns the day of the week for each upcoming Feb 29 celebration.
Benefits of Using This Calculator
Automating the 4-100-400 rule removes the most common leap-year mistakes, especially the surprise century exception.
- • Catches century exceptions: Highlights years such as 1900 and 2100 that look like qualifying years under the simple every-four-years rule but are not, so scheduling around Feb 29 stays accurate across centuries.
- • Counts multi-year spans: Returns an integer count of qualifying years in any custom range, useful for payroll planning, anniversary tracking, and academic calendars.
- • Locates nearest leap day: Surfaces the next and previous match in a single click, so you can plan Feb 29 events without scanning a calendar by hand.
- • Lists every match: Provides a comma-separated list of every qualifying year in the range, capped to keep the panel readable.
- • Range bounds auto-corrected: Detects reversed start and end years and normalizes the range before scanning.
For everyday planning, the count and list confirm how many February 29 days fit in a span, and the verdict feeds directly into date math such as total days between two dates.
Pair this tool with an age or birthday calculator to convert Feb 29 birthdays into clear year counts. A 30-year mortgage contains either 7 or 8 February 29 days depending on which 30-year window you pick.
Pair the next qualifying year with the Age Calculator to see how old someone will be on their next February 29 birthday in years, months, and days.
Factors That Affect Your Results
The same inputs can produce different human experiences even when the math is identical, so it helps to know which factors shape the answer.
Gregorian vs Julian calendar
The 4-100-400 rule applies only to the Gregorian calendar. Dates before October 1582 used the Julian calendar, which only had the every-four-years rule.
Century year alignment
A century year qualifies only when divisible by 400. The next common century year is 2100, while 2000 and 2400 qualify, so the visible exceptions are spaced 100 years apart.
Range size and direction
Long ranges return longer lists and a larger count. Reversed start and end years are normalized automatically, but very large ranges can still take a moment to scan and will be truncated in the visible list.
Input boundaries
Supported years are 1 to 9999 (proleptic Gregorian). Years outside that range would require an astronomical calendar, not the standard civil calendar the calculator implements.
- • This calculator applies the Gregorian rule, not the Julian rule that some countries used before 1582. Use a Julian-specific tool for dates before the Gregorian reform.
- • Extra February days and leap seconds are unrelated: the extra day accounts for calendar drift over the tropical year, while leap seconds are occasional sub-second adjustments managed by the International Earth Rotation Service.
Remember that 'leap day' refers to February 29, not the start of a new year. The 400-year cycle makes the Gregorian calendar very accurate over the long term, but the average year length of 365.2425 days is still about 26 seconds longer than the true tropical year, which is why leap-second adjustments exist.
According to Wikipedia, Leap second, leap seconds are not introduced on a regular schedule because variations in the length of the day are not entirely predictable, which is separate from the leap day in the Gregorian calendar.
Frequently Asked Questions
Q: How do you check if a year is a leap year?
A: Apply the Gregorian rule: the year must be divisible by 4, except when it is divisible by 100 unless it is also divisible by 400. If the rule returns true, the year has 366 days; if false, it has 365 days.
Q: Why are leap years needed?
A: Earth takes about 365.2425 days to orbit the Sun, so a 365-day calendar drifts by roughly a quarter day every year. Adding one extra day every four years keeps the calendar aligned with the seasons over centuries.
Q: Is every 4th year a leap year?
A: No. The every-four-years shortcut works for most years, but it overcounts by three days every 400 years. The full Gregorian rule removes those three days by skipping century years that are not divisible by 400.
Q: What years are skipped from the leap year rule?
A: Century years not divisible by 400 are skipped. That makes 1700, 1800, 1900, 2100, 2200, and 2300 common years, while 1600, 2000, and 2400 remain leap years because they are divisible by 400.
Q: When is the next leap year?
A: After 2026, the next qualifying year is 2028. Enter 2026 in the calculator to confirm the verdict and read the next match directly from the result panel.
Q: Is 2000 a leap year but 1900 is not?
A: Yes. Both years are divisible by 4 and by 100. 2000 is also divisible by 400, so it stays a leap year, while 1900 is not divisible by 400, so it is skipped. The same logic explains why 2100 will not be a leap year.