Calculating the Number of Digits in 100!

Number of digits in hundred factorial is a medium quant interview question on Pure Math, reported to have been seen at DRW.

Difficulty Medium Topic Pure Math Reported at DRW

MyQuantPartner is not affiliated with, endorsed by, or sponsored by these companies, and all trademarks belong to their respective owners.

This quant interview question is about understanding the size and growth rate of factorials, a classic topic in pure mathematics with direct relevance to quantitative finance. It pushes you to think beyond brute-force computation and reason analytically about extremely large numbers. On a quant prep platform like MyQuantPartner, this kind of problem builds the bridge between clean theory and practical estimation skills needed in real interviews at top trading firms.

It trains your intuition for asymptotics, logarithms, and continuous approximations to discrete objects. You practice turning products into sums, working comfortably with log scales, and estimating orders of magnitude without a calculator. These are core skills in quant prep, where being able to manipulate growth rates and magnitudes quickly is critical.

This matters for quant interviews because many modeling, risk, and algorithmic trading problems involve large combinatorial quantities, tail events, and scaling behavior. Interviewers want to see if you can control big numbers, choose appropriate approximations, and justify them clearly under time pressure. Mastering questions like this signals that you can handle complex probabilistic and statistical calculations in real-world quant roles.

What it tests

When determining the number of digits in a large product or factorial, the key insight is that the number of digits of a positive integer $N$ is given by $\lfloor \log_{10} N \rfloor + 1$. For products like $n!$, direct computation is infeasible, but logarithms turn multiplication into addition: $\log_{10}(n!) = \sum_{k=1}^n \log_{10} k$. For very large $n$, this sum can be approximated using integrals (via the integral test or Stirling's approximation), because the sum of logs behaves like the area under the $\log_{10} x$ curve. This approach leverages the continuous approximation of discrete sums, which is especially powerful for factorials and other rapidly growing products. The principle holds because logarithms compress multiplicative growth into additive, manageable quantities, and integrals provide a smooth estimate for large sums.

Practise this question with written feedback, or hear it in a spoken mock interview.

Get started free