Recently we learnt a very impressive trick: tell us the date you were born and we will almost immediately tell you what day of the week that was.

This trick is a favourite of savants and lightning calculators. We are not in their league; we are merely average. But still, we can perform the calendar trick almost as quickly, and without cheating: we really do all the mental calculations required.

In fact, most people could do exactly what we do, just after a little bit of practice. Our goal here is to show you how.

Doing it the hard way

Let's look back to Thursday, 25 May 1961, when President Kennedy announced the goal to land a man on the Moon. Finally, on 20 July 1969 Neil Armstrong stepped on the Moon, and you want to know what day of the week that was. How could you do it?







Enter the date of your birth and push the button. (If it doesn't work, check that JavaScript is enabled in your web browser.)

The difference between the two dates is six ordinary years, two leap years, one 31-day month and one 30-day month, and then go backwards five days (from the 25th of the month to the 20th). Summing up, there are a total of (6 x 365) + (2 x 366) + (31 + 30) − 5 = 2978 days between the two dates. Dividing by 7, we get 425 weeks with 3 days left over. Since 25 May 1961 is a Thursday, it will be Thursday again 425 weeks later, and 3 days after that will be a Sunday. So, 20 July 1969 is a Sunday. Ta da!

But let's be realistic. It is very unlikely that you could perform these calculations quickly enough to impress anyone. And neither could we.

Doing it quickly: four easy pieces

As our example illustrates, it is fundamentally straightforward to calculate the day of the week of any date. All we need is the day for a convenient reference date, together with the basic facts about our Gregorian calendar: the lengths of the months and the rules for leap years.

The key is to streamline the calculations as much as possible. Many people have written about this calendar trick, and there are as many approaches. Here, we have attempted to simplify the procedure as much as possible for dates in the most commonly requested range. So, our recipe works very well for an audience of real people, but not so well if you are confronted by, say, the ghost of Marie Antoinette.

Our recipe has three big advantages:

The amount of memorisation and calculation required is kept to a minimum.

The most difficult calculations are to add on single-digit numbers, and to find the remainder after dividing by 7.

Each calculation requires only one of the day, month or year components of the given date. This means that you can begin to calculate while the date is still being read out to you.

We'll assume that you're already a pro at adding on single-digit numbers. Then, the key to becoming super quick at the date trick is to become really good at finding remainders after dividing by 7. Also, you will have to memorise the green and purple tables below. (It used to be you had to memorise times tables: now it's Time tables!)

The four main parts of the calculation are described below. In order to help you master them, we have prepared a separate practice web page. This page generates random numbers and dates for you to test yourself, with the answers within easy (but not too easy) reach.

Pressing the button will open a separate page for practising the calculations.

Remainder after dividing by 7. You will have to practise finding the remainder of numbers (from 0 to 54) when divided by 7. The possible remainders are from 0 up to 6. For example, 0, 7, and 14 all leave a remainder of 0, 33 leaves a remainder 5, and 52 leaves a remainder of 3.

Month offset. Each of the twelve months is assigned a number, as given in the following table:

Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 6 2 2 5 0 3 5 1 4 6 2 4

You must memorise this table, but it is not as hard as it may seem. One helpful approach is to split the twelve numbers into four groups of three: 622, 503, 514 and 624. Note that the first and last groups only differ in the final spot, and that the second and third groups are also similar, only differing by 1 in the second and third spots.

Decade offset. Each decade is also assigned an offset number. The decade offsets for 1900 to 2010 are given in the following table:

1900 1910 1920 1930 1940 1950 1960 1970 1980 1990 2000 2010 1 6 5 3 2 0 6 4 3 1 0 5

Again, you can identify mini-patterns to help memorise the table. For example, 16 and 32 and 64 appear in the table, with 3 the offset for the 1930s and 6 the offset for the 1960s.

Leap year offset. The final ingredient is to account for leap years. These are counted from the previous turn of the decade, and are given by the following table:

0 1 2 3 4 5 6 7 8 9 even 0 0 0 0 1 1 1 1 2 2 odd 0 0 1 1 1 1 2 2 2 2

For example, 1937 appears in an odd decade (since 3 is odd), and the table gives us a leap year offset of 2 (look it up under 7 in the odd row). This offset accounts for the two leap years after 1930 and up to 1937: that is, 1932 and 1936.

It is easy enough to memorise the table of leap year offsets, but it is probably better to not bother. Instead, it is easier to simply remember the relevant leap years: 4 and 8 in even decades, and 2 and 6 in odd decades. Then, we just count 1 for each leap year after the turn of the decade.

Let's do it! (1900 to 2019)

We'll now go through the complete details of a birthday calculation, using the great boxer Muhammad Ali as our example. Ali was born on 17 January 1942.

You first ask Mr. Ali (respectfully!) to state his birthday in the natural order: "Seventeenth ... of January ... nineteen forty-two": you can emphasise that the date should be recited slowly, to make sure you hear it correctly. As the different components of the date are called out, you then perform the following calculations in your head.

The first five steps should be self-explanatory. Start with the day of the month, and the month and decade offsets are added on. Then the final digit of the year is added on, together with the leap year offset.

Finally, in Step 6, the total is divided by 7, and the remainder is translated into the day of the week: 0 = Sunday, 1 = Monday, 2 = Tuesday and so on. For Mr. Ali you end with a 6, making the day of his birth a Saturday. You're done, and you may now bow to the thunderous applause!

The fine print: January and February of leap years

The calculations above will work for about 96% of the dates in our range. However, if the date is in January or February of a leap year, then you have to subtract 1 from your total. Of course, as we remarked above, it is very simple to spot leap years. They are just the years ending in 0, 4 and 8 in even decades, and the years ending in 2 and 6 in odd decades. For now, the only exception to be aware of is 1900, which is not a leap year. We discuss this annoying exception below.

For example, let's calculate the day of birth of Michelle Obama, born on 17 January 1964. The calculation for the First Lady would be similar to that for Ali, and we again end with a 6. But, Mrs. Obama was born in January of a leap year, so we subtract 1, resulting in 5: Mrs. Obama was born on a Friday.

You now have everything you need to perform the calendar trick on your friends. Below we consider more technical details: years from other eras and some finetunings of the method, both of which you may wish to consider. But you are able to start practising now. PUSH THE BUTTON!

Even finer print: other centuries

What about a date later in the 21st Century? Luckily that's easy: simply subtract 1 from the corresponding 20th Century calculation. For example, as we calculated, Neil Armstrong stepped on the moon on a Sunday, which our recipe would compute as a 0. Now, as you have probably already deduced, subtracting 1 from 0 is recorded as a 6. So, the centenary of the moon landing, on 20 July 2069, will be a Saturday.

Marie Antoinette requires a century offset of +4.

The same approach works for other centuries: you can calculate the corresponding date in the 1900s and then adjust by the appropriate century offset. In the previous example, we used the offset of -1 for the 2000s, and of course the 1900s have 0 offset. The offset for the 1800s is +2 and, just in case you are confronted by the ghost of Marie Antoinette, the offset for the 1700s is +4.

In fact, for our Gregorian calendar these are all the century offsets you ever need to remember, since the offsets cycle every fourth century. For example, the offset for the 2100s is +4, the same as for the 1700s.

The finest print: leap year exceptions

We think of leap years as those years divisible by 4. However, there is one exception, introduced by Pope Gregory III in 1582 for our new calendar: in the Gregorian calendar the century years are not leap years. So, for example, 1900 was not a leap year. However, the Pope also introduced an exception to the exception: every fourth century year is a leap year. So, for example, 2000 was a leap year.

These leap year exceptions affect the above calculations in two places. First, for January and February of 1900, we do not have to make the leap year adjustment as we did for Michelle Obama. Secondly, for January and February of century leap years, such as in 2000 and 2400, we have to subtract 1 from the century offset.

Let's illustrate this with an example. James Bond (the famous ornithologist) was born on 4 January 1900. This computes to a 4 (with no leap year correction needed), and so Bond was born on a Thursday. The centennial of Bond's birth was on 4 January 2000: we subtract 1 for the century offset and 1 again for the 2000 leap year exception, and conclude that Bond's centennial occurred on a Tuesday. By comparison, 2100 is again a leap year, and so no extra leap year adjustment from 1900 is required: we simply add 4 for the century offset and conclude that Bond's bicentennial, on 4 January 2100, will occur on a Monday.

How does it work?

Think of 1950 as our anchor year. Notice that for 1950 all the year and leap year offsets are 0. So, Steps 1 and 2 are all we need to find the days of dates in 1950.

Now consider any other year. To find the days in this new year, we simply have to shift the corresponding days in 1950 by a fixed offset number (keeping in mind the January and February fine print, in the case of a leap year). The remaining steps are just designed to find this offset number, for the years in our range, as simply and as quickly as possible. Finally, for years outside our range, we just have to incorporate as well the appropriate century offset. That's it! (See why the method works in more detail.)

Finetuning the trick and finding out more

As we mentioned, there are many different approaches to the calendar trick. Below are some slight variations which you may wish to consider, and some suggestions for where to explore further. Enjoy!

1. In most performing situations, you will have a good idea of how old your audience will be. This means that you can just focus upon the most likely decades (and bluff a bit if you happen to get caught out).

2. To make the numbers to be added even smaller, you can have the offsets and/or remainder range from -3 to 3.

3. Another way to make the numbers smaller is to divide by 7 at each step, just keeping the remainder.

4. You may have noticed that in the video of Art Benjamin, he asks for the date in reverse order, starting with the year. If you prefer the dates delivered in this order, you would pretty much just reverse the order of the steps in our recipe.

5. If you are going to be given dates over a wide range of years, then you will also need the century offsets. But, you will not need the last two decade offsets in our table.

6. The day calculator built into this web page is a bit crude. For example, it will give the day of a nonsensical date such as 31 February. There are many polished and free programs out there, which can also cope with different types of calendars. (For our Macs, we are very happy with the program Date Calculator.) Also there is a nice iPhone application called Day of the week.

7. For other methods of quickly calculating the day of a given date, we recommend that you check out the Wikipedia page on calculating the day of the week. Also an impressively explicit formula for the day of a given date can be found on Claus Tondering's website.

8. Our calendar recipe is based upon the recipe described in the terrific book by Arthur Benjamin and Michael Shermer, Secrets of Mental Math: The Mathemagician's Guide to Lightning Calculation and Amazing Math Tricks. If you are interested in going beyond our recipe, and in finding out more about lightning calculation, this book is absolutely a must-have. You can also watch a video of one of Art Benjamin's shows on the TED website, in which he performs all sorts of lightning calculations.

About the authors

Burkard Polster and Marty Ross are Australia's tag team of mathematics. They write the Maths Masters column for the The Age newspaper in Melbourne. For many years they have been delivering the mathematics lecture series at the Melbourne Museum, visiting schools and touring the countryside with their Mathematical Mystery Tour. Currently, Burkard is lecturing mathematics at Monash University, and Marty is somewhere, lost in the woods.

Check out what else Burkard and Marty are up to at www.QEDcat.com.