Factorial Calculator: n! With Exact Big Numbers
This factorial calculator finds n! for any whole number and shows the exact full value, even when it has hundreds of digits. Factorials count how many ways things can be arranged, so they come up in probability, permutations and combinations and in algebra homework.
Factorial Calculator
Exact n! for big numbers.
How to use the Factorial Calculator
- Enter a whole number n.
- Read n! and its size.
- See trailing zeros and the double factorial.
- Copy the full number if you need every digit.
How it works
n! means 1 × 2 × 3 × ... × n, and 0! is defined as 1. The product is computed with BigInt so every digit is exact. Trailing zeros are counted with Legendre’s formula: n/5 + n/25 + n/125 and so on, rounded down.
Example
10! = 3,628,800, which has 7 digits and 2 trailing zeros. 100! has 158 digits.
Frequently asked questions
Why is 0! equal to 1?
There is exactly one way to arrange zero items, and it keeps formulas consistent.
Can I take the factorial of a decimal?
Not here. That needs the gamma function.
What are factorials used for?
Counting arrangements, permutations, combinations and probability.
See also: Permutation and Combination Calculator, Big Number Calculator.
Calculate n factorial
How to use it
- Enter a whole number n, such as 10.
- Read n! in short form.
- Turn on the full value to see every digit.
- Copy the result for your work.
More questions
What is 0 factorial?
0! = 1, by definition.
What is 5 factorial?
5! = 5 × 4 × 3 × 2 × 1 = 120.
Where are factorials used?
In counting arrangements, permutations and combinations, probability and series in calculus.
Related tools: Permutation and Combination Calculator, Probability Calculator, Big Number Calculator.
Arranging 10 books and 20 items
Type a whole number n to get n!, its digit count, trailing zeros, double factorial and scientific notation. To write huge results such as 20! as 2.43 × 10¹⁸, use the Scientific Notation Calculator.
Worked example: 10 books on a shelf can be ordered in 10! = 3,628,800 ways (7 digits, 2 trailing zeros). 20! is 2,432,902,008,176,640,000, with 19 digits and 4 trailing zeros.
More answers
How many ways can 10 books be arranged on a shelf?
There are 10! = 3,628,800 orders, because the first spot has 10 choices, the next 9 and so on down to 1.
How many zeros end 20 factorial?
Four. Each factor of 5 in 5, 10, 15 and 20 pairs with a 2, so 20! = 2,432,902,008,176,640,000 ends in four zeros.