Factorial Calculator
Calculate exact factorials, permutations and combinations.
20!
2432902008176640000
19 digits
Number of digits
19
Trailing zeros
4
Approximate value
2.4329 × 10^18
19!
121645100408832000
n! = n × (n − 1) × … × 2 × 1
- 0! is defined as 1 — it is the only value that makes the combination formula work.
- Exact result computed with BigInt arithmetic, so nothing overflows.
What does Factorial Calculator do?
Compute n! exactly using BigInt arithmetic, so even 1000! is returned in full rather than as infinity. Permutation and combination calculators are included, since those are what factorials are usually needed for.
How to Use Factorial Calculator
- 1Enter nAny non-negative whole number.
- 2Choose the operationFactorial, permutation or combination.
- 3Read the exact resultWith a digit count for very large values.
Key Features
- Exact factorials for large n, computed with BigInt
- Permutations nPr and combinations nCr
- Digit count and scientific-notation approximation for huge results
- Trailing-zero count, a common exam question
- Step-by-step expansion for small values
Frequently Asked Questions
What is 0 factorial?
1, by definition. It is not arbitrary — it is the only value that makes the combination formula work, since there is exactly one way to arrange nothing.
What is the difference between permutations and combinations?
Permutations count arrangements where order matters (nPr = n!/(n−r)!); combinations count selections where it does not (nCr = n!/(r!(n−r)!)). Picking a committee is a combination; picking first, second and third place is a permutation.
Why do other calculators show infinity for large factorials?
Because they use floating-point numbers, which overflow above about 170!. This calculator uses BigInt, so 1000! is returned in full — all 2,568 digits.
How many trailing zeros does 100! have?
24. Each trailing zero comes from a factor of 10, which needs a 2 and a 5; fives are scarcer, so you count multiples of 5, then 25, then 125. The tool computes this directly.
All arithmetic runs in your browser, using exact BigInt maths where whole numbers are involved so nothing is lost to floating-point rounding.
Related Tools
Prime Number Checker
Check whether a number is prime and see its factors.
Fibonacci Sequence Generator
Generate Fibonacci numbers and explore the golden ratio.
LCM and HCF Calculator
Find the lowest common multiple and highest common factor.
Scientific Notation Converter
Convert between standard, scientific and engineering notation.