Trailing Zeros in Factorial Calculator

Count how many zeros are at the end of n factorial (n!). The count is the number of times 5 divides into all the numbers from 1 to n.

1 Fill in the box

2 Your answer

Your answer shows here as you type.

How to use the Trailing Zeros in Factorial Calculator

  1. Enter a whole number n, such as 100.
  2. Read the trailing zero count for n factorial.
  3. The working row shows floor(n/5) + floor(n/25) + floor(n/125) and so on, which is how the total is built.

Frequently asked questions

How do you count trailing zeros in n factorial?

Add floor(n/5) + floor(n/25) + floor(n/125) + ... until the divisor is larger than n. Each trailing zero needs a factor of 10, which is 2 times 5, and factors of 2 are more plentiful, so counting factors of 5 gives the answer.

How many trailing zeros does 100! have?

100! has 24 trailing zeros, from floor(100/5) = 20 plus floor(100/25) = 4.

Does 0! have any trailing zeros?

No. 0! equals 1, which has no trailing zeros.

Wrote something with AI? Slop Monkey rewrites it so it sounds like you, and keeps your facts.