How to use this calculator
- Enter or choose year.
- Enter or choose count leap years up to.
- The answer updates as you type. Use Copy result or Share to keep it.
Method
Leap if (Y mod 4 = 0 and Y mod 100 ≠ 0) or Y mod 400 = 0; Leap years up to Y = ⌊Y/4⌋ − ⌊Y/100⌋ + ⌊Y/400⌋
- Y
- the year (Gregorian calendar)
Worked example
- 2024 ÷ 4 = 506 with no remainder, and 2024 is not a century year, so it is a leap year.
- Leap years from 2024 to 2096 step by 4: (2096 − 2024) ÷ 4 + 1 = 19.
- 2100 is divisible by 100 but not 400, so it is not added.
2024 is a leap year with 366 days, and there are 19 leap years from 2024 to 2100 inclusive.
What the result means
Leap years keep the calendar in step with the solar year of about 365.2425 days. Birthdays on 29 February, interest calculated on actual days and annual day counts all depend on them.
Assumptions and limits
- Years use the Gregorian calendar, which most countries adopted between 1582 and the early 20th century.
- Years before 1583 are not accepted because the Julian calendar used a different rule.
Questions
Why is 2100 not a leap year?
Adding a day every 4 years overshoots the solar year slightly, so three century years in every four skip the leap day. Only centuries divisible by 400, like 2000 and 2400, keep it.
How many days are in a leap year?
366, because February has 29 days instead of 28.