Dear Uncle Colin,

How many zeros are there on the end of $100!$? I worked it out to be 21, but the answer sheet says it’s 23 – and my calculator just gives an error message. What do you think?

- Maybe A Tutor Has Exact, Reasoned Response?

Hi, MATHERR, and thanks for your message!

I think the correct answer is… neither 21 nor 23!

### How to tackle it

I’ve seen students try to tackle this question, and the approach that seems obvious to most people is to work out the first few factorials. But, by the time they get to 12 or so, the numbers are becoming unmanageable, and it’s quite common to give up the hunt at that point.

However, some students use what they’ve got so far to spot a pattern: 5! is the first factorial that has a zero at the end, and 10! is the first with two zeros.

And, thinking about it, that makes sense: every time you multiply by 5, you’re going to add an extra 0 on the end

I suspect you’ve got this far, and noted that multiplying by 100 must add two zeros rather than one, making a total of 21 added zeros.

### What (I think) you’ve missed

What’s missing here is that there are 100 isn’t the only number that gives you two extra zeros. In fact, the rule is to add a zero for every multiple of 5, and an extra zero for every multiple of 25 – and if you took it to, say, 1000, a further zero for every multiple of every power of 5.

We can say that more neatly: every number has a unique prime factorisation of the form $2^{p_2}\times 3^{p_3} \times 5^{p_5} \times 7^{p_7} \times \dots$, where $p$ is a non-negative integer. For example, $15 = 2^0 \times 3^1 \times 5^1 \times 7^0 \times \dots$, with all the other powers being 0. Looked at like this, when you work out $(k!)$, every number that’s multiplied adds its $p_5$ zeros.

In this particular case, we have four numbers that are multiples of $5^2$, and 16 others that are multiples of $5^1$, making a total of 24 zeros.

Hope that helps!

- Uncle Colin

## Colin

Colin is a Weymouth maths tutor, author of several Maths For Dummies books and A-level maths guides. He started Flying Colours Maths in 2008.
He lives with an espresso pot and nothing to prove.