For a prime , let be the sum of the digits of when written in base- form. Then the number of factors of that divide is

There are trailing zeroes in . Since $100_{\text{ten}}=400_{\text{five}}$, there are factors of in .

However, there are other zeros that occur earlier, making the total :

$933262154439441526816992388562667\color{#C00000}{00}49\color{#C00000}{0}7159682643816214685929638952175999932299156\color{#C00000}{0}894146397615651828625369792\color{#C00000}{0}82722375825118521\color{#C00000}{0}916864\color{#C00000}{000000000000000000000000}$

Answer from robjohn on Stack Exchange
Top answer
1 of 4
7
Using well known approximations for the length and number of trailing zeroes of n!, and making the reasonable assumption that the inside zeros appear with frequency , we get the following approximation of the total number of zeros, t, in n!: · · Which simplifies to: · · This approximation seems to work well for n up to at least 10,000. · 100!, with digit length 158, has less inside zeroes, 6, with 24 trailing, than the normal expectation for a total of 30, with t=36. · 98! is "zero-perfect", i.e. inside zeroes appear with exactly frequency , with actual total zero count 35 and · Other examples of zero-perfect factorials are: 1009!, 1097!, 1112!, 2993!, 6128!, .... · There appears to be a strong correlation of n having only 0-3 prime factors in {2, 3, 5} if n! is zero-perfect. Uneven n is often a prime number if n! is zero-perfect.
2 of 4
3
It is unlikely. There are ways to compute the nth digit of certain numbers in certain bases (for example, pi in base 16) without having to compute the entire number, but in most situations, the number or formula for it either has very special properties (e.g. 101*10^n) in order to answer the question, or the work done to answer the question is tantamount to calculating the number, writing it down, and counting the digits. Not only do I know of no way to answer the question otherwise, I will wager a small amount of money that no such nice way will posted here for the next 2 years. · Gerhard "Willing To Formalize The Bet" Paseman, 2012.07.12
🌐
Quora
quora.com › Factorial-function-How-many-zeroes-are-there-in-100
Factorial (function): How many zeroes are there in 100!? - Quora
Answer (1 of 52): Trailing zeros are a sequence of 0's in the decimal representation of a number, after which no other digits follow. It can be solved in two ways - 1. Let’s look at how trailing zeros are formed in the first place. A trailing zero is formed when a multiple of 5 is multiplied ...
Top answer
1 of 4
4

The total number of zeros in n! is given by sequence A027869 in the On-line Encyclopedia of Integer Sequences. There really seems to be no way to compute the total number of zeros in n! short of computing n! and counting the number of zeros. With a big int library, this is easy enough. A simple Python example:

import math

def zeros(n): return str(math.factorial(n)).count('0')

So, for example, zeros(100) evaluates to 30. For larger n you might want to skip the relatively expensive conversion to a string and get the 0-count arithmetically by repeatedly dividing by 10.

As you have noted, it is far easier to compute the number of trailing zeros. Your code, in Python, is essentially:

def trailing_zeros(n):
    count = 0
    p = 5
    while p <= n:
        count += n//p
        p *= 5
    return count

As a heuristic way to estimate the total number of zeros, you can first count the number of trailing zeros, subtract that from the number of digits in n!, subtract an additional 2 from this difference (since neither the first digit of n! nor the final digit before the trailing zeros are candidate positions for non-trailing zeros) and guess that 1/10 of these digits will in fact be zeros. You can use Stirling's formula to estimate the number of digits in n!:

def num_digits(n):
    #uses Striling's formula to estimate the number of digits in n!
    #this formula, known as, Kamenetsky's formula, gives the exact count below 5*10^7
    if n == 0:
        return 1
    else:
        return math.ceil(math.log10(2*math.pi*n)/2 + n *(math.log10(n/math.e)))

Hence:

def est_zeros(n):
    #first compute the number of candidate postions for non-trailing zerpos:
    internal_digits = max(0,num_digits(n) - trailing_zeros(n) - 2)
    return trailing_zeros(n) + internal_digits//10 

For example est_zeros(100) evaluates to 37, which isn't very good, but then there is no reason to think that this estimation is any better than asymptotic (though proving that it is asymptotically correct would be very difficult, I don't actually know if it is). For larger numbers it seems to give reasonable results. For example zeros(10000) == 5803 and est_zeros == 5814.

2 of 4
0

How about this then.

count = 0
s = str(fact)
for i in s:
    if i=="0":
        count +=1
