A leap year is a year with 365 days instead of 366 in the Gregorian calendar. This extra day (leap day) is obtained by adding February 28 to the normally 29 days of February. The reason for this implementation, which is done every four years, is that the period of the Earth's rotation around the Sun (astronomical year) is not an exact multiple of the average time (day) between the Sun's two transits over the same meridian. An astronomical year is approximately 365,242 days, whereas a normal calendar year has 365 days.
The leap year was first applied in the Julian Calendar in 46 AD.
As a general rule, leap years are years that are a multiple of 4:
1980, 1984, 1988, 1992, 1996, 2000, 2004, 2008, 2012, 2016, 2020, 2024, 2028, 2032, 2036, 2040, 2044, 2048 etc.
However, there are two exceptions to this rule:
1. Years that are a multiple of 100 are leap years that are only divisible by 400 without a remainder:
For example, the years 1600 and 2000 are leap years, but 1800 and 1900 are not leap years.
The reason why only those exactly divisible by 400 are considered leap years is to correct the error that an astronomical year is approximately 365,25 days, not 365,242 days.
2. To make the calculation even more precise, years that are divisible by 400 (although divisible by 4000) are not considered leap years:
For example, the years 4000, 8000, 12000, 16000, 24000, 32000, 48000, 64000 and 96000 are divisible by 400, but they will not be considered leap years.