The leap year rule
Why leap years exist
The calendar has to keep pace with Earth's orbit, and the two do not divide evenly: a tropical year lasts about 365.2422 days. Adding one day every 4 years, as Julius Caesar's calendar did, treats the year as 365.25 days, which overshoots by roughly 11 minutes a year. That sounds trivial, but by the 16th century the accumulated error had pushed the calendar about 10 days out of step with the seasons. The Gregorian reform of 1582 fixed it by skipping the leap day in century years unless the year is divisible by 400, bringing the average year down to 365.2425 days, accurate to about one day in 3,000 years.
The century exception is the part that trips people up. 1900 was not a leap year, because it is divisible by 100 but not by 400, yet 2000 was one, because 400 divides it exactly. Plenty of software got this wrong in both directions: some programs added a 29 February 1900 that never existed, while others assumed 2000 would follow the century rule and skipped a leap day that did happen. The next year to catch people out is 2100, which will not be a leap year despite being divisible by 4.
Frequently asked questions
Why was 1900 not a leap year but 2000 was?
The Gregorian rule skips leap years in century years unless they are divisible by 400. 1900 is divisible by 100 but not by 400, so it had no 29 February. 2000 is divisible by 400, so it was a leap year. This exception exists because adding a day every 4 years slightly overcorrects the calendar.
Do leap seconds have anything to do with leap years?
No, they are separate corrections for separate problems. Leap years keep the calendar aligned with Earth's orbit around the Sun by adding a whole day. Leap seconds keep atomic clock time aligned with Earth's slightly irregular rotation by occasionally adding a single second to UTC. One is about years, the other about days.
When is the next leap year?
After 2026 the next leap year is 2028, followed by 2032, 2036, and 2040. Leap years normally arrive every 4 years; the next skipped one is 2100, which is divisible by 100 but not by 400, so there will be no 29 February that year.