Factorial Calculator
The factorial of a non-negative integer n, denoted n!, is the product of all positive integers less than or equal to n. By convention, 0! = 1. Factorials grow extremely fast — 20! already exceeds 2.4 quintillion, and 1000! has over 2,500 digits.
This calculator uses BigInt arithmetic to compute exact factorials for values up to 1000, displaying the full result and its digit count. Factorials are fundamental in combinatorics, probability theory, and algebra, appearing in permutations, combinations, Taylor series, and many other mathematical formulas.
How it works
n! = n × (n−1) × (n−2) × ... × 2 × 1, with the special case 0! = 1. Stirling's approximation: n! ≈ √(2πn) × (n/e)^n for large n.
Use cases
- Computing permutations and combinations in probability problems
- Evaluating terms in Taylor and Maclaurin series
- Solving combinatorics problems in math competitions
- Understanding growth rates in algorithm analysis
Frequently asked questions
What is a factorial in math?
The factorial of a non-negative integer n, written n!, is the product of all positive integers from 1 up to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. Factorials count the number of ways to arrange n distinct items and appear throughout combinatorics and probability.
Why is 0! equal to 1?
By convention 0! is defined as 1. This makes formulas for permutations and combinations work correctly — there is exactly one way to arrange an empty set. It also keeps the recursive rule n! = n × (n−1)! consistent, since 1! = 1 × 0! requires 0! to be 1.
What is the factorial of 10?
10! equals 3,628,800. It is calculated as 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1. Factorials grow very quickly — 10! is already over 3.6 million, and 13! surpasses 6 billion.
Can you take the factorial of a negative or decimal number?
The standard factorial is only defined for non-negative integers, so negative numbers and decimals have no ordinary factorial. Mathematicians extend the idea to real and complex numbers using the gamma function, where n! = Γ(n+1). This calculator handles whole numbers from 0 to 1000.
How many digits does 100! have?
100! has 158 digits and begins with 9332621544... Factorials grow faster than exponential functions, which is why the result quickly becomes enormous. This calculator uses BigInt arithmetic to show the full exact value and its digit count for any input up to 1000.