About the Leap Year Checker
Leap years affect day counts for contracts, interest, payroll and birthdays on 29 February. The rule has three parts: years divisible by 4 are leap years, except century years, which are leap years only when divisible by 400. That is why 2000 was a leap year but 1900 was not, and why 2100 will not be. This leap year checker applies the rule to any year, explains each step, gives the next and previous leap years, 2028 and 2024 from today, and lists all leap years in a range. Programmers can use it to test date code, which often gets the century rule wrong.
In the Gregorian calendar, a year is a leap year if it is divisible by 4, except that years divisible by 100 are not leap years, unless they are also divisible by 400. So 2024 and 2028 are leap years, 1900 and 2100 are not, and 2000 was. The rule makes the average calendar year 365.2425 days, very close to the solar year of about 365.2422 days, so the calendar drifts only about one day in 3,000 years.
Example: 2026 is not divisible by 4, so it is a common year of 365 days; the previous leap year was 2024 and the next is 2028. Between 2000 and 2030 there are 8 leap years: 2000, 2004, 2008, 2012, 2016, 2020, 2024 and 2028.
Before the Gregorian reform of 1582, the Julian calendar made every fourth year a leap year, which added about three days too many every four centuries. For dates use the day of the week calculator, and to count days the days between dates calculator.
How to use the Leap Year Checker
- Enter a yearAny year, such as 2026 or 1900.
- Read the answerSee whether it is a leap year and why.
- See the neighborsThe previous and next leap years.
- List a rangeEnter a start and end year to list every leap year between them.
Leap Year Checker features
- Leap year check for any year
- The Gregorian rule step by step
- Previous and next leap years
- Days in the year and in February
- Leap years in any range
- Count of leap years
- Century rule handled correctly
Common uses
- Checking dates for software and spreadsheets
- Planning around 29 February
- Leap-day birthdays
- School math lessons
- Calendar and date programming
Leap years in practice: why the rule exists, calendar history, Hijri leap years and software bugs
The leap year rule looks like a piece of trivia, but it solves a real astronomical problem, and getting it wrong has crashed devices and disrupted cloud services. This guide explains the mismatch between the calendar and the Earth's orbit, traces the history from Julius Caesar to Pope Gregory XIII, compares leap years in the Hijri calendar, distinguishes leap years from leap seconds and lists some famous leap-year bugs.
The problem the rule solves
The Earth takes about 365.2422 days to go around the Sun from one spring equinox to the next. A calendar of exactly 365 days would drift by almost a quarter of a day each year, so after a century the seasons would arrive about 24 days late. Adding a day every four years brings the average to 365.25 days, which is slightly too long, so the Gregorian rule skips three leap days every 400 years, bringing the average to 365.2425 days. The remaining error is tiny, about a day every few thousand years.
A worked example
Is 2100 a leap year? It is divisible by 4 and by 100 but not by 400, so it is not. 2400 is divisible by 400, so it is. Between 2001 and 2100 there are 24 leap years, from 2004 to 2096, because 2100 is skipped. The next leap day, 29 February 2028, falls on a Tuesday.
From Julius Caesar to Pope Gregory
Julius Caesar introduced the Julian calendar in 46 BC, with a leap day every four years. Its average year of 365.25 days was about 11 minutes too long, and by the sixteenth century the calendar had drifted about ten days from the seasons. In 1582, Pope Gregory XIII introduced the reformed calendar, and in the first countries to adopt it, Thursday 4 October 1582 was followed directly by Friday 15 October. Other countries switched later, Britain and its colonies in 1752.
Leap years in the Hijri calendar
The Islamic calendar is lunar, with months of 29 or 30 days and a year of about 354 or 355 days. In the tabular version of the calendar used for calculations, 11 years in every 30-year cycle are leap years, with an extra day added to the last month, Dhu al-Hijjah. In practice, many countries begin months by sighting the new moon, so actual dates can differ by a day from tabular calculations.
Leap seconds are different
Leap seconds were occasionally added to official time because the Earth's rotation is slightly irregular, not because of its orbit. They caused problems for computer systems, and in 2022 the international body responsible for weights and measures decided to stop adding them by 2035. Leap years, by contrast, will continue indefinitely.
Famous leap-year bugs
Leap days have caught out software many times. A popular music player froze worldwide on 31 December 2008, the 366th day of a leap year, because of a loop that did not handle it. A major cloud platform suffered an outage on 29 February 2012 when security certificates were given an invalid expiry date. Spreadsheet software still treats 1900 as a leap year, a deliberate error kept for compatibility with an older program. Developers test date code with 29 February and the last day of leap years for these reasons.
Leap years and money
Banks and lenders that calculate interest per day may use 366 days in a leap year, or always use 365, depending on their conventions. Salaries paid monthly are unaffected, but daily rates calculated from an annual figure differ slightly in a leap year. For most people the effect is small, but it explains tiny differences on statements.
Leap day birthdays
People born on 29 February celebrate on 28 February or 1 March in common years, and the legal date for reaching a certain age differs between countries. The chance of being born on a leap day is about one in 1,461, so in a country the size of Pakistan, many thousands of people share the date.
Common mistakes
- Treating every year divisible by 4 as a leap year, including 1900 and 2100.
- Testing software without checking leap days.
- Assuming the Hijri and Gregorian calendars add extra days in the same way.
- Confusing leap years with leap seconds.
Related tools
To find the weekday of 29 February in any year, use Day of the Week Calculator. To count days across a leap year, try Days Between Dates Calculator, and to convert to the Islamic calendar, Hijri Date Converter.
Other calendars
Other calendars handle the mismatch in their own ways. The Hebrew calendar adds a whole extra month seven times in every 19 years, while the Persian solar calendar, used in Iran and Afghanistan, starts each year at the spring equinox and places leap days by astronomical calculation, making it one of the most accurate calendars in everyday use.
Privacy
The check runs in your browser. Nothing you enter is sent to a server.
Frequently asked questions
How do I know if a year is a leap year?
It must be divisible by 4. If it is also divisible by 100, it is a leap year only when it is divisible by 400 as well. So 2024 is, 1900 is not and 2000 is.
Is 2026 a leap year?
No. 2026 is not divisible by 4, so February 2026 has 28 days and the year has 365 days. The next leap year is 2028.
Why was 2000 a leap year but 1900 was not?
Both are divisible by 100, which normally cancels the leap year, but 2000 is also divisible by 400, which restores it. 1900 is not divisible by 400.
Why do we have leap years?
The Earth takes about 365.2422 days to orbit the Sun. Without an extra day every four years, the calendar would slip about a day every four years against the seasons.
When is the next leap year?
After 2024, the next leap years are 2028, 2032 and 2036. The year 2100 will not be a leap year, so there will be a gap of eight years from 2096 to 2104.
How many leap years are in a century?
Usually 24, because the century year itself is skipped. A span of 100 years that contains a year divisible by 400 has 25: 1901 to 2000 had 25 leap years, while 1801 to 1900 had only 24.
What happens to people born on 29 February?
They have a real birthday only every four years. In common years most celebrate on 28 February or 1 March; the law in some countries sets one of those dates for official purposes.
How do I check for a leap year in Excel?
Use =IF(OR(MOD(A1,400)=0,AND(MOD(A1,4)=0,MOD(A1,100)<>0)),"Leap","Common") with the year in A1. The same rule works in any programming language.