Chapter 16 of 20 · 5 min · 13 प्रश्न

Chapter video4:58
Take quiz →

Trailing zeros: count the fives, then check the twos

A number ends in a zero when 10 divides it. And 10 = 2 × 5. So every zero at the end of a product is one 2 paired with one 5. To count the zeros, you do not multiply anything out. You count how many twos the product holds, how many fives it holds, and take the smaller count. That is the whole idea.

Why fives decide a factorial

Take 10! = 3,628,800. It ends in two zeros. Look inside it: the fives come only from 5 and 10, so there are two of them. The twos come from 2, 4, 6, 8 and 10, and there are eight. Only two pairs can be made, so there are two zeros.

This is true of every factorial. In 1 × 2 × 3 × ... every second number gives a two, but only every fifth number gives a five. The fives always run out first. So for a factorial, count only the fives.

The method for n!

Divide n by 5. Divide the quotient by 5 again. Keep going until the quotient falls below 5. Drop the remainder at every step, then add the quotients.

For 100!:

  • 100 ÷ 5 = 20. There are twenty multiples of 5 up to 100, and each carries one five.
  • 20 ÷ 5 = 4. Four of them (25, 50, 75, 100) are multiples of 25, and each carries one more five.
  • 4 is below 5, so stop.

20 + 4 = 24. So 100! ends in 24 zeros.

For 200!: 200 ÷ 5 = 40, then 40 ÷ 5 = 8, then 8 ÷ 5 = 1. Total 49 zeros. The third division counts 125, which holds three fives.

A product that is not a factorial

Here the fives are not always the scarce ones, so count both.

UPSC asked this in 2020: how many zeros are at the end of 1 × 5 × 10 × 15 × 20 × 25 × 30 × 35 × 40 × 45 × 50 × 55 × 60?

  • Fives: there are twelve multiples of 5, and 25 and 50 give one extra each. Total 14.
  • Twos: only the even terms have any. 10 gives 1, 20 gives 2, 30 gives 1, 40 gives 3, 50 gives 1, 60 gives 2. Total 10.

Only 10 pairs can be made. The answer is 10, not 14. The option 14 was sitting there for anyone who counted fives out of habit.

A product of powers

Break each base into primes, then multiply by the power.

UPSC 2024 asked for the zeros at the end of 1^2 × 2^4 × 3^6 × ... × 25^50. Fives come only from the bases that are multiples of 5:

  • 5^10 gives 10 fives, 10^20 gives 20, 15^30 gives 30, 20^40 gives 40.
  • 25 = 5 × 5, so 25^50 gives 2 × 50 = 100 fives.

Total 200 fives. The even bases supply far more twos than that, so the answer is 200 zeros.

UPSC 2026 dressed the same idea differently: 10^m × 1000 × n = 75^25 × 25^32 × 32^75, with n not divisible by 10. The right side has 50 + 64 = 114 fives and 375 twos, so it ends in 114 zeros. The 1000 on the left accounts for 3 of them, so m = 111.

Counts that never occur

The number of zeros of n! changes only when n reaches a multiple of 5. From 20! to 24! it is 4. At 25!, two fives arrive together, and the count jumps to 6. So no factorial ends in exactly 5 zeros. The same jump happens at 50!, which goes from 10 zeros to 12 and skips 11.

Every count that does occur is shared by five factorials in a row. Exactly 3 zeros: 15!, 16!, 17!, 18! and 19!.

Summary

QuestionWhat to doExample
Zeros at the end of n!Divide by 5 again and again, add the quotients100!: 20 + 4 = 24
Zeros of any other productCount twos and fives, take the smaller5 × 10 × 15 × 20 × 25: 6 fives, 3 twos, so 3 zeros
Product of powersBreak bases into primes, multiply by the powers4^5 × 25^3 = 2^10 × 5^6, so 6 zeros
Which n! has exactly k zerosFive factorials in a row, or none6 zeros: 25! to 29!. 5 zeros: none

Where students slip

  • Stopping after one division. 100 ÷ 5 = 20 is not the answer for 100!. The multiples of 25 carry a second five.
  • Counting only fives in a product that is not a factorial. When the terms are mostly odd, the twos are scarce.
  • Reading a power without breaking the base. 25^3 holds six fives, not three. 4^5 holds ten twos, not five.
  • Adding the two counts, or taking the larger. A zero needs one of each, so the smaller count decides.
  • Keeping remainders. 37 ÷ 5 counts as 7, nothing more.

How to practise

Find the zeros of 30!, 60!, 125! and 250! by repeated division, and say each quotient aloud. Then write three short products of your own, such as 4 × 15 × 25 × 6, and count twos and fives separately before multiplying out to check. Last, list the zeros of 1! to 30! in a row and mark where the count jumps. Once you have seen the jump at 25, you will not forget it.

अपनी पढ़ाई सहेजें और रात 9 बजे की अखिल भारतीय टेस्ट दें।

साइन अप करें