A concise and visually elegant explanation of a classic number theory shortcut. It effectively simplifies the logic of prime factorization for a general audience.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
How Many Zeros End 100!?
Added:100 factorial, multiply every whole number from 1 to 100 together.
The question, how many zeros does that number end in?
Just to let you feel how fast this grows, 100 * 99 is 9,900 * 98 is already over 970,000 * 97 over 94 million.
That's just three of the multiplications and there are 96 more waiting.
If you run it all the way to the end, that's 158 digits long. Not the value, the length.
So, how do we figure this out? Well, first notice that a trailing zero is just a factor of 10.
Every zero on the end of a number means one more clean factor of 10 inside it.
Also, 10 is 2 * 5.
So, the real question isn't about zeros at all. It's inside the product of 1 2 3 all the way multiplied to 100, how many complete 2 * 5 pairs are there?
Now, we should think about where those factors come from.
Every second number in the product denotes a two.
And twos are everywhere.
How about fives? Only every fifth number brings one.
So, twos are never the shortage.
Every five that shows up will always find a two to pair with.
Which means that the number of pairs, the number of zeros, is just the number of fives.
Count the fives and that gives you the entire problem.
Here's the first pass, just the multiple of fives themselves. That's 5 10 15 all the way up to 100. One factor of five each, one small tool before we count them. In case you haven't seen it, the floor function denoted like this just means round down to a whole number.
The floor of 4.6 would be four, the floor of 20 would be 20.
It counts how many whole times does this fit?
And the floor of 100 divided by five is 20 25s.
Now, if that were the whole story, the answer would be 20, but it's not.
Because four numbers in that list are holding out on us.
25 is 5 * 5. It denotes two fives.
And so does every multiple of 25, 25, 50, 75, and 100.
Those four numbers each smuggle in a second five the first pass didn't count.
The floor of 100 divided by 25 is four.
And we should ask ourselves, do we have to keep going with this logic check? Do we need like a third pass here?
Well, a third multiple of five would be 125, which is bigger than 100, bigger than the number we started with.
So, our count stops. We had 20 from before, then four more after for 24. And that's it, exactly 24 zeros and 100!
factorial.
And what's pretty cool about this is this scales.
This two-step move generalizes. If you keep dividing by powers of five until they outgrow the number, like on 1,000 factorial, we can count the number of ending zeros in the same way.
And basically get that 1,000 factorial ends with 249 zeros.
And even though these factorials deal with whole numbers, I thought it would be fun to take the derivative of a factorial, the derivative of a factorial function, which sounds illegal since factorials only live on the whole numbers, at least traditionally.
But there's a way to do it and you can see it in this video. Click the video on screen to check it out.
I'll see you in that one.
Related Videos

Definition:Bounded variation and if f is monotonic on [a,b] then f is Bounded variation on [a,b]
wingsofmathematicsbytanush2507
4K views•2019-09-05

Prof Chris Holmes | Bayesian fitting and evaluation of complex models arising in...
uclfacultyofpopulationheal9290
564 views•2019-07-03

Patrick Landreman: A Crash Course in Applied Linear Algebra | PyData New York 2019
PyDataTV
9K views•2019-11-30

Approximating the Standard Deviation from Data of a Histogram
donnasmith8529
15K views•2019-09-26

HSC Maths Standard 2 | "At Least One" Probability Rule
ATARNotesHSC
697 views•2019-05-20

Spectral Sequences Live! 17: The Grothendieck spectral sequence
k-theory8604
395 views•2025-11-10

Structural Equation Modeling for Beginners
QuantFish
1K views•2025-09-30

Exploring Practical Applications of Linear and NonLinear Models In Business Research Dr.Jeelan Basha
MallikarjunaDKaggal
258 views•2025-05-26
Trending

we're almost finished the house (ep.125)
JennaPhipps
347K views•2026-07-22

We Finally Know Where Saturn’s Rings Came From
astrumspace
79K views•2026-07-22

BIG BET: Cathie Wood goes ALL IN on Elon Musk
FoxBusiness
89K views•2026-07-22

MIC DROP: Smithsonian Director Called Out For Woke Propaganda
TheAmalaEkpunobi
37K views•2026-07-23