Mentally finding out the day of the week for any date is a skill you can easily learn. You don’t need to be an autistic genius – all it takes is basic memorization effort and some trivial math.
When I first learned this technique many years ago, I did it just for fun. With time, I learned to enjoy the convenience of not needing a calendar anymore. It’s far more useful than I first thought, and with just a little practice, you’ll be able to find out the days of the week much faster than when reaching for a calendar.
The Method
To find out the days of the week for any date, use the formula:[day of week] = (yearcode + monthcode + day) mod 7
If you’re not math-inclined, this may look quite scary at first, but don’t worry: using the formula is straightforward. Let’s walk through each one of of its parts.Month and Year Codes
The month codes are one of the formula’s most troublesome parts, since they don’t follow a clear logic. We’ll have to memorize them, but don’t worry with that just yet, as we will focus on an easy way to do this later. For now, here they are for reference:- January: 1
- February: 4
- March: 4
- April: 0
- May: 2
- June: 5
- July: 0
- August: 3
- September: 6
- October: 1
- November: 4
- December: 6
- 2008: 2
- 2009: 3
- 2010: 4
- 2011: 5
- 2012: 0
- 2013: 1
Days of the Week
The result is always a number from 0 to 6, and its interpretation couldn’t be any easier:- 1: Sunday; 1st day of week
- 2: Monday; 2nd day of week, and so on.
- 3: Tuesday
- 4: Wednesday
- 5: Thursday
- 6: Friday
- 0: Saturday
The Calculation
Let me show you how the formula works with an example: December 25, 2008.Step 1: Get the codes for month and year. According to the code tables, December is 6 and 2008 is 2.
Step 2: Apply the numbers in the formula:
- [day of week] = (yearcode + monthcode + day) mod 7
- [day of week] = (2 + 6 + 25) mod 7
- [day of week] = 33 mod 7; see below if you don`t know what ‘mod’ is
- [day of week] = 5
Tips for Faster Calculation
In case you’re unfamiliar with the modulo (mod) operator, all it does is give you the remainder of a division. Take, for example, 17 mod 7. If you divide 17 by 7, you get 2 and a remainder of 3. So, 17 mod 7 = 3.Now, if you don’t like the idea of performing divisions mentally, there’s hope: you don’t really need to divide by 7 to get the number’s modulo. All you need is to cast out sevens of the number. That is: take the closest multiple of seven below your number and just take the difference between them. For example, in 17 mod 7, the closest multiple of 7 below 17 is 14. Casting 14 out of 17, there’s a leftover of 3. Therefore, 17 mod 7 = 3.
An additional tip to speed up the calculation: Instead of summing up all the three numbers and calculating the modulo thereafter, as the formula suggests, do it slightly differently: don’t wait until you have a big number to calculate its modulo. You can cast out sevens as you go. Let’s do the same calculation we did above (December 25, 2008), but casting out sevens as we go.
- [day of week] = (2 + 6 + 25); let’s cast out sevens for 25 before we go.
- [day of week] = (2 + 6 + 4);
- [day of week] = (8 + 4); let’s cast out sevens for 8 before we go
- [day of week] = (1 + 4);
- [day of week] = 5
Adjustment for Leap Years
The only caveat in the formula (and it had to have one, right?) is that there will be an adjustment when dealing with leap years: you need to subtract one from the result, for the months of January and February. The other months are calculated just as any normal year.Memorizing the Month Codes
The math is pretty easy, but unless you memorize the codes, you won’t be able to perform the entire technique in your head. The good news is that the month codes never change, so you just need to memorize them once and reuse them over and over again. For an easy and fun way of memorizing lists, I strongly suggest the pegging memory system. We’ll use it here, so if you’re unfamiliar with it, please take a look first.For the peg system to work, our challenge is to come up with images for the months. Here are my suggestions, based on either similarities in word pronunciation or on cultural traditions.
- January: Jacket
- February: Freeze
- March: March
- April: Bunny
- May: Flowers
- June: Dune
- July: Jungle
- August: Barbecue
- September: Scepter
- October: Doberman
- November: Turkey
- December: Santa Claus
If you did like the images I suggested, here’s a graphical list to help you visualize and memorize them as pegs:
All right, now that we have the pegs, the next step is to create fun and remarkable scenes combining the month images with our previously learned number images. Just to illustrate, let me give you a personal example on how to do that:
August. Looking at our month code table, we see the code for August is 3. Let’s associate ‘barbecue’ (for August) with ‘heart’ (for number 3): Barbecue and heart? The first thing that comes to mind is a childhood memory of the movie Indiana Jones and the Temple of Doom. I always wondered what the bad guy did with those living throbbing hearts he extracted from people in that dark ritual. No more: what about a great barbecue outside, with pulsating hearts on the grill and everybody getting drunk with kegs of Kali Ma’s blood! Childhood memories work wonders for your memory.
This technique only works if you use your own imagination, so now it’s up to you. Always remember to make it personal and fun.
Bonus: Extend the Technique for Any Year
For practical purposes, I memorize only the code for the current year. When a new year arrives and you need its code, you can find it pretty easily: find out the day for current year’s December 31th and just sum one and you’ll have the day of the week for next year’s January 1st. Now, the only variable left in the formula is the year code. Don’t forget about the adjustment for leap years when using this trick.If, unlike myself, you want to go really wild and mentally find out the days for any year, you’ll need to grow some extra math and memorization muscles. Here’s the formula for the year code:
yearcode = (centurycode + [last two digits of year] + ([last two digits of year] div 4)) mod 7
"Div" is the operator for integer division. Just like "mod" gets the remainder of a division, "div" gets its integer quotient. For example, 17 div 7 = 2 (with a remainder of 3).The century code follows a recurrent pattern, and can be used for any date in the Gregorian calendar:
- 1600s: 6
- 1700s: 4
- 1800s: 2
- 1900s: 0
- 2000s: 6; repeating the pattern
- 2100s: 4; 6-4-2-0 pattern goes on…
Update: If you want the year codes automatically calculated for you, or simply want to see the math in action, I created a downloadable Excel spreadsheet (44 KB) that does exactly that.