# The Twelve Days of Christmas - How Many Presents?

By Murray Bourne, 16 Dec 2008

A partridge in a pear tree

Most people wrongly believe that the '12 Days of Christmas' refers to the days *before* Christmas. However, it's really the period starting *on* Christmas day and finishing with the Epiphany (January 6th, when the 3 kings from 'the East' brought gifts).

You may be familiar with the Christmas song, *The 12 Days of Christmas*. The first few lines go like this:

On the first day of Christmas,

my true love sent to me

A partridge in a pear tree.On the second day of Christmas,

my true love sent to me

Two turtle doves,

And a partridge in a pear tree.On the third day of Christmas,

my true love sent to me

Three French hens,

Two turtle doves,

And a partridge in a pear tree.

The song continues, adding 4 calling birds on the 4th day, 5 golden rings on the 5th, and so on up to the 12th day, when 12 drummers add to the cacophony of assorted birds, pipers and lords leaping all over the place.

Notice that on each day there is one partridge (so I will have 12 partridges by the 12th day), and each day from the second day onwards there are 2 doves (so I will have 22 doves), and from the 3rd there are 3 hens (total of 30 hens), and so on.

So, how many presents are there altogether?

Partridges: 1 × 12 = 12

Doves: 2 × 11 = 22

Hens 3 × 10 = 30

Calling birds: 4 × 9 = 36

Golden rings: 5 × 8 = 40

Geese: 6 × 7 = 42

Swans: 7 × 6 = 42

Maids: 8 × 5 = 40

Ladies: 9 × 4 = 36

Lords: 10 × 3 = 30

Pipers: 11 × 2 = 22

Drummers: 12 × 1 = 12

**Total = 364**

We observe that we have the same number of partridges as drummers (12 of each); doves and pipers (22 of each); hens and lords (30 of each) and so on. So the easiest way to count our presents is to add up to the middle of the list and then double the result: (12 + 22 + 30 + 36 + 40 + 42) × 2 = 364.

## Efficiently counting the presents

**What if we have more than 12 days? How many presents then?**

Let's now generalize the above result just in case out true love decides to be extraordinarily generous and keeps on giving us gifts - up to 100 days, say. (Multiplying and adding could get quite tedious.)

Mathematically speaking, my true love is giving me 1 + 2 + 3 + ... + *n* presents on the *n*-th day after Christmas.

The number of presents each day is 1 on the 1st, then 3 on the 2nd, then 6 on the 3rd, then 10 on the 4th. We call this set of numbers the **triangular numbers**, because they can be drawn in a dot pattern that forms triangles:

To get the **total** number of presents, we need to add those triangular numbers, like this:

1 (on the first day) + 3 (on the 2nd day) + 6 + 10 + ...

Another way of writing this is:

On the first day, 1 present.

On the 2nd day, 1 + 3 = 4 presents

On the 3rd day, 1 + 3 + 6 = 10 presents

On the 4th day, 1 + 3 + 6 + 10 = 20 presents.

These partial sums are called **tetrahedral numbers**, because they can be drawn as 3-dimensional triangular pyramids (tetrahedrons) like this:

So how many dots (representing presents) will there be in the 12th tetrahedron?

Of course, we could just start adding with our calculator, but what if my true love is very generous, and starts giving me presents for 30 days after Christmas? Or for 100 days? How would I calculate it then?

Our aim is to produce a **formula** that will allow us to find *any* tetrahedral number. Here's one of the possible ways of doing this.

Let's take (for example) the sum of the first 4 triangular numbers and represent it as a triangle. Each row in the triangle (on the left, below) adds to a triangular number and the sum of the whole triangle is the sum of the first 4 triangular numbers. Let's now re-arrange the first triangle in 2 different ways, then add the result, in respective positions. (My total is 3 times what I really need. I will divide by 3 later to cater for this).

Notice that by doing this, I get a total of 6 in every position in the result triangle. The answer of "6" is 2 more than the 4 triangular numbers that we are adding. So if we were adding the first 7 triangular numbers, our result in the right triangle would be all 9's; if it was the first *n* triangular numbers, we would get (*n* + 2).

