How to Become a Human Calendar

How to Become a Human Calendar

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

We also need the year code, which are also apparently arbitrary. You shouldn’t also worry about memorizing them at this point. For now, here are the ones you’ll most likely use:

  • 2005: 5
  • 2006: 6
  • 2007: 0
  • 2008: 2
  • 2009: 3
  • 2010: 4

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:

  1. [day of week] = (yearcode + monthcode + day) mod 7
  2. [day of week] = (2 + 6 + 25) mod 7
  3. [day of week] = 33 mod 7; see below if you don`t know what ‘mod’ is
  4. [day of week] = 5

5 means Thursday. That’s the day of the week for December 25, 2008.

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.

  1. [day of week] = (2 + 6 + 25); let’s cast out sevens for 25 before we go.
  2. [day of week] = (2 + 6 + 4);
  3. [day of week] = (8 + 4); let’s cast out sevens for 8 before we go
  4. [day of week] = (1 + 4);
  5. [day of week] = 5

Although there are extra steps, you will always work with small numbers, speeding up the process.

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 these images don’t make much sense to you, feel free to substitute by your own. Remember that the list doesn’t need to follow any pattern or logic; the only requirement is that each association must come easily and quickly to you.

If you did like the images I suggested, here’s a graphical list to help you visualize and memorize them as pegs:

Months Memory Pegs

(click for larger image)

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

With that, you have a complete mental calendaring system. This is a handy tool that, once learned, can be used for your entire lifetime. Try it just once or twice, and you’ll see that it really isn’t as much work as it looks like.

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.

To receive further articles for free in your inbox, type your email:

  |     |   Delicious  |   Stumble

42 Responses to “How to Become a Human Calendar”


  • Hi, the math calculation for the day of the week is jsut excellent and marvelous…i will learn perfectly and will make use of it in my daily life…

  • now its very easy to know the day of any dates.
    i just tried out
    its nice

  • Great way to put math to use in my daily life! Thnx!
    Works like a charm :)

    Btw: Is there any method like this one to find out the day of the year (i.e. May 5th is the 125th day of the year) or the week of the year (i.e. May 5th is in week 18)?

    I’d especially like to be able to tell those weeknumbers from any given date, though days of the year could be handy too for calculating how many days there are between any two given dates.

  • Paul, the calculations you described would really be useful, but I am not aware of any method to mentally perform them. Your comment even motivated me to try to come up with something, but unfortunately it started getting into many complications (such as not being able to ‘cast out sevens’, and others).
    If you ever find something regarding this topic elsewhere, please let me know – this interests me and may interest other readers as well. Thanks.

  • This way of remembering is good, but HARD!

  • This one has to be a good party trick. Although I don’t know if I will be able to remember the maths after a few drinks!!

  • I think I’ll just find a calendar to use.

    Good tip but INFORMATION OVERLOAD.

  • I wish I’d known this when I took my discrete mathematics class, my prof would have loved it, unless he already knows it.

    Very interesting, thanks!

  • I’ll honestly admit I’m not going to memorize the tactic…but I’d never seen this described before. I’m going to show it to my wife so she can use it in the classroom for gifted kids.

  • Steve, that would be very interesting! If your wife indeed decides to show the technique to the kids, would you please report the results back here?

  • wow!….

    this technique seems to be mind blowing!!…

  • Wow, this is cool. Honestly, at first I was a little scared when I saw a wall of numbers looking back on me. I was wondering where did I just go?

    This is neat..I’ll have to share it with my husband.

  • Pretty neat stuff! Is there a list of yearcodes for say 1950-2007. I have calculated all of them using the yearcode formula, but I want to make sure I’m correct………

  • Don,
    Your comment motivated me to create a spreadsheet that does the year code calculation automatically for you (it also shows the steps for calculating the days of week – for better understanding of the technique).

    Download it here. (xls, 38KB)

    Hope it is useful!

  • Yikes!! I’ll stick with my day planner. That made my eyes bug out O_o

  • Interesting stuff…
    The excel is good … but some tricky excel date things coming into play …. for reasons described here. Excel uses a Julian calendar before the excel epoch of 31st decemeber 1899, which throws the correlation out a bit!
    I had a problem very similar to this in a very hard maths comp. 20 years ago …. triggered old memories of coming up with a solution :)

  • L P: Yes, indeed the technique works only when using our current Gregorian Calendar. This calendar was adopted at different years (depending on the country), and it’s good to know what is the cut year that Excel uses. I’ll make a note in the spreadsheet.
    Thanks for letting me know!

  • wow thanks! that was really helpful. i enjoy your blog!

  • Excellent technique :) 100% perfect.

    I did developed one technique long time ago when I was young it was not 100% perfect though but it used to give 99% true results.

    This one is good enough :)

    Thanks.

  • Thank you. ]
    Very useful in addition to other methods.

  • This is cool! Thanks!

    I remember the month code as a table:
    1 4 4
    0 2 5
    0 3 6
    1 4 6

  • @Dinghai: Your method of memorizing the month’s code is particularly convenient for the math-inclined. The numbers are all perfect squares (well, except for the last one, which is a perfect square + 2). That makes it extra-easy to remember them. Thanks for sharing!

  • I use different month, day and year codes than you!
    Add them all up, find the closest multiple of seven, the difference between the two is the day of week.

    Interesting that it still works both ways.

  • @Melissa: I am very interested in your system. Can you quickly describe the month codes you use?

    I assume that by using different month codes, your results for day of week must also be different than the ones I use, right? (2=Monday, 3=Tuesday, etc.)

    I would be particularly interested in a system that gives me the week of day code according to the ISO 8601 (1=Monday, 2=Tuesday, etc.). I am using week calendars all the time now, and being able to integrate the calendar mental trick with it without any number conversions would make the whole thing much, much more powerful.

    Thanks in advance!

  • Hi,
    I’m very interested in learning your system and have therefore downloaded the Excel spreadsheet that you’ve written. I have downloaded both the 44k one and the 38k one but WHERE do they go to on my comp. I can’t find them anywhere lol. Please help. And thanks for the whole topic.

  • I have just downloaded the spreadsheet without any problems (there’s actually only one spreadsheet: the two links point to the same file).

    To find the files in your computer, you might want to check the default download folder in your browser settings.

  • Can somebody help me here. I can’t make it work out with a date. May 28th 1994 – was a saturday. But i keep getting sunday.
    Yearcode=(0+94+(94/4))=117.5 117.5 is 118. 118 mod 7=6.
    So the yearcode is 6.
    Day of week=(6+2+28) mod 7=1
    1 is Sunday – what am i making wrong? Is it when i make that 117.5 is 118? Shall it stay 117? And if so would it still be 117 is it were 117,75?

  • The year code: this is a long list of numbers that correspond to the years 1900 to 1999,
    This list is broken down into 7 sections.
    Section 1:
    • 1
    • 7
    • 12
    • 29
    • 35
    • 40
    • 46
    • 57
    • 63
    • 68
    • 74
    • 85
    • 91
    • 96

    Section 2:
    • 2
    • 13
    • 19
    • 24
    • 30
    • 41
    • 47
    • 52
    • 58
    • 69
    • 75
    • 80
    • 86
    • 97
    Section 3:
    • 3
    • 8
    • 14
    • 25
    • 31
    • 36
    • 42
    • 53
    • 59
    • 64
    • 70
    • 81
    • 87
    • 92
    • 98

    Section 4:
    • 9
    • 15
    • 20
    • 26
    • 37
    • 43
    • 48
    • 54
    • 65
    • 71
    • 76
    • 82
    • 93
    • 99

    Section 5:
    • 4
    • 10
    • 21
    • 27
    • 32
    • 38
    • 49
    • 55
    • 60
    • 66
    • 77
    • 83
    • 88
    • 94
    Section 6:
    • 5
    • 11
    • 16
    • 22
    • 33
    • 39
    • 44
    • 50
    • 61
    • 67
    • 72
    • 78
    • 89
    • 95
    Section 7
    • 0
    • 6
    • 17
    • 23
    • 28
    • 34
    • 45
    • 51
    • 56
    • 62
    • 73
    • 79
    • 84
    • 90
    This is a long list of numbers, but if you work on each one for a few days you will be able to recall the list. It took me only a few hours to create a link story for each list.

    For the 2000’s add 1 to each number on the list. Points to remember: 7 is alway zero. So May 28, 1994 is 2 + 0 + 5. This equals 7 or 0 (Saturday) Casting out 7 is easy if try to see have close a number is to 7. 6 is 1 away or Friday. 9 is two past or Monday. The Last point: if this was easy to do it would not be so mind-blowing. Practice to improve.

    • It’s interesting to see how different people prefer different balances between mental calculations and memorization.

      Fortunately, the technique is flexible enough to allow tradeoffs at different points. The more numbers you are willing to memorize — that is, the more effort you’re willing to put upfront — the faster each calculation will be.

      These are the same tradeoffs we often see in computing, such as ‘processing power’ vs. ’storage space’ — and, just as those, there’s never an ultimate answer.

      Thanks for sharing!

  • Thanks for this great info.
    I don’t seem to fully understand the “leap years adjustment” though. Could you please detail it a bit more? Perhaps some examples would help. Thanks again.

  • For a leap year you have to subtract one from your result.
    Let’s say you have the date February 14 1976. You know the code for February is 4. 14 is zero, and 1976 is code number 4.

    4+0+4=8, but you have to subtract one for the leap year. 8 minus 1 is 7, which equals 0. (Saturday)

    You can always look at the day in the leap year as one less than the original. So if you have to figure out the date for January 15, 2008, just think of January 14th instead.

    Another way to practice this is to look at the present century. I was born on a Friday. But my birthday for the same date in this century will be on a Thursday. That means that the entire code structure will be one day off for this century. So I do the same thing for dates in this century. I subtract one from the number from the final result. May 26, 1992 was (2+26+3=31) Tuesday. Therefore May 26, 2092 will be on a Monday.

    • Nice explanation, John. You threw in some interesting tips on how to make sense of the leap year adjustment idea.

      Just a quick reminder: the adjustment is only necessary for the months of January and February. Calculations for the other months behave just as in all other years.

  • Hi, Luciano just found your blog the other day. Some really great stuff on here.

    I started writing a comment a little while ago explaining another method of being able to figure out dates. By the time I got to the end of it I realized that formula you gave could be derived from the method that I used.

    The whole thing got kind of long so I wrote it up over here if you’re interested:
    http://jason-somuchtodo.blogsp.....ating.html

    It also explains why you and Melissa can use different month codes and how you can adjust the whole thing to get monday=1 (actually that’s not how I did it but you can) plus making it easier so you don’t have to memorize year codes but just calculate them easily on the spot.

    I wrote the whole thing off the top of my head so it’s not terribly well organized but you should be able to follow it.

    Of course if you already know where the whole thing is derived from then you won’t find anything knew in what I’ve written. But anyway…

    • I had no idea how the system I described here could be derived. Thanks for that — it’s a brilliant piece of reasoning you got there, Jason. I’m delighted to see how you created a “meta system” for calculating dates!

      Your method of ‘rolling back’ digits is also very ingenious. It seems that it’s great to calculate dates that span multiple years (it makes it easy to calculate dates two, three or many years ahead or behind).

      The method I describe here — at least the way I use it — is great for calculating dates in a particular year — for example, the year we’re on. The month codes, although arbitrary, are always the same and, as such, become so second-nature that, in fact, there’s only one number left to memorize each year.

      I’m saving your method for my own reference and future experiments.
      Thank you so much for the fresh new look to the calendar method!

  • This technique is awesome…
    I only learned it for fun but then I discovered is far more useful…
    I use it for example to know the thursdays of a particular month…
    Just having the first day of the month and adding 7..
    Really, It’s useful. Thanks for sharing it, man =)

  • I saw this and got really excited, but I can’t figure out where I’m going wrong with July 4, 1776. (4+76+(76/4)) = 99 mod 7 is 14 so year code is 2. (2+0+4) = 6 So it should be a friday, but it’s a thursday. I don’t see where I’m going wrong.

Leave a Reply