On an Advent calendar with doors numbered 1 through 24, the numbers add up to 300. Pair 1 with 24, 2 with 23, and keep working inward. Every pair has the same total.

This calculation adds the printed labels, with each used once. The number of treats or gifts behind the doors is a separate count.

The numbers 1 through 24 form twelve disjoint pairs: 1 with 24 through 12 with 13. Every pair sums to 25, so twelve pairs total 300.
Each label appears once among the twelve pairs.Credit: MathBlog

Pair the smallest label with the largest

The first pair is \(1+24=25\). Move one step in from both ends and the next is \(2+23=25\). Increasing the smaller label by one and decreasing the larger by one keeps the pair’s sum unchanged.

The final pair is \(12+13=25\). Every label from 1 through 24 has now been used.

Count the pairs before multiplying

Twenty-four labels make twelve pairs. Add 25 twelve times, or multiply:

\[\frac{24}{2}\times 25=12\times 25=300\]

The sum is 300. Multiplying 24 by 25 would count twice as many pairs as we have. That doubled total, 600, needs to be divided by two.

Use the same idea for another last number

For a positive whole number \(n\), let \(S_n\) be the sum of the integers from 1 through \(n\). Write the list once forward and once backward. Each position in the two lists adds to \(n+1\), and there are \(n\) positions.

\[2 S_n=n(n+1),\qquad S_n=\frac{n(n+1)}{2}\]

This also works when the number of labels is odd. For labels 1 through 25, twelve pairs total 26 each and the middle label 13 stands alone:

\[12\times 26+13=325=\frac{25\times 26}{2}\]

Try the labels still to come

After the door marked 10, suppose you want the sum of the remaining labels 11 through 24. The first ten labels total \(\frac{10\times 11}{2}=55\). Subtract their sum from 300:

\[300-55=245\]

Check it by pairing 11 with 24, 12 with 23, and so on through 17 with 18. There are seven pairs, each totaling 35, and \(7\times 35=245\).

Check the actual labels before using the formula. A missing number, a repeated number, or a different last number changes the sum.

Further reading