It's easy to find the sum of the 6's, like this:

(1 + 2 + 3 + 4) × 6.

The series in brackets is just an arithmetic progression, with first term *a* = 1, common difference *d* = 1 and number of terms *n* = 4.

The formula for the sum to *n* terms of an arithmetic progression with first term *a* and common difference *d* is:

Substituting our values, we have:

= 2 × 5

= 10

So (1 + 2 + 3 + 4) × 6 = 2(5) × 6 = 60

But remember, this is 3 times what we really want, so the 4th tetrahedral number is

60/3 = 20

## General formula

In general, for the sum 1 + 2 + 3 + ... + *n*:

which is the same as

Multiplying by the (*n* + 2) that we get from what I called 'the result triangle' earlier:

Dividing this by 3 (since we used 3 equivalent sum triangles to get this far) gives us the *n*-th tetrahedral number:

## Back to our Christmas song.

On the 12th day, the number of presents will be

If my true love gave me the presents in this pattern for 30 days, I would have this number of presents:

If it was 100 days, I would have this number of presents:

Good deal.

Merry Christmas, everyone.

See the 62 Comments below.

17 Dec 2008 at 7:59 am [Comment permalink]

This is incredible. I will enjoy using it with my gifted/talented students. But first I will have to send it by my husband to show me all the ins and outs of it. Thanks for doing it.

19 Dec 2008 at 4:21 pm [Comment permalink]

i think that you didnt have to show all of the work for when i asked the question how many gifts are given altogether in the song the twelve day of christmas

23 Dec 2008 at 9:17 am [Comment permalink]

Thanks for your post. I believe that students shouldn't take a break from thinking just because school is out! This is a perfect way to keep those brains working while integrating it with something most people will be doing anyway-so why not just slip a math problem in the stocking next to the mp3 player? Great idea!

29 Dec 2008 at 6:47 pm [Comment permalink]

Well I like the formulae

31 Dec 2008 at 5:32 am [Comment permalink]

Well it suits to the occasion. I gave it to my students .They enjoyed it very much

3 Jul 2009 at 12:43 pm [Comment permalink]

Awesome, i encountered this problem in haven of all places and i came up with the long way of figuring it out (no-one told me it) but a friend of mine used the method above (or something similar), she told me if you picture it, it forms like a triangle and i just thought to myself i'm not even going there i was bewildered but fascinated but since then i have been looking at different maths problems as the whole magic of maths has got to me lol.

3 Jul 2009 at 1:08 pm [Comment permalink]

Hi Mike

What (or where) is "haven"??

9 Dec 2009 at 7:04 pm [Comment permalink]

This is so wonderful I have linked it to christianity, Jesus had 12 apostles and in 12 days 364 gifts are given which is almost the number of days in a year. Dont you think all this is the work of God? That is why I believe that mathematicians are blessed by God.

18 Dec 2009 at 1:57 pm [Comment permalink]

thank you i need this for my math homework my teach ask me a question that have to be with this thank u so much

18 Dec 2009 at 5:21 pm [Comment permalink]

[...] 12 Days of Christmas - How many presents? [...]

21 Dec 2009 at 8:49 am [Comment permalink]

great work

22 Dec 2009 at 9:19 am [Comment permalink]

thank you!

29 Nov 2010 at 12:17 pm [Comment permalink]

Well, I love the advanced maths, but not the basic counting error. The Twelfth Day of Christmas is of course the 5th. Count them. 25 26 27 28 29 30 31 1 2 3 4 5. The Epiphany is the following day.

29 Nov 2010 at 2:57 pm [Comment permalink]

Hi Fill. According to this article, "[The Epiphany] falls on 6 January or, in many countries, on the Sunday that falls between 2 January and 8 January."

The 12 day festival finishes on the 5th, and the Epiphany is on the 6th. No problem.

15 Dec 2010 at 7:26 pm [Comment permalink]

Amazing!!! really genius is the person who derive this formula.=)

17 Dec 2010 at 5:04 am [Comment permalink]

Isn't there a flaw in this? On the 1st day of Christmas, my true love gave to me a partridge in a pear tree. Sorry but that is TWO gifts.

