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.)
Also learn a Year Code for nearby years. The year code varies by year (Leap years in bold):
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:
Sunday  
Monday through Friday, respectively  
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 code, date, and year code: 

Special case: Jan/Feb of leap year: 

Subtract largest possible multiple of 7: 

Corresponding day: 

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. Fourdigit 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 fourdigit 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. 







































2digit 

























































































































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 fourdigit 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 twodigit portion of the year.