Leap Year Rules Explained: Why 1900 Was Not but 2000 Was
The usual rule of thumb says a year divisible by 4 is a leap year. It is right most of the time, and wrong for 1900 and 2100. The complete rule has two exceptions, and each one exists because of a measurement: the real length of a year is not a whole number of days.
This article gives the full rule, explains where it comes from, shows how to count leap years across a range, and points out where a leap day changes everyday date calculations.
The three-part rule
In the Gregorian calendar, which most of the world uses for civil purposes, a year is a leap year if it passes these tests in order:
- If the year is divisible by 400, it is a leap year (2000, 2400).
- Otherwise, if it is divisible by 100, it is not a leap year (1900, 2100).
- Otherwise, if it is divisible by 4, it is a leap year (2024, 2028).
- Anything else is a common year of 365 days (2025, 2026, 2027).
| Year | Divisible by 4 | Divisible by 100 | Divisible by 400 | Leap year |
|---|---|---|---|---|
| 1896 | Yes | No | No | Yes |
| 1900 | Yes | Yes | No | No |
| 2000 | Yes | Yes | Yes | Yes |
| 2024 | Yes | No | No | Yes |
| 2026 | No | No | No | No |
| 2100 | Yes | Yes | No | No |
A leap year adds one day, 29 February, so it has 366 days.
Why the exceptions exist
The seasons repeat every tropical year, which is about 365.2422 days. A calendar of 365-day years falls behind by nearly a quarter of a day each year, roughly one day every four years. Adding one leap day every four years fixes most of that.
The older Julian calendar did exactly that, so its average year was 365.25 days. That is about 0.0078 days too long, which adds up to one day of drift every 128 years or so. Over many centuries the calendar slid noticeably out of step with the seasons.
The Gregorian reform dropped three leap days in every 400 years by skipping the century years that are not divisible by 400. Each 400-year cycle then contains 97 leap years, an average of 365.2425 days. The remaining error is about 0.0003 days a year, around one day in 3,000 years.
average year = 365 + 97 ÷ 400 = 365.2425 days97 leap years in every 400-year cycle.
Catholic countries adopted the new rules in 1582, when 4 October was followed directly by 15 October. Britain and its colonies switched in 1752, when 2 September was followed by 14 September. Other countries changed at other times, so very old dates need care about which calendar was in use.
Counting leap years in a range
Rather than testing every year, use whole-number division. The number of leap years from year 1 up to and including year Y is:
L(Y) = ⌊Y ÷ 4⌋ − ⌊Y ÷ 100⌋ + ⌊Y ÷ 400⌋⌊ ⌋ means round down to a whole number.
To count the leap years between two years inclusive, compute L(end) − L(start − 1).
Worked example: how many leap years are there from 2001 to 2100? L(2100) = 525 − 21 + 5 = 509. L(2000) = 500 − 20 + 5 = 485. The difference is 24. That matches a direct count: 2004, 2008 and so on up to 2096 gives 24 leap years, and 2100 is not one of them.
The 400-year cycle is a handy check: L(400) = 100 − 4 + 1 = 97.
What a leap day changes in date maths
A span of one year is 365 or 366 days depending on whether it contains 29 February. From 15 January 2024 to 15 January 2025 is 366 days, because the span includes 29 February 2024. From 15 March 2024 to 15 March 2025 is 365 days, because the leap day falls before the span starts.
- The same calendar date moves forward by one weekday each common year and by two weekdays across a leap day.
- Day-of-year numbers after February shift by one in a leap year: 1 March is day 60 in a common year and day 61 in a leap year.
- A check that tests only divisibility by 4 happens to work for 1901 to 2099, but it fails for 2100.
The 400-year cycle has 146,097 days, which is exactly 20,871 weeks. That is why the whole Gregorian calendar, weekdays included, repeats every 400 years.
To test a single year, use the leap year calculator. To measure a span that crosses 29 February, a days between dates calculator handles the extra day automatically.
- Leap Year Calculator: Test a single year, list all the leap years in a range, or jump to the next one. The guide explains the rule that decides which years get a 29 February.
- Days Calculator: Use the days calculator to find how many days lie between two dates, or to add days to a date and see the result with its day of the week. Weekdays, weeks and months are reported too.
This article is general information, not professional advice. See our Disclaimer and Editorial Policy.
More articles
How to Convert Between Time Zones Using UTC Offsets
Skip the guesswork: convert the local time to UTC, then to the target zone. Includes half-hour offsets, date changes and a worked meeting-overlap example.
12-Hour to 24-Hour Time: Conversion Rules and Common Slips
Two rules cover every conversion between AM/PM and the 24-hour clock. Here they are, with a reference table, midnight and noon explained, and the usual mistakes.
Daylight Saving Time: Why Some Days Have 23 or 25 Hours
When clocks change, a local day is no longer 24 hours. Learn what shifts, how it alters durations and meeting times, and how to calculate safely.