print(count)
🌐
Nigel Coldwell Puzzles
puzzles.nigelcoldwell.co.uk › nineteen.htm
Answer to Puzzle #19: 100! Factorial
No points to ChatGPT If you're curious what Bard made of this puzzle... Show/Hide Google's Bard AI's Answer · There are 24 zeros at the end of 100! A factorial is the product of all the positive integers less than or equal to a given integer.
🌐
Purplemath
purplemath.com › modules › factzero.htm
Factorials' Trailing Zeroes: How Many Are There? | Purplemath
Since 100 ÷ 25 = 4, there are four multiples of 25 between 1 and 101. These will give me four more copies of 10, and thus four more trailing zeroes at the end of the factorial. ... This reasoning, of finding the number of multiples of 51 = 5, plus the number of multiples of 52 = 25, etc, extends to working with even larger factorials. ... Find the number of trailing zeroes in ...
🌐
Physics Wallah
pw.live › curious-jr › exams › factorial-of-100
Factorial of 100, How to Calculate and Examples
What is the factorial of 100? 100! (factorial of hundred) is the product of all numbers from 100 down to 1, resulting in a 158-digit number ending with 24 zeros.
Find elsewhere
🌐
Careers360
school.careers360.com › home › how many
How Many Zeros are There in 100 Factorial
April 18, 2023 - How Many Zeros are There in 100 Factorial - There are 24 zeroes in 100! The factorial concept is used in many mathematical concepts such as probability, permutations and combinations, sequences and series, etc
Top answer
1 of 16
48
Trailing zeros: Trailing zeros are a sequence of 0's in the decimal representation (or more generally, in any positional representation) of a number, after which no other digits follow. Fro example, 125000 has 3 trailing zeros (125 000 ); The number of trailing zeros in the decimal representation of n! , the factorial of a non-negative integer n, can be determined with this formula: \frac{n}{5}+\frac{n}{5^2}+\frac{n}{5^3}+...+\frac{n}{5^k} , where k must be chosen such that 5^(k+1)>n It's more simple if you look at an example: How many zeros are in the end (after which no other digits follow) of 32!? \frac{32}{5}+\frac{32}{5^2}=6+1=7 (denominator must be less than 32, 5^2=25 is less) So there are 7 zeros in the end of 32! The formula actually counts the number of factors 5 in n!, but since there are at least as many factors 2, this is equivalent to the number of factors 10, each of which gives one more trailing zero. BACK TO THE ORIGINAL QUESTION: According to above 100! has \frac{100}{5}+\frac{100}{25}=20+4=24 trailing zeros. Answer: B. For more on this issues check Factorials and Number Theory links in my signature. Hope it helps.
2 of 16
15
100! = 1 x 2 x 3 x ..... x 100 10 = 5 x 2 2s are in abundance however there is limited supply of 5s How many multiples of 5 are there from 1 to 100- One way is counting other way is 100/5 = 20 How many multiples of 25 are there which contain an extra five = 100/25 = 4 There is no point going forward as the next power of 5 is 125 which is greater than 100. That does it: 20 + 4 = 24
🌐
Vedantu
vedantu.com › question-answer › how-many-zeros-are-there-in-100-class-11-maths-cbse-5f12c8087da4574b28b14c92
How many zeros are there in 100 class 11 maths CBSE
December 10, 2025 - The total number of zeros are hence 11 + 10 + 3 = 24. Note: In such types of questions, a higher level of logic is required which comes with practice. We should consider every case possible which will help us find the correct answer. No particular method or formula is necessary, but we should ...
🌐
YouTube
youtube.com › watch
How many zeroes are at the end of 100! ? - YouTube
100 factorial is a massively big number with a lot of trailing zeroes. Just how many zeroes are there at the end of 100!? We will find this out by counting f...
Published   February 21, 2024
Top answer
1 of 2
7

One thing is clear. $2 \times 5 = 10$ and there is no other way to get 10 out of 2 prime numbers.

"trailing zeros" are the zeros at the end of the number.
For example: 3200 has 2 trailing zeros. The units and the tenths position.

One other thing is clear.
Multiplying a number by 10 adds a trailing zero to that number.

So in order to find the number of zeros at the tail of a number, you need to split that number into prime factors and see how many pairs (2, 5) you can form.

For example:

300 has 2 trailing zeros. Why?
because $300 = 3 \times 2 ^ 2 \times 5^2$.
So you get 2 pairs of (5, 2).

An other example:

$4000 = 2^5 \times 5 ^3 = 2 ^2 \times (2 \times 5) ^ 3$
Hence, 3 trailing zeros.

