The 12 Days of Christmas is an English Christmas carol that we’re sure many of us have playing in our head as soon as we read the song title.

It is a classic, but have you ever stopped to think and realise just how many numbers are mentioned in the catchy tune?

It is wonderfully mathematical, especially when it comes to legs. Yes you read that right.

Now, as weird as that sounds, University of Oxford mathematics professor, Dr Tom Crawford, explained the importance of the number of legs in the carol in an post written for the university.

Tom also has a Youtube channel, Tom Rocks Maths, where he has grown his platform to 88.8K subscribers.

He explained the reason for his counting of legs, saying: “To really get to grips with the maths hidden in the 12 Days of Christmas we really are going to count legs.”

It was a question that was posed on BBC Radio 4’s Today programme a few years back, which is what originally prompted Tom to demonstrate his findings and work out the numbers hidden within the Christmas song.

Tom explains that the first task is to work out what each of the named gifts actually are. He explains: “I can confirm that if you are unsure of the type of animal being mentioned, it is in fact a bird.”

He then proceeded to detail the first four gifts, which are as follows:

Next in the song comes the iconic line that absolutely everyone loves, all together now, “FIVE GOLD RINGS”.

Tom continues: “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.”

To mark the halfway point of the song, Tom launches into a short digression into the world of economics, saying: “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.”

With this rather wild fact out of the way, Tom reaches gift number seven, a swan, which gives 7 x 2 = 14 legs to add to the ongoing total.

Gift number eight brings with it a slightly more complex sum, Tom explains: 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.”

The final four gifts all contain humans.

With the counting done and dusted, Tom delves into the mathematical insight of the puzzle, he says: “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.”

So what happens when you put this all together?

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

So there you have it, the 12 Days of Christmas encompasses a total of 808 legs – that’s certainly a fact to remember and be armed with when attending your next pub quiz.