Someone described this little trick, devised by Princeton University’s John Horton Conway, as simple. I suppose if you’re not someone whose eyes immediately glaze over at the first hint of a word problem, then perhaps it is. Unfortunately, I am one of those people, but I’m going to do my best to explain this to you anyways because it really is pretty neat.

To start: Conway is a math professor with expertise in knot theory, number theory, and combinatorial game theory (he created a famous computer simulation called Game of Life in 1970). This trick is known in math circles as a “calendar calculation,” and Conway’s theory is called the Doomsday Algorithm. Being able to do this quickly, and in your head (so that you can impress your friends) will take some memorization, so pay attention.

First, you need to memorize the number that corresponds to the month of a date:

Photo Credit: Cosmos Magazine

Okay. Now, here are the steps:

1. Divide the last two digits of the year and divide the number by 4.
2. Add the result to the number you began with, disregarding any remainder.
3. Add the month code number.
4. Add the day of the month.
5. IF your date is from the 1800s, add 2 to the total. IF your date is from the 2000s, subtract 1.
6. Divide the total by 7, and this time focus on only the remainder.

Here’s where you need the codes that correspond to the day of the week:

Photo Credit: Cosmos Magazine

Note: There is an exception for Leap Years in January or February – you subtract 1 from the month.

Note 2: There is an alternative way to get to the same answer, especially if doing division on big numbers in your head can be a challenge. You can “cast out sevens” as you go instead of waiting for the end. Basically, you can reduce the numbers by dividing by 7 at any earlier point in the process.