EDIT:

For your specific question. 100!.

$100! = 1 \times 2 \times 3 \times .... \times 100$.

Which is equivalent to splitting every number into prime factors like this:

$100! = 1 \times 2 \times 3 \times 2^2 \times 5 \times (3\times 2) .... \times (2 \times 5)^2$

You need to count how many 10's you can make out of these prime numbers.
As explained above, the only way to get a 10 is $2 \times 5$.
So you need to count how many 2's and how many 5s are among the prime factors above.

The 5s can appear only in numbers that are divisible by 5.

5, 10, 20, 25, 30, 35, 40, 45, 50 , 55, 60 , 65, 70, 75, 80, 85, 90, 95, 100

and the number of 5s in the numbers above are

1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2  

Because for example

$15 = 3 \times 5$ so one single 5.
$50 = 2 \times 5 ^2$ so 2 fives.

Add them all up and you get 24 occurrences of 5.

Now you need to see if there are at least 24 occurrences of 2.
And they are because form 1 to 100 you have 50 even numbers (they all contain at least one 2).

This means that 100! can be written as

$2 ^ {50} \times 5 ^ {24} \times$ (some other factors that are never going to multiply to get to a multiple of 10 so we can ignore them).

We can split the line above (ignoring the factors that cannot multiply to reach a multiple of 10) to

$2 ^ {24} \times 2 ^{26} \times 5^{24} = (2 \times 5) ^{24} \times 2 ^{26}$

We can ignore again $2^{26}$ because that never ends with zeros (it ends with a 4 if I'm not mistaken)

Now you can see that 100! is basically a very large number that does not end with a 0 multiplied by $10 ^ {24}$. So you get 24 trailing zeros.

2 of 2
1

Trailing zeroes are as the name points zeroes in the end of the number. So 10 has 1 trailing zero. And because this is a question regarding base10 numbers, this is how you can represent any number with trailing zero - number0 = number x 10. And because 10 is actually 2 x 5 you need 2s and 5s. One 2 is enough to 'turn' all fives into zeroes. And you already have posted the number of 5s.

🌐
Doubtnut
doubtnut.com › pcmb-questions › 270
Find the number of zeroes at the end of 100 factorial.
We have 100! = 100 * 99 * 98 * … * 2 * 1Now find how many multiples of 5 are there in the numbers from 1 to 100? Theres 5 10 15 20 25 ...100 is the closest multiple of 5 between 1 to 100 and 100 ÷ 5 = 20 so there are twenty multiples of 5 between 1 and 100.But 25 is 5×5 so each multiple of 25 has an extra factor of 5 that I need to account for.
🌐
Doubtnut
doubtnut.com › qna › 644739410
Number of zeros in the expansion of `100!` is
To find the number of zeros in the expansion of \(100!\), we need to determine how many times \(10\) is a factor in \(100!\). Since \(10\) can be expressed as \(2 \times 5\), we need to find the number of pairs of \(2\)s and \(5\)s in the prime factorization of \(100!\). However, since there are generally more \(2\)s than \(5\)s in factorials, the limiting factor will be the number of \(5\)s. ### Step-by-Step Solution: 1. **Identify the formula for finding the exponent of a prime \(p\) in \(n!\)**: The exponent of a prime \(p\) in \(n!\) can be calculated using the formula: \[ \text{Exponent o
🌐
Medium
medium.com › puzzle-sphere › counting-the-zeros-in-100-factorial-divisibility-5-2-10-general-solution-puzzle-permutation-combination-e16f8d3fb71c
Counting the Zeros in 100! It’s a Lot! | by Rajesh Saxena | Puzzle Sphere
September 25, 2024 - (100 factorial)? I recommend that you pause here, grab a pen and paper, and try to solve this problem yourself. 🧠💡 · When you are ready, you can scroll down to read the solution provided below. 100! is the multiplication of numbers from 1 to 100. 100! = 100 x 99 x 98 x…………………………x 3 x 2 x 1 · Trailing zeroes means zeroes at the end of a number.
🌐
Brainly
brainly.com › mathematics › high school › discrete math: how many zeros are there at the end of [tex]100![/tex] (100 factorial)?
[FREE] Discrete Math: How many zeros are there at the end of 100! (100 factorial)? - brainly.com
The number of trailing zeroes in 100 factorial is 24. This can be calculated by counting the number of times 5, 25, 125, and so on till 5^n (n being less than or equal to 100) divide 100.