Why a leap year!
One Year is Approximately Equal to 365.24219878 Days (Give or Take)
The Egyptians called it 365 and left it at that. But their calendar got out of step with the seasons, so that after around 750 years of this they were celebrating The Fourth of July in the middle of the winter! Anyway for Indians, it would have hardly mattered, cause we have little or no seasons
The Romans wised up and added the leap day every four years to get the 365.25 day Julian year. Much better, but notice that this time the year is longer than it ought to be. The small difference between this and the true length of the year caused the seasons to creep through the calendar once again, only slower and in the other direction. After about 23000 years of this, July Fourth would once again fall in mid-winter.
Fortunately things never reached that sad state. By 1582 the calendar was about ten days out of whack, so Pope Gregory XIII included the correction that's still in use today.
If the year is divisible by 100, it's not a leap year unless it is also divisible by 400.
More recently, proposals for fixes have gotten even better than that. One suggested change is to add on "if the year is also divisible by 4000, it's not a leap year."
Here's what it looks like:
Egyptian
Formula: 365
Year length: 365
Error: 0.24219878
Years to get 6 months out of whack: 754
Julian
Formula: 365 + 1/4
Year length: 365.25
Error: 0.00780122
Years to get 6 months out of whack: 23,409
Gregorian
Formula: 365 + 1/4 - 1/100 + 1/400
Year length: 365.2425
Error: 0.00030122
Years to get 6 months out of whack: 606,272
Modern?
Formula: 365 + 1/4 - 1/100 + 1/400 - 1/4000
Year length: 365.24225
Error: 0.00005122
Years to get 6 months out of whack: 3,565,426