How many trailing zeroes are there in 100! ?

2025

How many trailing zeroes are there in 100! ?

  1. A.

    20

  2. B.

    2

  3. C.

    24

  4. D.

    25

Attempted by 3 students.

Show answer & explanation

Correct answer: C

CONCEPT: The number of trailing zeros in n! equals the number of times 10 divides n!. Since 10 = 2 x 5, and factors of 2 appear far more often than factors of 5 in n!, the count of trailing zeros is governed purely by the highest power of 5 dividing n!. Legendre's formula gives this as floor(n/5) + floor(n/25) + floor(n/125) + ... until the term becomes 0.

  1. Here n = 100, so first count multiples of 5 up to 100: floor(100/5) = 20.

  2. Every multiple of 25 (25, 50, 75, 100) contributes one extra factor of 5 beyond the first count, so add floor(100/25) = 4.

  3. Multiples of 125 would contribute yet another extra factor of 5, but floor(100/125) = 0 since 125 is greater than 100, so the sequence terminates here.

  4. Total power of 5 in 100! = 20 + 4 + 0 = 24.

CROSS-CHECK: As a sanity check, the power of 2 in 100! (via the same formula: floor(100/2) + floor(100/4) + ... = 97) is far greater than the power of 5 (24), confirming that 5 is indeed the limiting factor and the trailing-zero count equals the power of 5.

So 100! ends in 24 zeros.

Explore the full course: Infosys Preparation

Loading lesson…