How to use the factorial calculator
- Type a whole number n up to 10,000. You get the exact result, the number of digits and the trailing zeros.
- Choose n!! for the double factorial.
- Type a decimal such as 4.5 to get the gamma-function value Γ(n + 1).
Factorial formula
n! = n × (n − 1) × (n − 2) × … × 2 × 1, 0! = 1
Factorials of 0 to 20
0!1
1!1
2!2
3!6
4!24
5!120
6!720
7!5,040
8!40,320
9!362,880
10!3,628,800
11!39,916,800
12!479,001,600
13!6,227,020,800
14!87,178,291,200
15!1,307,674,368,000
16!20,922,789,888,000
17!355,687,428,096,000
18!6,402,373,705,728,000
19!121,645,100,408,832,000
20!2,432,902,008,176,640,000
Where factorials are used
- Permutations: the number of ways to order n items is n!. Ordering r of n items: n! ÷ (n − r)!.
- Combinations: choosing r of n items regardless of order: n! ÷ (r! (n − r)!). A 6-from-49 lottery has 13,983,816 combinations.
- Probability and series: Taylor series such as eˣ = Σ xⁿ ÷ n! and the Poisson distribution.
Factorials grow faster than powers: 10! is about 3.6 million and 70! is larger than a googol (10100). Use the scientific notation calculator to work with numbers this size.
Frequently asked questions
n factorial, written n!, is the product of every whole number from 1 to n. 5! = 5 × 4 × 3 × 2 × 1 = 120. Factorials count arrangements: 5 books can be ordered on a shelf in 120 ways.
There is exactly one way to arrange nothing, so 0! = 1. It also keeps the rule n! = n × (n − 1)! working: 1! = 1 × 0!, so 0! must be 1.
24. Each trailing zero comes from a factor of 10 = 2 × 5, and there are fewer 5s than 2s. Count them: ⌊100/5⌋ + ⌊100/25⌋ = 20 + 4 = 24. The calculator shows the trailing zeros for any n.
Not with the ordinary definition, but the gamma function extends it: x! = Γ(x + 1). That gives 0.5! = √π ÷ 2 ≈ 0.8862. Negative whole numbers have no factorial, even with gamma. Type a decimal and the calculator uses gamma.
n!! multiplies every other number down to 1 or 2: 7!! = 7 × 5 × 3 × 1 = 105 and 8!! = 8 × 6 × 4 × 2 = 384. It appears in some integrals and combinatorics problems.