Trailing zeroes of $\dfrac{n!}{m!}$ for $n>m$

The formula will be wrong lots of times. For example, $125!/122!$ has two trailing $0$’s, while the formula suggests $3$. The problem is that there are more $5$’s in the factorization than $2$’s.

If you calculate the corresponding formula for $2$ and take the minimum of the two values, you’ll correct the formula.

The formula that is stated counts the number of $5$'s in the factorization of the quotient $\frac{n!}{m!}$. Usually, in factorials, $5$ is scarcer than $2$. In the quotient, however, it is possible that $2$ becomes rarer. Therefore, if you take the formula that counts the number of $2$'s, you'll see that, for example, $\frac{15!}{14!}$ has $(7+3+1)-(7+3+1)=0$ factors of $2$, so it has no trailing $0$'s.