What Creates a Trailing Zero?
A trailing zero is produced whenever a factor of 2 multiplies a factor of 5 (10 = 2 × 5).
Factorial Limiting Factor
In any factorial N! = 1 × 2 × 3 × ... × N, multiples of 2 are far more abundant than multiples of 5:
- • Power of 5 is ALWAYS the limiting factor in N!
- • Trailing zeros in N! = Highest Power of 5 in N!
- • For general products (e.g. 5 × 10 × 15...): ALWAYS check both 2 and 5 powers!
Trailing zero and factorial power questions are recurring core topics in CAT, XAT, NMAT, and SNAP:
Highest Power of Prime p in N!
Sum of integer divisions until denominator exceeds N. Example for 100! power of 5 → ⌊100/5⌋ + ⌊100/25⌋ = 20 + 4 = 24 zeros.
Highest Power of Composite K in N!
Power = min( ⌊E_p1/a⌋, ⌊E_p2/b⌋ )
Example: Highest power of 12 (2² × 3) in 50! → min( ⌊47/2⌋, ⌊22/1⌋ ) = min(23, 22) = 22.
Zeros in Sum: N! + M! (N < M)
When adding factorials of different magnitudes, the smaller factorial determines the trailing zeros! Example: 10! + 100! → 2 zeros.
Find the number of trailing zeros in 150!.
• Apply Legendre's formula for p = 5:
⌊150 / 5⌋ = 30
⌊30 / 5⌋ = 6
⌊6 / 5⌋ = 1
⌊1 / 5⌋ = 0
• Total trailing zeros = 30 + 6 + 1 = 37.
Find trailing zeros in P = 5 × 10 × 15 × ... × 250.
• Factor out 5 from 50 terms: P = 5⁵⁰ × (50!).
• Power of 5 in P = 50 + E₅(50!) = 50 + (10 + 2) = 62.
• Power of 2 in P = E₂(50!) = 25 + 12 + 6 + 3 + 1 = 47.
• Since 2 is the limiting factor: Zeros = min(62, 47) = 47.
Find the highest power of 72 that divides 100!.
• Prime factorize 72 = 2³ × 3².
• Step 1: E₂(100!) = 50 + 25 + 12 + 6 + 3 + 1 = 97 → ⌊97 / 3⌋ = 32.
• Step 2: E₃(100!) = 33 + 11 + 3 + 1 = 48 → ⌊48 / 2⌋ = 24.
• Step 3: Take minimum → min(32, 24) = 24.
• Answer: Highest power of 72 in 100! is 72²⁴.
Mistake 1: Assuming 5 is Always Limiting
In series like 5 × 10 × 15... or 5 × 15 × 25..., powers of 5 are abundant while powers of 2 are scarce. Always check BOTH 2 and 5 in non-factorial products!
Mistake 2: Forgetting Composite Exponents
When finding highest power of 72 (2³ × 3²), do NOT just find E₂(N!). You MUST divide E₂(N!) by 3 and E₃(N!) by 2 before taking the minimum!
Mistake 3: Reverse Jump Gaps
Every multiple of 5 adds 1 zero, but multiples of 25 add 2 zeros, 125 add 3 zeros! This creates skipped counts (e.g. 5, 11, 17, 23, 29, 30 zeros NEVER exist in any N!).
Q1: How many values of N exist such that N! ends in exactly 30 trailing zeros?
View Solution
• For 125! → ⌊125/5⌋ + ⌊125/25⌋ + ⌊125/125⌋ = 25 + 5 + 1 = 31 zeros.
• Zeros jump directly from 28 to 31! No value of N produces 29 or 30 zeros.
• Answer: 0 values.
Q2: Find the number of trailing zeros in 100! × 200!.
View Solution
• Zeros in 100! = 20 + 4 = 24 zeros.
• Zeros in 200! = 40 + 8 + 1 = 49 zeros.
• For multiplication, trailing zeros ADD UP: 24 + 49 = 73 zeros.
Q3: Find the number of trailing zeros in (50!)⁵⁰.
View Solution
• Zeros in 50! = 10 + 2 = 12 zeros.
• For (50!)⁵⁰, trailing zeros MULTIPLY by exponent: 12 × 50 = 600 zeros.
How do you calculate the number of trailing zeros in N!?
The number of trailing zeros in N! equals the highest power of 5 present in N!, calculated using Legendre's formula: ⌊N/5⌋ + ⌊N/25⌋ + ⌊N/125⌋ + ...
What is Legendre's Formula?
Legendre's Formula gives the highest exponent of a prime p that divides N!, given by E_p(N!) = ⌊N/p⌋ + ⌊N/p²⌋ + ⌊N/p³⌋ + ...
Why do we count powers of 5 instead of powers of 2 for trailing zeros in factorials?
A trailing zero is formed by 10 = 2 × 5. In any factorial N!, multiples of 2 occur every 2 numbers while multiples of 5 occur every 5 numbers. Hence powers of 2 are always more abundant, making 5 the limiting factor.
How do you find the highest power of a composite number K in N!?
Prime factorize K = p₁ᵃ · p₂ᵇ. Compute the highest power of each prime factor p_i in N! using Legendre's formula, then take min(⌊E_p1/a⌋, ⌊E_p2/b⌋).
Can a factorial N! end in 5 trailing zeros?
No! For 24!, trailing zeros = 4. For 25!, 25 = 5² adds 2 factors of 5, making zeros = 6. The number of trailing zeros jumps from 4 to 6, skipping 5!