Or is that being too picky? ;^)

Merry Christmas everyone!

17 Dec 2010 at 1:16 pm [Comment permalink]

@George: You're right! Back to the drawing board... 🙂 Happy holidays!

18 Dec 2010 at 4:15 am [Comment permalink]

This is so wonderful and is perfectly acknowledged.may the Lord grant you more wisdom to briefing us with this ideas.

happy Christmas to you.

20 Dec 2010 at 1:12 pm [Comment permalink]

this helped me w/ my assighnment

happy holidays

26 Dec 2010 at 2:26 pm [Comment permalink]

[...] problem and solution at squarecirclez about counting the total number of presents. Triangular numbers [...]

28 Dec 2010 at 8:56 am [Comment permalink]

[...] fun article detailing the mathematics involved in totaling the number of gifts (total gifts = [...]

6 Jan 2011 at 2:06 am [Comment permalink]

[...] song? It’s a nice problem, perfect for a Precalculus student. Or any student. Here’s a super nice explanation of how to calculate this total, posted at squareCircleZ. But before you go clicking that link, take [...]

27 Nov 2011 at 4:44 am [Comment permalink]

The answer is 365 gifts / how many days of the year

2 Dec 2011 at 2:21 am [Comment permalink]

shouldn't the pair tree be counted to 12x

2 Dec 2011 at 2:27 am [Comment permalink]

@Wolf: But the pear tree is not actually one of the gifts!

6 Dec 2011 at 9:09 pm [Comment permalink]

cool i love math good work

12 Dec 2011 at 4:28 am [Comment permalink]

How do you know the pear tree was not a gift?

12 Dec 2011 at 4:32 am [Comment permalink]

@Myra - Yes, after I wrote it, I also wondered if it was quite right. I think I meant to say "The pear tree was not a

separategift. That is, the bird and the tree form one gift.15 Dec 2011 at 11:02 am [Comment permalink]

You've gotta count the cows too, what else would maids be milking?

16 Dec 2011 at 9:50 pm [Comment permalink]

@Mark: Hmmm - would that be a herd of cows, or singular...? 🙂

20 Dec 2011 at 7:15 pm [Comment permalink]

[...] do the annual calculation and work out how many gifts are received over the 12 days of Christmas. Murray Bourne has all the answers and more on squareCircleZ or have a look at this YouTube [...]

31 Dec 2011 at 10:21 am [Comment permalink]

My high school algebra teacher did this as an extra credit question; I never forgot the answer...

20 Jan 2012 at 12:44 am [Comment permalink]

[...] you are lucky enough to receive all the gifts sung in the song “The Twelve Days of Christmas”, you will end up with a total of 364 gifts and if you had to give it to someone, it will cost you a bundle of money as well!The popular [...]

6 Sep 2012 at 10:29 am [Comment permalink]

I have also used this with the perms and combs unit and linked in Pascal's Triangle. The song playing in the background is always a nice change that time of year. 🙂

13 Dec 2012 at 12:50 pm [Comment permalink]

Ok my math teacher gave use this problem but yes i understand the logic but aren't we over thinking Christmas?!?

18 Dec 2012 at 10:23 pm [Comment permalink]

Ok, that is the answer counting each item as a separate gift, but are 12 Drummers Drumming 12 separate gifts, or just 1 gift of 12 Drummers? In which case the answer is 78.

18 Dec 2012 at 10:57 pm [Comment permalink]

@Alan - I'd say the 12 drummers count as one gift...

22 Dec 2012 at 5:20 am [Comment permalink]

Last night a friend asked me if there was an equation to figure out the number of presents in the 12 days of Christmas, and this is what I came up with:

T(d) = Sum(n(d+1-n)), {1,d}

T(d) = the total presents in d days

d = the total natural number of days (12)

n = the days from 1 to d, {1,d}

So if d = 12, then

T(12) = Sum(n(13-n)), {1,12}

Thoughts?

22 Dec 2012 at 5:30 am [Comment permalink]

For me the puzzle began on a long drive home from college for Christmas break many (many!) years ago, when I became drowsy and needed something to keep me awake.

I didn’t figure it out during the drive, and then after getting back to college I still failed to find the solution, so I gave up and asked a math professor. He didn’t know the answer, so it was back to square one. I tried to forget about it, but couldn’t.

I ended up graphing the result in three dimensions. Clearly the numbers [(1) + (2+1) + (3+2+1). . .] formed one corner of a cube (a specific kind of pyramid), and I thought at first that if I put four corners together the graphed numbers represented one-fourth the volume of the whole cube, but it turned out that there was an empty space inside the cube, and the volume of the graphed numbers was about one-sixth the volume of the whole cube. But it wasn’t exact, and a fudge factor was necessary. In the end, this formula turned out to be the answer, where x is the number of days:

(((x+1)^3)/6) - (x+1)/6

Dean Kennedy

23 Dec 2012 at 10:47 pm [Comment permalink]

@James - Your formula does give 364, but only works for 12 days. If we do the number of presents up to 3 days, it's a non-integer result.

@Dean - Thanks for the story! A little bit of algebra shows your formula to be the same as mine - so it is correct!

2 Jan 2013 at 4:43 am [Comment permalink]

Actually there is a fundamental flaw in this, misunderstood by many and unfortunately spread by the masses at the festive season in the form of a 'fun puzzle'

The answer is quite simply 78

As humans we look for patterns and we try to over complicated already simple things.

Having done some research into this there are several reasons why we DO NOT count accumulatively.

Firstly there are 12 days, a comon misconception is that the answer gives you a present a day excluding Christmas Day. This is not so, the clue is in the name.

Secondly, the meaning behind the song is biblical and religious. It's actually blasphemous to suggest that there are more than indicated in the song. For example A partridge in a pear tree is actually Jesus. For Christians, you cannot possibly count him 12 times. 3 French hens = Holy Trinity etc. again, this would never be intended to give 30.

I must congratulate you on your excellent method and working out though, it's very well structured and had this problem been worded differently would be completely valid.

9 Jan 2013 at 6:39 pm [Comment permalink]

@Charlotte: Nope, the song indicates accumulation. If not, it would say something like this:

But it doesn't say that.

15 Jan 2013 at 2:56 pm [Comment permalink]

Well, no, I think that Charlotte is technically correct, and the singer did actually receive only 78 gifts. The repetition is poetic, not legally accurate. But that's over-thinking it. The math problem is based on "what if?" the apparent sequence were actually what was intended. It's an interesting sequence, even though it would seem to be one that doesn't often come up in ordinary life (hence my inability to find it in my math textbook). Getting the solution was work, but it was fun.

*

15 Dec 2013 at 7:30 am [Comment permalink]

cool! I think very educational

20 Dec 2013 at 4:47 pm [Comment permalink]

very cool, not sure if your students are at a level where they know about taylor series or combinatorics, but the number of presents from n days of giving is also the n'th coefficient in the taylor expansion of:

x/(1-x)^4

just learned about combinatorics this past semester, great stuff!!

21 Dec 2013 at 1:34 am [Comment permalink]

@Peter: Thanks for sharing. I hadn't thought about a connection to Taylor's Series.

30 Dec 2013 at 4:34 pm [Comment permalink]

You actually get two presents on the first day gift: a partridge AND a pear tree.

15 Jan 2014 at 12:02 am [Comment permalink]

I agree: the pear tree should be counted as a separate gift. So should the geese eggs, the pool for the swans, the cows (or goats) for the maids, the drums for the drummers and the pipes for the pipers.

If you're going to explore absurdity, explore it in full.

25 Sep 2014 at 6:40 am [Comment permalink]

James' formula is intuitive and correct. And for a value of 3, the formula does not come up with a non-integer result, nor could it. There is no integer value for d you can choose that would produce a non-integer result, as the formula is comprised of exclusively operations of addition (in one form or another - both multiplication and subtraction are various forms of directly increasing or decreasing quantities, or, addition in a negative or positive quantitative direction). And since no division is involved, no non-whole or imaginary number could be produced by plugging in only whole numbers. So, unless my true love decides to give me a bonus gift of perhaps two-thirds of a calling bird, on say, the two-and-one-quarterth day of Christmas, only whole numbers of days and gifts will result. Plugging 3 into James' formula for the number of days will result in 10, the correct answer.

31 Oct 2015 at 5:06 am [Comment permalink]

You say "So, how many presents are there altogether?"

Partridges: 1 × 12 = 12

Doves: 2 × 11 = 22

Hens 3 × 10 = 30

Calling birds: 4 × 9 = 36

Golden rings: 5 × 8 = 40

Geese: 6 × 7 = 42

Swans: 7 × 6 = 42

Maids: 8 × 5 = 40

Ladies: 9 × 4 = 36

Lords: 10 × 3 = 30

Pipers: 11 × 2 = 22

Drummers: 12 × 1 = 12

Total = 364

...but what if we add these totals instead?

1+12=13

2+11=13

3+10=13

4+9=13

5+8=13

6+7=13

7+6=13

8+5=13

9+4=13

10+3=13

11+2=13

12+1=13

9 Dec 2015 at 8:37 am [Comment permalink]

[…] will take a while, of course, but the first step was to determine the level of detail. Making all 364 gifts in total would take a lot of time, and even just making the 78 gifts of the last verse will be a […]

11 Dec 2015 at 12:22 pm [Comment permalink]

Thx a lot but the shops sell 2 doves as 1 item so... Do you guys take 1 dove as one item?

20 Dec 2015 at 1:30 am [Comment permalink]

A colleague of mine gave me the n(n+1)(n+2)/6 formula when this problem spontaneously arose in a fun end-of-term session. She said it was based on an arithmetic progression.

I couldn't see how (now I can), but realised the answers to 1x12, 2x11, 3x10, ..., 6x7 produced an AP. What was the AP though? Turned out to be a quadratic sequence, with a 2nd diff of -2.

Halving that, we get -n^2. Working out the rest, we get 13n (zero term is 0). So the term-to-term rule: -n^2+13n. Lovely. Merry Christmas from Great Yarmouth College.

22 Dec 2015 at 4:03 pm [Comment permalink]

Yes, 1 dove is 1 item.

10 Mar 2016 at 9:27 am [Comment permalink]

[…] How many gifts in all are given in the song? […]

31 Dec 2016 at 2:19 am [Comment permalink]

And of course besides triangle and tetrahedral numbers, squares may be invoked also. Each cumulative number of presents, or tetrahedral, can be formed as the sum of squares using

Sum (n – 2a)^2 for all positive integer 0<=a<n/2. Hence:

1st day 1^2 = 1

2nd day 2^2 = 4

3rd day 3^2 + 1^2 = 10

4th day 4^2 + 2^2 = 20

5th day 5^2 + 3^2 + 1^2 = 35

6th day 6^2 + 4^2 + 2^2 = 56 ...

Thus for 12 days of Christmas we merely have six simple squares to add. Well my young nephew, posing this old chestnut found in a Christmas cracker, thought such addition easier than grappling with the formula.

31 Dec 2016 at 12:32 pm [Comment permalink]

@Chrysippo: I like your sum of squares approach. Simple is always good!

22 Dec 2017 at 12:34 pm [Comment permalink]

what about the pear trees? Surely a partridge in a pear tree is 2 gifts.

31 May 2018 at 5:35 am [Comment permalink]

[…] 12. The total number of gifts listed in “The 12 Days of Christmas” is 364 — nearly one gift for every day in the year. […]

9 Nov 2018 at 12:59 am [Comment permalink]

There is an ever quicker way to calculate the answer. Instead of making 12 calculations and then adding all the answers, just do the first six and then double their total.

9 Nov 2018 at 1:10 am [Comment permalink]

@Anthony: yes, that's what I did in the article.

5 Jan 2019 at 11:09 am [Comment permalink]

it seems that the partridge and the pear tree in which it roosts are separate gifts to be tallied to a total of 12 each or 24. Additionally, it seems that the maids a-milking must have had a cow or some other lactating animal to milk and therefore there would be 40 cows (animals) bieng milked and proffered as gifts along with the maids a-milking.

My total comes to 416 and not the erroneous report of 364.