Calculating the day of the week in your head

The following is a simple system for calculating the Day of the Week (e.g."Monday"), given a Month, Date, and Year.

For each month, memorize a Month Code. The Month Codes never change. (Good mnemonics for Month codes would be welcome.)
Month
Code
Possible mnemonic
January
4
French janvier, German vier = 4
February
0
Feb-NO-ary
March
0
March-o is Macho
April
3
TRE-pril
May
5
Cinco de mayo
June
1
June-o is UNO
July
3
 
August
6
 
September
2
Sep-TWO-mber
October
4
Oct over 2
November
0
NO-vember
December
2
DEUX-cember

Also learn a Year Code for nearby years. The year code varies by year (Leap years in bold):
Year
Code
2000
2
2001
3
2002
4
2003
5
2004
0
2005
1
2006
2
2007
3
2008
5
2009
6
2010
0
2011
1
2012
3
2013
4
2014
5
2015
6

To calculate the day of the week, just add the Month code and the Year Code to the date. Special case: in January or February of a leap year, subtract one.

Then subtract out the largest possible multiple of 7. You will be left with a number from zero through six, which gives the day of the week as follows:
0
Sunday
1 through 5
Monday through Friday, respectively
6
Saturday

That’s all there is to it.

There's a fixed example just below, or you can click the following link to work out an example of your choice .

Example: January 18, 2000:
 
Month
Day
Year
Sum
 
January
18
2000
 
Month code, date, and year code:
4
18
2
24
Special case: Jan/Feb of leap year:
   
-1
23
Subtract largest possible multiple of 7:
   
-21
2
Corresponding day:
     
Tuesday

You can actually "cast out sevens" (subtract out multiples of 7) at any point in the calculation. For instance, in the example, the date "18" can be taken as equivalent to 4 (that is, 18 - 14). Sometimes it’s easier to do the math in your head if you cast out sevens whenever possible.

You can easily find the year codes for nearby years by remembering that the year code goes up by one each common year, and by 2 each leap year, except that 0 follows 6. During leap years, remember to subtract one from the total in January and February. Four-digit years evenly divisible by 4 are leap years, except that if they are also evenly divisible by 100, they are not leap years unless they are also evenly divisible by 400. For year codes over a wider range than that given above, see below.

For the mathematically inclined: we are simply adding appropriate offsets for the month and the year to the date, and taking the result "modulo 7", since there are seven days in a week.

Year Codes from 1600 through 3999

Given a four-digit year "xxxx", add the numbers obtained from the following two tables, casting out sevens. The first table is based on the first two digits of the year, and the second table is based on the last two digits:

Cent.
x0xx
x1xx
x2xx
x3xx
x4xx
x5xx
x6xx
x7xx
x8xx
x9xx
1xxx
2
0
5
3
2xxx
2
0
5
3
2
0
5
3
2
0
3xxx
5
3
2
0
5
3
2
0
5
3
 
2-digit
xxx0
xxx1
xxx2
xxx3
xxx4
xxx5
xxx6
xxx7
xxx8
xxx9
xx0x
0
1
2
3
5
6
0
1
3
4
xx1x
5
6
1
2
3
4
6
0
1
2
xx2x
4
5
6
0
2
3
4
5
0
1
xx3x
2
3
5
6
0
1
3
4
5
6
xx4x
1
2
3
4
6
0
1
2
4
5
xx5x
6
0
2
3
4
5
0
1
2
3
xx6x
5
6
0
1
3
4
5
6
1
2
xx7x
3
4
6
0
1
2
4
5
6
0
xx8x
2
3
4
5
0
1
2
3
5
6
xx9x
0
1
3
4
5
6
1
2
3
4

Example: 1995. Looking up "19xx" in the first table gives 3 (in bold above), and looking up "xx95" in the second table gives 6 (also in bold). 3 plus 6 is 9; since this is 7 or greater, subtract 7, giving 2. Thus, the year code for 1995 was 2.

Of course, at the end of any year, you can simply add one (in a common year) or two (in a leap year), always casting out sevens, of course, to get the code for the following year; you don’t need to repeat the calculation.

Most interesting dates relative to our own lifetimes are in the 1900’s and 2000’s, so the most frequently needed values from the first table are 19xx (value 3) and 20xx (value 2).

Note that this method is not correct earlier than 1582, when the Gregorian calendar was first promulgated by Pope Gregory XIII. In fact, the Gregorian calendar was not adopted by Britain until 1752, in which year September 14 followed September 2 (most British subjects, such as George Washington, adjusted their birthdays to account for the missing 11 days). By the year 4000, the Gregorian calendar will be off by about a day, and some additional correction will probably be instituted, but just what this will be has not yet been agreed upon.

For the mathematically inclined, the first table contains (int(5.25C+2) mod 7), where C is the century portion of the year, "int(x)" is the largest integer in x, and (x mod 7) is x modulo 7. Note that these entries cycle through the values 2, 0, 5, and 3 every four centuries. Be sure to look up just the first two digits of the four-digit year; it is not corrected by one. That is, the "century portion" of the 1900’s is "19", even though the 1900’s are called "the twentieth century".

The second table contains (int(1.25T) mod 7), where T is the two-digit portion of the year.


Click here to return home