How Many Digits Are in a Factorial? Examples From 10! to 1000!
Learn how to find the digits in a factorial using a simple logarithm formula, with examples from 10! to 1000! and a table of results.

Calcifyai Team
Expert calculators & financial tools
A factorial is a very large number. Use logarithms to find the number of digits in the factorial n!:
Digits in n! = floor(log₁₀(n!)) + 1
For example, 10! = 3,628,800, which has 7 digits. In comparison, 100! has 158 digits, and 1000! has 2,568 digits.
To determine the number of digits in a factorial, it is not necessary to write out each number in the factorial. The formula uses a logarithm to calculate the number of digits even for large factorials.
In this guide, you will learn about factorials, find out how many digits are in a factorial, and see how to estimate the size of a large factorial with examples.
When factorials become extremely large, calculating their full values manually can be difficult. The Big Number Calculator can help you work with large numbers and calculate factorials more easily.
What Is a Factorial?
A factorial is the product of all positive whole numbers between 1 and a specified number. It is denoted by an exclamation mark (!).
If n is a positive integer:
n! = n × (n − 1) × (n − 2) × ... × 2 × 1
For example:
3! = 3 × 2 × 1 = 6
5! = 5 × 4 × 3 × 2 × 1 = 120
7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5,040
By definition, 0! = 1.
The factorial is used in various parts of mathematics, particularly in counting, probability, and permutation problems.
Why Are Factorials So Big?
To get the next factorial, multiply the previous factorial by the next whole number.
For example:
5! = 120
6! = 6 × 120 = 720
7! = 7 × 720 = 5,040
8! = 8 × 5,040 = 40,320
Factorials grow very rapidly due to this repeated multiplication. For example, 100! is too big to work out easily by hand.
How to Calculate the Number of Digits in a Factorial
The simplest general solution is to use the base-10 logarithm, or log₁₀.
The formula is:
Number of digits in n! = floor(log₁₀(n!)) + 1
Here:
n! is the factorial you want to find.
log₁₀ gives the logarithm of a number with base 10.
floor means rounding down to the nearest whole number.
+1 accounts for the first digit.
For instance, a number between 1,000 and 9,999 has 4 digits. Its base-10 logarithm is at least 3 but less than 4. Taking the floor of the logarithm and adding 1 gives the number of digits.
Step-by-Step Example: Determine the Digits in 10!
First, calculate the factorial:
10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1
10! = 3,628,800
Now count the digits. The answer has 7 digits.
Another way is to use the logarithm formula:
log₁₀(10!) ≈ 6.5598
floor(6.5598) + 1 = 7
Therefore, 10! has 7 digits.
A Shortcut Using the Sum of Logarithms
The number of digits can be found before multiplying all the numbers.
A product's logarithm is equal to the sum of the logarithms of its factors, so the formula can be rearranged as follows:
Digits in n! = floor(log₁₀(1) + log₁₀(2) + ... + log₁₀(n)) + 1
This method can be used to find the digit count of a large factorial without calculating the entire number.
To find the digits in 5!:
log₁₀(1) + log₁₀(2) + log₁₀(3) + log₁₀(4) + log₁₀(5)
≈ 0 + 0.3010 + 0.4771 + 0.6021 + 0.6990
≈ 2.0792
floor(2.0792) + 1 = 3
So, 5! = 120 has 3 digits.
How Many Digits Are There in Factorials From 10! to 1000!?
The number of digits in factorials rises rapidly as the factorial value increases. Here are the number of digits in some factorials.
Factorial | Approximate value | Number of digits |
|---|---|---|
10! | 3.63 × 10⁶ | 7 |
20! | 2.43 × 10¹⁸ | 19 |
30! | 2.65 × 10³² | 33 |
40! | 8.16 × 10⁴⁷ | 48 |
50! | 3.04 × 10⁶⁴ | 65 |
75! | 2.48 × 10¹⁰⁹ | 110 |
100! | 9.33 × 10¹⁵⁷ | 158 |
200! | 7.89 × 10³⁷⁴ | 375 |
500! | 1.22 × 10¹¹³⁴ | 1,135 |
1000! | 4.02 × 10²⁵⁶⁷ | 2,568 |
The scientific notation is used to display the values, which have been rounded for readability. The number of digits given is correct.
Example: Why Does 100! Have 158 Digits?
The factorial 100! is the product of all whole numbers between 1 and 100, inclusive.
Rather than expand this very large product, use the logarithm formula:
Digits in 100! = floor(log₁₀(100!)) + 1
The approximate value of the logarithm is:
log₁₀(100!) ≈ 157.9700
Now use the formula:
floor(157.9700) + 1 = 158
Therefore, 100! has 158 digits.
Example: Why Does 1000! Have 2,568 Digits?
The product of all integers from 1 through 1000 is an extremely large number and would be too long to calculate by hand.
The easiest way to find its digit count is to use the logarithm method:
Digits in 1000! = floor(log₁₀(1000!)) + 1
The approximate value of the logarithm is:
log₁₀(1000!) ≈ 2567.6046
Then:
floor(2567.6046) + 1 = 2,568
Therefore, 1000! has 2,568 digits.
This is a good example of using a logarithm to represent a number's size instead of writing out the number itself.
How to Estimate the Digits in Very Large Factorials
It might take a long time to calculate each of the logarithms of 1, 2, ..., n if n is very large. A useful approximation of the size of a factorial is Stirling's formula.
A common form is:
n! ≈ √(2πn) × (n/e)^n
Here:
n is the positive integer.
π is approximately 3.14159.
e is approximately 2.71828.
√ indicates the square root.
Stirling’s approximation provides a practical way to estimate very large factorials without calculating every multiplication. You can explore the mathematical explanation in Wolfram MathWorld’s guide to Stirling’s approximation.
Large factorials are a good example of why computers need to handle numbers beyond ordinary numeric limits. Learn more in our guide to arbitrary precision arithmetic, which explains how calculations with very large numbers work.
Use Stirling's Formula to Estimate the Digit Count
The number of digits can be estimated by taking the base-10 logarithm of the approximation:
Digits in n! ≈ floor((n + 0.5)log₁₀(n) − n log₁₀(e) + 0.5log₁₀(2π)) + 1
This provides a convenient approximation for large factorials. Stirling's formula is a widely used approximation for the growth of the factorial function.
However, if an exact digit count is needed, use a sufficiently precise logarithm sum or high-precision calculation. A rounded approximation near a whole-number boundary can produce an incorrect count.
Frequently Asked Questions
How Many Digits Are in 10!?
10! = 3,628,800, so it has 7 digits.
How Many Digits Are in 20!?
20! = 2,432,902,008,176,640,000, which has 19 digits.
How Many Digits Are in 50!?
50! has 65 digits. Its approximate value is 3.04 × 10⁶⁴.
How Many Digits Are in 100!?
100! has 158 digits. You can find this using the logarithm formula without writing out the full factorial.
How Many Digits Are in 1000!?
1000! has 2,568 digits. Its approximate value is 4.02 × 10²⁵⁶⁷.
What Is the Formula for Finding the Number of Digits in a Factorial?
The formula is:
Digits in n! = floor(log₁₀(n!)) + 1
You can also calculate it by adding the logarithms of all integers from 1 through n, then taking the floor and adding 1.
Does Every Factorial Have More Digits Than the Previous One?
For positive integers, yes. When you move from n! to (n + 1)!, you multiply the previous value by n + 1. This makes the factorial larger, and its digit count never decreases. Sometimes two consecutive factorials can have the same number of digits, but the count increases repeatedly as n grows.
Why Do Mathematicians Use Logarithms to Count Digits?
Logarithms help measure how large a number is based on its powers of 10. Since a number with d digits is at least 10^(d−1) and less than 10^d, its base-10 logarithm reveals its digit count.
Conclusion
Factorials grow rapidly, but finding their digit counts does not require writing out every digit. The logarithm formula gives a direct method:
Digits in n! = floor(log₁₀(n!)) + 1
It shows that 10! has 7 digits, 100! has 158 digits, and 1000! has 2,568 digits. For very large factorials, logarithms and Stirling's approximation make it easier to understand their size without handling the full numbers.
Disclaimer
The information provided in this article is for educational and informational purposes only. It should not be considered as professional financial, medical, or legal advice. Always consult with qualified professionals for specific guidance related to your situation.
Popular Calculators
Explore our most-used free calculators for finance, health, and everyday needs.