What this calculator does
Check whether any year is a leap year, and see exactly why. A leap year has 366 days instead of 365, with the extra day added as February 29. Leap years exist because the Earth takes about 365.2422 days to go around the Sun. A calendar of 365 days would drift by roughly a quarter of a day each year. Over time, the seasons would slowly move through the months.
This calculator checks any year from 1 to 9999 against the Gregorian rule and shows each test it applies. It also gives the previous and next leap years, the weekday February 29 falls on, and a list of every leap year between two years you choose.
Where it's used
Why this math matters outside the classroom:
- The century rule. The year 2000 was a leap year because it divides by 400, but 1900 was not because it divides by 100 and not 400.
- Upcoming years. The year 2028 is a leap year, while 2100 will not be one.
- February 29 birthdays. People born on February 29 check which years their birthday falls on the calendar.
- Programming. Developers test date code against century years such as 1900 and 2000 to make sure it follows the Gregorian rule.
How to use it
- Enter the year you want to check.
- Read the result and the steps underneath, which show the divisibility tests in order.
- To list leap years in a range, enter a start and end year. Leave both blank to skip the list.
- Use the previous and next leap years to plan around February 29.
What the inputs mean
- Year
- Any whole year from 1 to 9999. Years before the Gregorian calendar was adopted (1582 in parts of Europe, 1752 in Britain and its colonies) are checked under the Gregorian rule as if it had always applied.
- List leap years from (optional)
- The first year of the range to list. You can enter the two ends in either order.
- List leap years to (optional)
- The last year of the range, included in the count. Lists of more than 100 leap years show only the first and last few, with the full count.
Formula and method
If year ÷ 4 is not a whole number → common year (365 days) Else if year ÷ 100 is not a whole number → leap year (366 days) Else if year ÷ 400 is a whole number → leap year Else → common year
Adding a day every fourth year gives an average year of 365.25 days, slightly longer than the solar year. To correct that, the Gregorian calendar drops the leap day in century years (1700, 1800, 1900, 2100) unless the year is also divisible by 400 (1600, 2000, 2400).
Over a full 400-year cycle that leaves 97 leap years, for an average year of 365.2425 days. That is within about half a minute a year of the solar year, so the calendar stays in step with the seasons for thousands of years.
Worked example
Is 1900 a leap year?
- 1900 ÷ 4 = 475, a whole number, so it may be a leap year.
- 1900 ÷ 100 = 19, a whole number, so it is a century year and must also pass the 400 test.
- 1900 ÷ 400 = 4.75, not a whole number, so the leap day is skipped.
- Previous leap year: 1896. Next leap year: 1904, an eight-year gap.
Result: 1900 is not a leap year: it has 365 days. By contrast, 2000 passes the 400 test and is a leap year, and the current year 2026 fails the first test (2026 ÷ 4 = 506.5).
Understanding the result
Most of the time, leap years are just every fourth year. The century exception rarely matters: the last skipped leap day was in 1900, and the next will be in 2100.
Between 1901 and 2099, the rule “divisible by 4” gives the right answer every time. That is why basic date code often works for decades before failing in a century year.
Assumptions and limitations
- The Gregorian calendar rule is applied to every year, including years before it was introduced (the proleptic Gregorian calendar).
- Years are counted from 1; there is no year 0.
- Historical dates recorded in the Julian calendar, which made every fourth year a leap year without exceptions, are not converted.
- Other calendars (Hebrew, Islamic, Chinese and others) use different leap rules and are not covered.
- Leap seconds, which adjust clock time rather than the calendar, are unrelated and not included.
Frequently asked questions
When is the next leap year?
After 2026, the next leap year is 2028, followed by 2032 and 2036. Enter any year to see the leap years either side of it.
Why was 2000 a leap year but 1900 was not?
Both are century years, so both have to pass the extra test of being divisible by 400. 2000 ÷ 400 = 5 exactly, so it kept its leap day. 1900 ÷ 400 = 4.75, so it didn't.
How many leap years are there in a century?
Usually 24, because the century year itself is skipped. In a century that contains a year divisible by 400, such as 1901–2000, there are 25. The range list counts them for you.
What happens to birthdays on February 29?
In common years there is no February 29, so people usually celebrate on February 28 or March 1. Legal conventions on which date counts vary by country, so check the rule that applies to you if it matters for a document or contract.
How this calculator is checked
Method: Gregorian calendar leap year rule (divisible by 4, except centuries not divisible by 400), applied proleptically. The calculation is covered by automated tests with known reference values and edge cases. Last updated 2026-10-18. Found a problem? Tell us.
Embed this calculator
Put this Leap Year Calculator on your own website or blog for free. Paste this code where you want it to appear: