# How to calculate the day of the week

I’m about to describe a technique you can use to calculate what day of the week any given date fell / will fall on. This is something I’ve learnt for the Mind Sports Olympiad for an event called the Decamentathlon. This features 10 tests on 10 different disciplines, one of which is Mental Calculations.

When I first entered this event I didn’t really know what would come up and I was surprised to see some questions on this subject. I had no idea how to work these out in a reasonable amount of time and just had to resort to guesses. For future events though I came up with the following method.

I’ve also entered the Mental Calculations World Championship on a few occasions and used it there, although with little overall success as the competition is extremely strong and some of the questions are incredibly tough. I can at least compete on these date questions though and have outscored some of the top Mental Calculators on these sections before.

It’s not actually the same method that the top Mental Calculators use, they use reference points (known dates) and then work forwards or backwards to the given date. The method I use is less elegant and the one computers would use, although it’s served me very well over the years.

The method is also something you can use to impress people by working out what day they were born on, or what day a certain historical event would have happened.

The method is based on an algorithm called Zeller’s Congruence, the Wikipedia page for this method can be accessed here if you want more information on it. The formula they give is slightly different and, in my opinion, a bit harder to use, the one my method is based on is shown below.

**w=q+[13m/5]+D+[D/4]+[C/4]-2C**

This is the formula and it doesn’t look too promising at first, I know my initial reaction was something like “oh well, maybe I’ll just have to keep guessing these”. However it isn’t as bad as it looks and I will break it down into a series of steps. I believe that anyone with reasonable maths skills who is prepared to practice can use this method with success.

First of all, what to all the letters and symbols mean?

w – This is the weekday where Monday = 1, Tuesday = 2 and so on up to Sunday = 7

q – This is the day of the month, for example I’m typing this on the 22nd of June so it would be 22.

m – This is the month, however in order to make the formula easier (!) it is assumed that the extra “leap day” on the 29th of February falls on the end of the year. Therefore March = 1, April = 2, May = 3 and so on. January is considered the 11th month of the previous year and February is considered the 12th month of the previous year.

D – This is the final 2 digits of the year. We’re currently in 2017 so D here would be 17. Remember to deduct 1 from the year if you’re dealing with a date in January or February (see above).

C – This is the first 2 digits of the year (assuming a 4 digit year), or else it’s the year with “D” removed. For 2017 C would be 20. For the year 678 C would be 6 and for the year 68472 (!) C would be 684. This method can only be used for years from 1 AD onwards, not BC years.

[] – Anything in square brackets means “the integer part of”. This actually makes the calculations easier as despite all the division in the formula we’re just working with whole numbers. In order to work out something like [87/4] I would actually recommend rounding 87 down to the next multiple of 4 (84) and then dividing that by 4 to get 21.

Okay, so here are the steps to work through.

**Step 1 – The month calculation.**

The most difficult part of the formula is the bit with the m in, however as we’re just adding and subtracting a series of numbers it makes sense to do this part first. Work out what m is (remember that it starts with 1 for March) and multiply by 13. Then round this number down to the nearest multiple of 5 and then divide by 5. Sounds tricky, and it probably is at first, but that’s the hardest part done and you’ll speed up with practice.

**Step 2 – Add the day to the running total.**

We now go back to the start of the formula and add on q, which is the day of the month. From now on we’re just keeping a running total and the calculations are a lot simpler.

**Step 3 – Add the last 2 digits of the year to the running total.**

This is the “+D” part of the formula, we simply add this to our running total. Remember though that if your date is in January or February then you’ll need to subtract 1 from the year, since these are considered months 11 and 12 of the previous year.

**Step 4 – Divide the last 2 digits of the year by 4 (round down to the nearest whole number), then add it to the running total.**

This is the [D/4] part of the formula, round D down to the nearest multiple of 4 and then divide by 4. Add this to the running total

**Step 5 – Divide the first 2 digits of the year by 4 (round down to the nearest whole number), then add it to the running total.**

This is the [C/4] part of the formula, exactly the same as the last step except you’re taking the first 2 digits of the year instead of the last 2 digits.

**Step 6 – Multiply the first 2 digits of the year by 2, then subtract from the running total.**

This is the 2C part of the formula at the end, we now need to double the first 2 digits of the year and subtract it from our total.

**Step 7 – Add or subtract multiples of 7 until you reach a number between 1 and 7**

Because the days of the week repeat every 7 days, we can actually add or subtract multiples of 7 to our running total at any point. However we need to do this at the end to work out which day of the week it is. Once we’ve got a number between 1 and 7, this gives us our answer. Watch out for negative numbers though, for example if you have -2 then this is NOT Tuesday. You need to add 7 to the total to get to 5, which would be Friday.

Okay, if you’ve made it this far, well done! I’ll now work through a couple of examples just to clarify these steps and (hopefully) show that it isn’t as complicated as it looks. I’ll first use today’s date which is the 22nd of June 2017.

**Step 1**. June is month 4 according to this method (remember that we start with March), multiplying by 13 gives us 52. We round this down to the next multiple of 5 (50) and divide by 5 which gives us 10. This is now our running total.

**Step 2**. Add on the day (22) to the running total (10) to give us 32.

**Step 3**. Add on the last 2 digits of the year (17) to give us 49.

**Step 4**. Round down the last 2 digits of the year (17) to the next multiple of 4 which is 16. Divide this by 4 to give 4. Adding 4 to our running total gives us 53.

**Step 5**. The first 2 digits of the year are 20 which is already a multiple of 4. Divide by 4 to get 5. Add this to our running total, this gives us 58.

**Step 6**. Multiply the first 2 digits of the year (20) by 2, this gives us 40. Subtract from our running total to give us 18.

**Step 7**. We now need to keep subtracting multiples of 7 until we reach a number between 1 and 7. This example isn’t too bad as we can subtract 14 to reach 4. This gives us our final answer and Thursday is the 4rd day of the week. Thankfully it is a Thursday as I type this!

That example wasn’t too bad but I’ll do another trickier one using a February date. I’ll go for the Valentine’s Day Massacre, a bit random but I figured from the name that would have taken place in February! The actual date was the 14th of February 1929.

**Step 1**. February is the “final” month using this method so m=12. Multiply by 13 to get 156 (12 x 12 = 144 which is better known, add another 12 to this). Round down to 155 and then divide this by 5 to get to 31. Not the easiest to work out but that’s the hard part done now.

**Step 2**. Add on the day (14) to our running total (31) to get 45.

**Step 3**. Add on the last 2 digits of the year (28, don’t forget to subtract 1 from the year as February is treated as the 12th month of the previous year) to get 73.

**Step 4**. Divide the last 2 digits of the year (28, again don’t forget to subtract 1) by 4 to get 7. Add 7 to our running total to take it up to 80.

**Step 5**. The first 2 digits of the year are 19, round down to the next multiple of 4 which is 16. Divide this by 4 to get 4. Add 4 to our running total which is now 84.

**Step 6**. Multiple the first 2 digits of the year (19) by 2 to get 38. Subtract this from our running total to reach 46.

**Step 7**. 42 is a multiple of 7, subtracting this from our running total leaves us with 4 which is also a Thursday. Checking this with Google (other search engines are available…) shows this to be correct.

That’s about it. I hope you’ve found this interesting, although I guess if you haven’t then you’ll have stopped reading this a long time ago! It does take a bit of time to nail the steps, practicing the 13 times tables and quickly adding up numbers may be useful too, however good luck if you do decide to learn how to do this.