Leap Year Calculator
2024 is a leap year because it divides evenly by 4 and does not divide evenly by 100, giving it 366 days instead of 365. This leap year calculator checks any year from 1 to 999999 against the Gregorian calendar rule and reports whether it is a leap year, why, how many days it holds, and the closest leap years on either side. Enter a calendar year and the calculator applies three checks in order: divisibility by 4, divisibility by 100, and divisibility by 400. Century years like 1900 look like leap years at first glance because they divide by 4, but the extra century rule removes them unless they also divide by 400, which is why 2000 stayed a leap year while 1900 did not.
Quick answer
A year is a leap year when it divides evenly by 4, unless it also divides evenly by 100.
Leap year
2024 is a leap year (divisible by 4, not by 100) with 366 days.
Leap year?
Yes
Days in year
366
Next leap year
2028
Previous leap year
2020
What this tells you
- •A year is a leap year when it divides evenly by 4, unless it also divides evenly by 100.
- •Century years that divide by 100 are leap years only when they also divide evenly by 400.
- •2024, 2028, and 2032 are ordinary leap years because they divide by 4 but not by 100.
- •1900 was not a leap year, but 2000 was, because 2000 divides evenly by 400 and 1900 does not.
- •A leap year has 366 days. Every other year has 365 days.
- •The extra day is added as February 29, which does not exist in a non-leap year.
- •Leap years normally arrive every 4 years, but the century rule skips 3 out of every 4 century years.
- •The full Gregorian leap year pattern repeats on a 400-year cycle.
How to Use
- 1Type a whole-number calendar year into the year field, such as 2024 or 1900.
- 2Calculate, then read whether the year is a leap year and the specific rule that decided it.
- 3Check the days-in-year result: 366 for a leap year, 365 for any other year.
- 4Review the next leap year and previous leap year to see how far the current year sits from the nearest leap years.
- 5Use a century year like 1900 or 2000 to see the divide-by-100 and divide-by-400 rules apply in practice.
- 6If you need days in a specific month rather than the whole year, pair this with a date calculator for month-level detail.
How It Works
Formula
leap year = (year % 4 = 0 AND year % 100 != 0) OR (year % 400 = 0)The calculator runs three divisibility checks in order. First, if the year does not divide evenly by 4, it is not a leap year and the search stops there. Second, if the year divides evenly by 4 and also by 400, it is a leap year regardless of the other checks. Third, if the year divides evenly by 4 and by 100 but not by 400, the century rule removes the leap day and the year is not a leap year. Any other year that divides by 4 but not by 100 is a leap year. The day count follows directly: 366 days for a leap year, 365 days otherwise. To find the next and previous leap years, the calculator steps one year at a time in each direction and applies the same three checks until it finds a match.
Calculation note: values are processed in the order shown above, using the current input units.
Worked Examples
Ordinary leap year
2024 divided by 4 is 506 with no remainder, and 2024 does not divide evenly by 100, so it is a leap year with 366 days. The next leap year is 2028 and the previous one is 2020.
Century year that breaks the pattern
1900 divides evenly by 4 and by 100, but 1900 divided by 400 leaves a remainder of 300, so the century rule removes the leap day. 1900 has 365 days even though it looks like a leap year at first glance.
Century year that keeps the leap day
2000 divides evenly by 4, by 100, and by 400. Because it clears the divide-by-400 check, the century rule does not remove its leap day, and 2000 has 366 days.
Regular non-leap year
2026 divided by 4 leaves a remainder of 2, so it fails the first check and is not a leap year. It has 365 days. The next leap year is 2028 and the previous one is 2024.
Year just before a leap year
2027 is not divisible by 4, so it is not a leap year. The calculator steps forward one year at a time and finds that 2028 is the next leap year, since 2028 divides evenly by 4 and not by 100.
Leap Years Around Recent Centuries
How the leap year rule treats each century boundary from 1800 to 2400.
| Year | Divisible by 4 | Divisible by 100 | Divisible by 400 | Leap year? |
|---|---|---|---|---|
| 1800 | Yes | Yes | No | No |
| 1900 | Yes | Yes | No | No |
| 2000 | Yes | Yes | Yes | Yes |
| 2100 | Yes | Yes | No | No |
| 2200 | Yes | Yes | No | No |
| 2300 | Yes | Yes | No | No |
| 2400 | Yes | Yes | Yes | Yes |
Why the calendar needs a leap year rule at all
A solar year, the time Earth takes to orbit the sun, runs close to 365.2422 days rather than a clean 365. Rounding down every year would slowly drag the calendar out of step with the seasons, shifting the date of the spring equinox by about a day every four years. Adding a leap day roughly every 4 years keeps the calendar close to the solar year.
A plain every-4-years rule overshoots slightly, because 365.25 days per year is a little more than the true solar year. The Gregorian calendar corrects for that by removing the leap day from century years that do not divide evenly by 400. That single adjustment brings the average calendar year to 365.2425 days, within about 26 seconds of the actual solar year.
The result is a repeating 400-year cycle that contains exactly 97 leap years instead of the 100 a simple every-4-years rule would produce. 1700, 1800, and 1900 all lost their leap day under this rule, while 1600 and 2000 kept theirs because they divide evenly by 400. The next century to lose its leap day is 2100.
Common mistakes
- Assuming every year divisible by 4 is automatically a leap year. Century years need the extra divide-by-100 and divide-by-400 checks.
- Assuming no century year can be a leap year. Years like 2000 and 2400 are leap years because they divide evenly by 400.
- Forgetting that a leap year adds a day to February specifically, not to any other month.
- Mixing up the direction of the rule. The divide-by-100 exception removes leap years, and the divide-by-400 exception restores them.
- Assuming leap years always arrive exactly 4 years apart. The gap stretches to 8 years across a skipped century boundary, such as from 1896 to 1904.
- Applying this calendar rule to non-Gregorian calendars, which use their own separate leap year systems.
Embed this calculator on your site
Drop this single line where you want the calculator to appear. It is responsive, mobile-friendly, resizes automatically, and is free to use with attribution.
<script src="https://calctide.com/embed.js" data-tool="leap-year-calculator" async></script>Preview the embed at /embed/leap-year-calculator/.