We've all seen those emails go around that go something like this:

Take the month and day of your birthday and
1. Multiply the number of the month by 5
3. Multiply by 4
5. Multiply by 5
6. Add the day of the month
7. Subtract 205
The last two digits are the day of the month, and the first digit(s) is the month number.

So, you have your doubts and go through the calculation to humor the sender. Let's see, my birthday is May 7th, so I should get 507.
1. 5 times 7 is 35
2. 35 plus 7 is 42
3. 42 times 4 is 168
4. 168 plus 13 is 181
5. 181 times 5 is 905
6. 905 plus 7 is 912
7. 912 minus 205 is 507
Amazing!!! How did they do that? It must be math magic.

Well, it's actually pretty straightforward and you can easily make up your own math magic tricks once you see how it's done.

Let's first start at the end and think about the resulting number. The last two digits are the day of the month and the first digit or digits are the month number.
• May 7th = 507
• September 20th = 920
• November 12th = 1112
• January 30 = 130
To get those numbers, we basically multiply the number of the month by 100 and then add the day of the month.
• May 7th = 5 * 100 + 7 = 507
• September 20th = 9 * 100 +20 = 920
• November 12th = 11 * 100 + 12 = 1112
• January 30 = 1 * 100 + 30 = 130
Whatever magic the seven steps above are doing, it must boil down to multiplying the number of the month by 100 and then adding the day of the month. The easiest way to prove that is what is happening is to write out the steps using variables. Lets use 'm' for month and 'd' for day.

 Multiply the number of the month by 5 5m Add 7 5m + 7 Multiply by 4 (5m + 7) * 4 Add 13 (5m + 7) * 4 + 13 Multiply by 5 ((5m + 7) * 4 + 13) * 5 Add the day of the month ((5m + 7) * 4 + 13) * 5 + d Subtract 205 ((5m + 7) * 4 + 13) * 5 + d - 205

So, for this trick to work ((5m + 7) * 4 + 13) * 5 + d - 205 must be equal to 100m + d. Let's simplify our equation and see.

 ((5m + 7) * 4 + 13) * 5 + d - 205 = 100m + d (20m + 28 + 13) * 5 + d - 205 = 100m + d (20m + 41) * 5 + d - 205 = 100m + d 100m + 205 + d - 205 = 100m + d 100m + d = 100m + d

It works! All those 7 steps are really doing is multiplying the month by 100 and adding the day. You can see that it doesn't matter what the values of 'm' and 'd' are, the trick will always work for anyone's birthday.