A trailing decimal zero comes from a factor of ten, and ten is two times five. In a factorial, factors of two are more abundant, so the number of available factors of five controls the zero count.
Need help choosing a next step? Scan the contact QR code below or contact Hanlin on WeChat. Send AMC10 FACTORIAL ZEROS 1101 and tell us your school year and question.
Count the first factor of five
In this original problem, find the number of trailing zeros in 75!. The multiples of five from five through seventy-five supply at least one factor of five each.
There are floor(75/5) = 15 such multiples. Stopping here misses numbers that contribute more than one factor of five.
Count the additional factors
The numbers 25, 50 and 75 each contain a second factor of five. They supply floor(75/25) = 3 additional factors. No number in this factorial is a multiple of 125, so there is no third layer.
The total is 15 + 3 = 18. Counting 25 in both layers is intentional: one count represents its first five and the other its second five. It is not an accidental duplicate of the same prime factor.
Check that twos do not limit the pairs
Even the thirty-seven even numbers up to seventy-five supply more than eighteen factors of two. Several of them contain additional twos as well.
Thus every counted five can be paired with a two to make ten, giving exactly eighteen trailing zeros. After all eighteen fives are used, a nineteenth ten cannot be formed merely from the remaining twos.
State the general counting rule
For a positive integer n, add floor(n/5), floor(n/25), floor(n/125) and further powers until the terms are zero. For example, 100! gives 20 + 4 = 24 trailing zeros.
This counts zeros at the end of the decimal representation, not all zero digits anywhere inside the number. It also differs from asking for the final nonzero digit.
This is an original AMC 10 practice problem, not an official question. The factor-counting explanation is useful preparation for more extended number theory, including AIME learning, without requiring the enormous factorial to be written out.
Continue reading: AMC 10 Number Theory: Use a Cycle to Find a Large Power's Units Digit.
Contact Hanlin
Planning a first attempt or reviewing a topic you find difficult? Scan the QR code and send AMC10 FACTORIAL ZEROS 1101. Include your school year, country or competition region, experience and the question you want to discuss.

On your phone, use the button or save the QR image and scan it within WeChat.
Official information and further reading: Source 1
