Trailing Zeros
Problem
How many trailing zeros are there in 100! (factorial of 100)?
Hints
Hint 1
Think about prime factorization of factorial numbers.
Hint 2
Which number is rarer in forming 10s, the factor 2 or the factor 5?
Hint 3
Be careful to count multiples of 25, 50, 75, and 100 because they contribute extra factors of 5 beyond the first.
Solution
Show Solution
24
Show Explanation
Trailing zeros in a factorial come from factors of 10. Every 10 is made by multiplying 2 × 5. In a factorial like 100!, there are always plenty of 2's from even numbers, so the limiting factor is how many 5's you can find.
- First, count how many multiples of 5 are between 1 and 100: there are such numbers (5, 10, 15, …, 100).
- But some numbers contribute more than one 5 in their prime factorization. Specifically, multiples of 25 (like 25, 50, 75, 100) contribute an extra factor of 5, because . That adds another factors of 5.
So the total number of 5's is , and each pairs with a 2 to make a trailing zero. Therefore 100! ends with 24 trailing zeros.
Follow-up Question
Follow-up
What if it is ? Could you solve it?