Leap Year Calculator


We know any year that is evenly divisible by 4 is a leap year : for example, 1988, 1992, and 1996 are leap years. 

However, there is still a small error that must be accounted for. To eliminate this error, the Gregorian calendar stipulates that a year that is evenly divisible by 100 (for example, 1900) is a leap year only if it is also evenly divisible by 400. 


For this reason, the following years are not leap years:
1700, 1800, 1900, 2100, 2200, 2300, 2500, 2600
This is because they are evenly divisible by 100 but not by 400. 

The following years are leap years:
1600, 2000, 2400
This is because they are evenly divisible by both 100 and 400. 


How to determine whether a year is a leap year

To determine whether a year is a leap year, follow these steps:
  1. If the year is evenly divisible by 4, go to step 2. Otherwise, go to step 5.
  2. If the year is evenly divisible by 100, go to step 3. Otherwise, go to step 4.
  3. If the year is evenly divisible by 400, go to step 4. Otherwise, go to step 5.
  4. The year is a leap year (it has 366 days).
  5. The year is not a leap year (it has 365 days).

Formula to determine whether a year is a leap year

Use the following formula to determine whether the year number that is entered into a cell (in this example, cell A1) is a leap year:

=IF(OR(MOD(A1,400)=0,AND(MOD(A1,4)=0,MOD(A1,100)<>0)),"Leap Year", "NOT a Leap Year")

 If the value in cell A1 is this        The formula returns
   ----------------------------------------------------------
   1992                                   Leap Year
   2000                                   Leap Year
   1900                                   NOT a Leap Year

Comments

Popular posts from this blog

CSS Mouse Cursors and Custom Cursors

Block right click or disable keyboard on web pages

What is PAD file? "Submit your software with PAD file to Download.com"