In the Gregorian calendar, every year which is divisible by 4 is a leap year, except for years which are divisible by 100; those years are only leap years if they're divisible by 400. (This may seem complicated, but the calendar is carefully designed to keep the average number of days per year very close to the number of days in one complete orbit of the Earth.) Assuming we keep using the Gregorian calendar, how many leap years will there be between 2001 and 2999?
2999 - 2001 = 998 years
Number of possible leap years = floor (998 / 4) = 249 years
But 2100 2200 2300 2500 2600 2700 2900 will not be evenly divisible by 400
249 - 7 = 242 leap years
Thanks CPhill! I got 243 and did 249-6 instead of 249-7! Now I understood my really silly mistake :)