A calendar year of exactly 365 days is a convenient round number, but it doesn't match how long Earth actually takes to complete one orbit around the sun, which is closer to 365.2422 days. That roughly quarter-day discrepancy seems trivial year to year, but left uncorrected, it would drift the calendar out of sync with the actual seasons by about 24 days every century, eventually putting the winter solstice in what the calendar calls autumn.
The basic four-year rule, and why it's not quite enough
The simplest fix, adding one extra day (February 29) every four years, was the original Julian calendar rule, and it gets remarkably close: four quarter-days per cycle accounts for almost exactly one full extra day. But "almost exactly" isn't exactly, the true orbital period is a little less than 365.25 days, so the plain four-year rule slightly overcorrects, adding a touch too much time. Over centuries, that small overcorrection compounds into a real drift.
The century exception that fixes the overcorrection
The Gregorian calendar (the one most of the world uses today) fixes this by adding an exception: century years (1800, 1900, 2000, 2100...) are only leap years if they're also divisible by 400. That's why 2000 was a leap year (2000 ÷ 400 = 5, no remainder) but 1900 was not (1900 ÷ 400 leaves a remainder), and why 2100 will not be a leap year either. This removes 3 leap days every 400 years compared to the plain four-year rule, bringing the calendar's average year length to 365.2425 days, extremely close to the true 365.2422-day orbital period, off by only about 26 seconds a year.
Because this rule involves both a four-year check and a hundred-and-four-hundred-year exception, it's easy to get wrong when calculating by hand for a specific year, especially a century year. The Leap Year Calculator applies the full rule correctly, including the century exception, for any year you enter.
Why this matters for date calculations
Leap years directly affect any calculation involving February or spanning multiple years, since getting the leap-day count wrong shifts the result by a day for every leap year crossed. This matters for calculating exact age, for anyone counting days between two dates that span February, and especially for anyone born on February 29 trying to work out how their birthday should be handled in non-leap years, a case covered in our guide on anniversary and birthday countdown math.

