Credit: Shutterstock

The Maths of the 12 Days of Christmas

Dr Tom Crawford, University of Oxford/Tom Rocks Maths

The 12 Days of Christmas (no doubt you’re already singing along in your head) — love it or loathe it, it’s certainly a Christmas classic. It also happens to be wonderfully mathematical. But, before we get to that let’s talk about legs (I bet you didn’t see that one coming). To really get to grips with the maths hidden in the 12 Days of Christmas we really are going to count legs. The reason being that this very question — how many legs are there in the 12 Days of Christmas — was recently featured on BBC Radio 4’s Today programme, and what better way to get a top-up of Christmas spirit than by unpicking the answer with the author of that very puzzle…

The sophisticated maths doesn’t appear until later (which depending on your background is either brilliant or terrible news no doubt) because our first task is to work out what each of the gifts actually are. Having studied the lyrics extensively, I can confirm that if you are unsure of the type of animal being mentioned, it is in fact a bird. Here’s the first four gifts, along with the number of legs present.

Next, we come to my favourite verse (if there’s a better feeling in the world than shouting out ‘FIVE GOLD RINGS’ at the top of your voice in a school assembly I’m yet to find it) which not only departs from the birdwatcher’s guidebook, but from the animal kingdom altogether. Rings of course do not have any legs and so will add zero to our total, meaning that we can basically ignore them from this point onwards. Gift number six is another bird (I did warn you) in the form of a goose, which adds a further 6 x 2 = 12 legs to our total.

Having reached the half-way point in the song and discovered a new-found love/hate (delete as appropriate) for birds, allow me a short digression to the world of economics. With what can only be classified as ‘the world’s best idea’, the US bank PNC Wealth Management calculates the exact cost of the 364 items mentioned in the song using current prices to create the Christmas Price Index. I kid you not. It may have started as a bit of fun 35 years ago but is now seen by many as a reasonably accurate reflection of the ‘true cost of Christmas’. It even takes place annually between December 26 and January 6 to provide the most accurate reflection of the 12 gifts across each of the 12 days. It is honestly one of the best things that I have ever seen. If only all key financial decisions could be made using the lyrics of Christmas songs…

Anyway, back to the song and our current favourite limb. Gift number 7 is of course a bird (this time a swan) which gives 7 x 2 = 14 legs to add to our total. Gift number 8 is another personal favourite, because not only do we depart from our feathered friends, but we have to think quite carefully about the number of legs that we are receiving. Eight maids milking — two legs for each maid, plus four legs for each cow/goat/another farm animal that was traditionally milked by maids, gives 8 x 6 = 48 legs in total. Fortunately, it seems that our true love did indeed buy the entire stock from their local bird-keeper, as the final four gifts all contain humans (listed below for completeness).

As promised earlier, here comes the clever mathematical insight. We know the total number of legs in each verse (2, 4, 6, 8, 0, 12, 14, 48, 18, 20, 22, 24) and so just need to work out how many times we sing each one. As there are 12 days, and on each day, we recite the previous gifts that we have received, we will mention ‘day Z’ a total of 13 minus Z times. For example, the partridge verse is about day 1, and we sing it 13 minus 1 equals 12 times. Turtle doves are day 2 and are mentioned 13–2 = 11 times. French hens are day 3 and are mentioned 13–3 = 10 times etc. This pattern continues all the way up to the final verse with our 12 drummers being mentioned only once.

Putting all of this together we have our final total (and what can only be described as a small aviary). Merry Christmas!

Partridge: 12 x 2 = 24

Turtle doves: 11 x 4 = 44

French hens: 10 x 6 = 60

Calling birds: 9 x 8 = 72

Rings: 8 x 0 = 0

Geese: 7 x 12 = 84

Swans: 6 x 14 = 84

Maids: 5 x 48 = 240

Ladies: 4 x 18 = 72

Lords: 3 x 20 = 60

Pipers: 2 x 22 = 44

Drummers 1 x 24 = 24

TOTAL = 808


Dr Tom Crawford - for more maths fun check out Tom’s website and follow him on Twitter, Facebook, Instagram and YouTube @tomrocksmaths.

What next?

Follow us here on Medium where we publish regularly.

If you liked this article please ‘applaud’ it to spread the word and help others find it.

Want to read more? Try our articles on Christmas Puzzles, Funbers 10, 11 and 12, and Funbers 7, 8 and 9.

Are you a member of the University who wants to write for us on Medium? Get in touch with us here with your ideas: