Factorial Calculator (n!)
Compute n! for any non-negative integer up to 1000. Uses BigInt for exact results above 170.
Factorial (n!)
10! =
3628800
Scientific notation: 3.628800e+6
Frequently Asked Questions about the Factorial Calculator (n!)
What is a factorial?
n factorial (written n!) is the product of all positive integers from 1 to n. So 5! = 1 x 2 x 3 x 4 x 5 = 120. By definition 0! = 1, which makes combinatorial formulas consistent.
How fast does the factorial grow?
Extremely fast. 10! is about 3.6 million, 20! is roughly 2.4 quintillion, and 100! has 158 digits. This is why factorials show up in counting problems where the totals explode.
Why does this calculator switch to BigInt for large n?
JavaScript doubles lose precision above 2^53 and overflow to Infinity past 170!. The calculator computes the exact integer with BigInt so you can see all digits up to 1000!.
Where are factorials used?
Counting permutations and combinations, probability (lottery odds, card hands), Taylor series in calculus, and many areas of computer science such as algorithm analysis and recursion examples.
Why is 0! defined as 1?
There is exactly one way to arrange zero objects, namely doing nothing. Defining 0! = 1 also keeps the recurrence n! = n x (n-1)! valid and makes nCr formulas work when r equals 0 or n.