A factorial can turn a relatively small number into an unexpectedly large result. For example, 10! is already 3,628,800, while 20! contains 19 digits. As the input increases, writing out the complete answer becomes less practical, and understanding its size becomes just as important as calculating it.
Our Factorial Calculator helps you calculate the factorial of a whole number and examine the result in more detail. Along with the factorial value, you can see how many digits it contains, how many zeros appear at the end, and its representation in scientific notation.
Whether you’re checking a mathematics problem, studying permutations, or trying to understand how factorials behave as numbers grow, the examples below explain what each result means and how to use it.
Why Factorials Grow So Quickly
A factorial doesn’t simply multiply a number by itself. It multiplies that number by every positive whole number below it, continuing down to 1.
For example:
[
5!=5\times4\times3\times2\times1=120
]
The next factorial includes another multiplication:
[
6!=6\times5\times4\times3\times2\times1=720
]
Notice that 6! is not just slightly larger than 5!. It is six times as large because:
[
6!=6\times5!
]
The same relationship applies to every successive factorial:
[
(n+1)!=(n+1)\times n!
]
This explains why factorial values increase so rapidly. Every time you increase the input by one, you multiply the previous answer by a larger number.
Here is how quickly the results expand:
| Input |
Factorial |
Result |
| 3 |
3! |
6 |
| 4 |
4! |
24 |
| 5 |
5! |
120 |
| 6 |
6! |
720 |
| 8 |
8! |
40,320 |
| 10 |
10! |
3,628,800 |
| 15 |
15! |
1,307,674,368,000 |
| 20 |
20! |
2,432,902,008,176,640,000 |
The difference becomes especially noticeable when you compare 10! with 20!. Doubling the input doesn’t double the result; 20! is more than 670 billion times larger than 10!.
This rapid growth is why factorial calculations become difficult to handle manually, even when the original input looks relatively small.
Understanding Your Factorial Calculator Results
The factorial value is the main result, but its size and structure can tell you more than the number alone.
Let’s use 10! as an example:
[
10!=3,628,800
]
The calculator can provide several ways to understand this result.
Factorial value: 3,628,800
This is the complete product of the integers from 10 down to 1.
Number of digits: 7
The result contains seven decimal digits. Commas are only separators and do not count as digits.
Trailing zeros: 2
The final two digits are zeros. These are called trailing zeros because they appear at the end of the number.
Scientific notation: (3.6288\times10^6)
This is another way to represent the same value. It is particularly useful when factorial results become too long to read comfortably.
These outputs describe different properties of the same calculation. The factorial value gives the answer, while the other results help you understand its size and structure.
Where Do the Trailing Zeros in a Factorial Come From?
A factorial can end with several zeros, but those zeros don’t appear randomly. Every trailing zero represents a factor of 10 in the multiplication.
Since:
[
10=2\times5
]
we need to find how many complete pairs of 2 and 5 appear in the factorial’s prime factors.
There are generally more factors of 2 than factors of 5 in a factorial product. That means the number of factors of 5 determines how many trailing zeros the final answer contains.
For a factorial (n!), the number of trailing zeros can be calculated using:
[
Z(n!)=
\left\lfloor\frac n5\right\rfloor+
\left\lfloor\frac n{25}\right\rfloor+
\left\lfloor\frac n{125}\right\rfloor+\cdots
]
Continue dividing by higher powers of 5 until the quotient becomes zero. The floor symbol means that any decimal part is discarded.
Example: How many trailing zeros does 25! have?
Start by counting multiples of 5:
[
\left\lfloor\frac{25}{5}\right\rfloor=5
]
There are five multiples of 5 between 1 and 25.
Now count the additional factors of 5 contributed by multiples of 25:
[
\left\lfloor\frac{25}{25}\right\rfloor=1
]
Add the two results:
[
5+1=6
]
Therefore, 25! has six trailing zeros.
What about 100!?
[
\left\lfloor\frac{100}{5}\right\rfloor=20
]
[
\left\lfloor\frac{100}{25}\right\rfloor=4
]
[
\left\lfloor\frac{100}{125}\right\rfloor=0
]
So:
[
20+4=24
]
The factorial of 100 ends in 24 zeros.
The division by 25 is important because 25 contains two factors of 5. Counting only multiples of 5 would miss the extra factor contributed by 25, 50, 75 and 100.
This method lets you find the trailing zeros without calculating the enormous factorial itself.
How Many Digits Are in a Factorial?
Writing out a large factorial just to count its digits would defeat the purpose of having a calculator. Fortunately, there is a mathematical way to determine the digit count without expanding the entire result.
The number of decimal digits in (n!) is:
[
D(n!)=\lfloor\log_{10}(n!)\rfloor+1
]
Here, (\log_{10}) is the base-10 logarithm, and the floor function rounds down to the nearest whole number.
For smaller factorials, you can check the result directly.
For example:
[
10!=3,628,800
]
There are seven digits, so the calculator reports a digit count of 7.
As the input increases, the number of digits grows considerably:
| Factorial |
Number of digits |
| 5! |
3 |
| 10! |
7 |
| 15! |
13 |
| 20! |
19 |
| 25! |
26 |
| 50! |
65 |
| 100! |
158 |
The difference between 50! and 100! is particularly interesting. Doubling the input from 50 to 100 increases the result from 65 digits to 158 digits.
The digit count is useful when you need to compare the size of two factorials, estimate how much space a result requires, or decide whether displaying the complete integer is practical.
You don’t need to know every digit of 100! to understand how large it is. Its 158-digit length already tells you a great deal.
What Does Scientific Notation Mean in a Factorial Result?
When factorials become very large, displaying every digit can make the answer difficult to read. Scientific notation provides a shorter representation without changing the underlying mathematical value.
It expresses a number as a decimal value multiplied by a power of 10.
For example:
[
10!=3,628,800
]
In scientific notation:
[
10!=3.6288\times10^6
]
The exponent 6 tells you that the decimal point has moved six places to the right to produce the original number.
Consider a larger example:
[
20!=2,432,902,008,176,640,000
]
Its scientific notation is:
[
20!\approx2.43290200817664\times10^{18}
]
The exponent 18 indicates the scale of the number. Instead of reading all 19 digits, you can understand its approximate size from a much shorter expression.
Here are a few more examples:
| Factorial |
Scientific notation |
| 5! |
(1.2\times10^2) |
| 10! |
(3.6288\times10^6) |
| 15! |
(1.307674368\times10^{12}) |
| 20! |
(2.43290200817664\times10^{18}) |
Scientific notation is especially useful in advanced mathematics, probability, statistics and computing, where very large values appear frequently.
One thing to remember: a scientific notation display may round the digits for readability. A rounded display doesn’t necessarily mean the underlying factorial calculation is approximate.
Why Are Both 0! and 1! Equal to 1?
At first glance, the value of 1! makes sense:
[
1!=1
]
But zero factorial often raises a different question. If factorial means multiplying all positive integers down to 1, what happens when the starting number is zero?
The mathematical definition is:
[
0!=1
]
This isn’t an arbitrary exception. It keeps factorial relationships consistent and makes counting formulas work correctly.
Understanding zero factorial through the counting approach
Imagine arranging a group of objects in a row.
-
One distinct object has one possible arrangement.
-
Two distinct objects have two possible arrangements.
-
Three distinct objects have six possible arrangements.
-
Four distinct objects have 24 possible arrangements.
Now consider arranging zero objects. There is exactly one way to do this: leave the arrangement empty.
That single empty arrangement is why zero factorial equals one.
Understanding it through the factorial relationship
We also know that:
[
n!=n\times(n-1)!
]
Substitute 1 for (n):
[
1!=1\times0!
]
Since 1! equals 1:
[
1=1\times0!
]
Therefore:
[
0!=1
]
This value is important in permutations, combinations, probability and many other mathematical formulas.
When Does a Factorial Tell You How Many Possibilities Exist?
Factorials are especially useful when you need to count different arrangements of distinct items. Instead of listing every possible order, you can calculate the total using multiplication.
Consider a simple example: five people need to stand in a line for a photograph. How many different orders are possible?
The first position can be occupied by any of the five people.
Once that person is chosen, four people remain for the second position. Then three remain for the third position, followed by two and finally one.
The total number of arrangements is:
[
5!=5\times4\times3\times2\times1
]
[
5!=120
]
There are 120 possible ways to arrange the five people.
Arranging books on a shelf
Suppose you have six different books and want to place all of them in a row. Each book can occupy a different position, and changing the order creates a new arrangement.
[
6!=720
]
You can arrange the six books in 720 different ways.
Creating a sequence of unique letters
Imagine using four different letters to create a four-character sequence, with every letter appearing exactly once.
[
4!=4\times3\times2\times1=24
]
There are 24 possible sequences.
The important condition in these examples is that all items are distinct and every item is used exactly once. If you select only some of the items or allow repetition, the calculation changes.
This is why factorials are closely connected to permutations and combinations.
Factorial vs. Permutation vs. Combination: Which One Do You Need?
Factorials, permutations and combinations are related, but they answer different counting questions.
A factorial counts the arrangements of all (n) distinct objects. A permutation counts arrangements when you select only some of the available objects. A combination counts selections where the order does not matter.
| Concept |
What it counts |
Formula |
| Factorial |
Arranging all (n) distinct items |
(n!) |
| Permutation |
Arranging (r) items selected from (n) |
(\frac{n!}{(n-r)!}) |
| Combination |
Selecting (r) items from (n), without considering order |
(\frac{n!}{r!(n-r)!}) |
Consider five candidates and a selection of three people.
If you’re forming a committee
The three selected people have equal roles. Choosing Alice, Ben and Chris is the same committee regardless of the order in which their names are written.
Use the combination formula:
[
\binom53=\frac{5!}{3!\times2!}=10
]
There are 10 possible committees.
If you’re assigning three different positions
Now imagine those same candidates are competing for president, secretary and treasurer. Alice as president and Ben as secretary is different from Ben as president and Alice as secretary.
Use the permutation formula:
[
P(5,3)=\frac{5!}{(5-3)!}
]
[
P(5,3)=\frac{120}{2}=60
]
There are 60 possible assignments.
The difference comes down to one question: does changing the order create a different outcome?
If it does, you’re dealing with permutations. If it doesn’t, combinations are usually the right approach.
If you’re working with selection and arrangement problems, you can also use our Permutation and Combination Calculator to calculate (nPr) and (nCr) values.
What Happens When You Calculate 50!, 100! or More?
The factorial of 50 contains 65 digits. The factorial of 100 contains 158 digits. At larger inputs, the complete result becomes increasingly difficult to write, display and work with.
This creates a practical problem: how can mathematicians estimate a factorial when expanding every multiplication is inconvenient?
One commonly used method is Stirling’s approximation:
[
n!\approx\sqrt{2\pi n}\left(\frac ne\right)^n
]
Here:
-
(n) is the number whose factorial you want to estimate.
-
(\pi) is approximately 3.14159.
-
(e) is approximately 2.71828.
Stirling’s approximation provides an estimate of the factorial rather than its exact integer value. It becomes increasingly useful as (n) grows.
For example, estimating 100! using this method gives a result close to the actual factorial without multiplying all 100 integers together.
This approximation is important in probability, statistics and combinatorics, especially when calculations involve factorials too large to handle conveniently.
For everyday calculations, however, you generally want the exact factorial result rather than an approximation. The factorial calculator is useful for obtaining the result and examining its size without manually expanding the entire product.
Factorial Calculation Mistakes That Can Change Your Answer
Factorials look straightforward, but a few misunderstandings can lead to incorrect results.
Confusing factorial with ordinary multiplication
The notation (5!) does not mean (5\times5). It means multiplying every positive integer from 5 down to 1.
[
5!=5\times4\times3\times2\times1=120
]
Stopping the multiplication too early
The calculation must continue all the way down to 1. Leaving out an intermediate number changes the result.
For example:
[
5!=5\times4\times3\times2\times1
]
It is not just (5\times4\times3).
Assuming zero factorial equals zero
Despite the input being zero, the mathematical value of 0! is 1. This convention is important in counting formulas.
Confusing factorial with double factorial
The symbols may look similar, but they represent different operations.
For example:
[
5!=5\times4\times3\times2\times1=120
]
Whereas:
[
5!!=5\times3\times1=15
]
A double factorial skips every second integer. It should not be confused with the ordinary factorial calculated by this tool.
Misreading scientific notation
A result such as (3.6288\times10^6) is not a different factorial value from 3,628,800. It is simply another way to write the same number.
Assuming factorials increase at a constant rate
The difference between consecutive factorials becomes larger because each new factorial multiplies the previous result by the next integer. The growth is multiplicative, not a fixed addition.