Loading calculator...
- Finds the exact value of n! for any whole number from 0 to 5,000.
- Also works out double factorials (n!!).
- Shows the number of digits, trailing zeros and scientific notation.
- Uses exact big-number arithmetic, so no digits are rounded.
How to use the factorial calculator
Enter n
Any whole number from 0 to 5,000.
Choose the type
n! (factorial) or n!! (double factorial).
Read the result
See the exact value, its digit count and trailing zeros.
What is a factorial?
The factorial of n, written n!, is the product of all whole numbers from 1 to n. It counts how many ways n different things can be put in order. Factorials grow very fast: 20! already has 19 digits.
Factorial formulas
n! = n × (n − 1) × (n − 2) × … × 2 × 1
0! = 1
n!! = n × (n − 2) × (n − 4) × … (down to 1 or 2)
Example 1: small factorials
Easy to check by hand.
- 5! 5 × 4 × 3 × 2 × 1 = 120
- 10! 3,628,800
- 20! 2,432,902,008,176,640,000
Example 2: big factorials
Exact values a normal calculator cannot show.
- 25! 15,511,210,043,330,985,984,000,000
- 100! ≈ 9.332622 × 10^157 (158 digits, 24 trailing zeros)
- 1000! 2,568 digits, 249 trailing zeros
Example 3: double factorials
Every second number.
- 7!! 7 × 5 × 3 × 1 = 105
- 8!! 8 × 6 × 4 × 2 = 384
Where factorials are used
Permutations
Count the ways to arrange items in order.
Combinations
Count the ways to choose groups.
Probability
Work out odds in card games and lotteries.
Series in calculus
Taylor series for e, sin and cos use factorials.
Count arrangements with the permutation and combination calculator, work out odds with the probability calculator, or multiply huge numbers in the big number calculator.
Factorial calculator FAQ
What is a factorial?
n! is the product of every whole number from 1 to n. For example, 5! = 120.
Why is 0! equal to 1?
There is exactly one way to arrange zero items, and it keeps formulas like n! = n × (n − 1)! working.
What is 10 factorial?
10! = 3,628,800.
How many digits does 100! have?
158 digits. It is about 9.332622 × 10^157 and ends in 24 zeros.
How do you count the trailing zeros of n!?
Add n ÷ 5, n ÷ 25, n ÷ 125 and so on, keeping only whole numbers. 100! has 20 + 4 = 24.
Can you take the factorial of a negative number?
No. Factorials are only defined for whole numbers 0 and above.