# How many trailing zeros in 100! (factorial of 100)

Recently I came upon a question: “Without calculating the factorial of 100, can the number of trailing zeros’ at the end of the result be determined?”.

To calculate that, you need to start small….

Factorial of 5 => 120 ======= 1 trailing zero

Factorial of 10 -> 3628800 ======== 2 trailing zeros.

So if you visualize the numbers, you would see that a zero is generated for 5*2 (or any even number) and another zero for 10 (10*9*8*7*6*5*4*3*2*1)

With this approach, you would get 21 trailing zeros in !100.

Wait there is more! There are actually 24 trailing zeros and they come from having an extra 5 in 25(5*5), 50 (5*10), 75 (5*15) and this gives us another 3 zeros. To get to this, try to visualize the multiplication.

So 21 =3 = 24 trailing zeros.

## One thought on “How many trailing zeros in 100! (factorial of 100)”

1. leticia says:

Thanks Gaurav, just stumbled upon your blog and found this post. Very nice. This webpage is also a good reference for this question:

Count Trailing zeros factorial