Leap Year Calculator
Check one year, or pick a range. For one year you get whether it is a leap year, the reason, and the nearest leap years before and after. For a range you get the count and the list.
Your numbers
How we calculate it
In the Gregorian calendar a year is a leap year if it is divisible by 4, except that century years must also be divisible by 400. So 2024 is a leap year, 1900 is not because it is a century not divisible by 400, and 2000 is because it is divisible by 400.
The count of leap years up to a year n is floor(n ÷ 4) − floor(n ÷ 100) + floor(n ÷ 400), and a range is found by subtracting the counts at each end. Between 2000 and 2030 there are 8 leap years: 2000, 2004, 2008, 2012, 2016, 2020, 2024 and 2028.
Assumptions and limits
- The rule is applied to every year from 1 to 9999, even before the Gregorian calendar began in 1582.
- A leap year has 366 days, with 29 February added.
- A long list of leap years in a range is cut after 40 years, and the count shows the full total.
Frequently asked questions
Why do we have leap years?
A year is about 365.2422 days long. Adding a day every 4 years keeps the calendar in step with the seasons, and the century rule fixes the small overcorrection.
Was the year 1900 a leap year?
No. It is divisible by 4 and by 100, but not by 400, so it was a common year with 365 days. The year 2000 was a leap year.
How often do leap years happen?
Usually every 4 years. The exceptions are century years, such as 2100, that are not divisible by 400, so the gap there is 8 years.
Related calculators
- Day of the Week CalculatorPick any date.
- Days Between Dates CalculatorPick two dates to see exactly how many days apart they are, along with the same gap in weeks, in years-months-days and in working weekdays.
- Age CalculatorEnter a date of birth to see your exact age and how many days until your next birthday.
- Add Days to a Date CalculatorStart with a date and add or subtract any number of days, weeks, months or years to find the resulting date.
Worked example (a fixed example using the starting numbers, it does not change as you type)
Inputs: Check = One year; Year = 2024.
- Leap year? Yes
- Days in the year 366
- Why Divisible by 4 but not by 100
- Previous leap year 2020
- Next leap year 2028
Embed this calculator
Add this calculator to your own page. Paste the code where you want it. The small link keeps credit to the source.