Combination Calculator
Calculate combinations C(n, r) — the number of ways to choose r items from n without regard to order.
Calculate the factorial of any non-negative integer (n!). See step-by-step multiplication and related values.
| n | n! | Digits | Trailing 0s |
|---|---|---|---|
| 0 | 1 | 1 | 0 |
| 1 | 1 | 1 | 0 |
| 2 | 2 | 1 | 0 |
| 3 | 6 | 1 | 0 |
| 4 | 24 | 2 | 0 |
| 5 | 120 | 3 | 1 |
| 6 | 720 | 3 | 1 |
| 7 | 5,040 | 4 | 1 |
| 8 | 40,320 | 5 | 1 |
| 9 | 362,880 | 6 | 1 |
| 10 | 3,628,800 | 7 | 2 |
| 11 | 39,916,800 | 8 | 2 |
| 12 | 479,001,600 | 9 | 2 |
| 13 | 6,227,020,800 | 10 | 2 |
| 14 | 87,178,291,200 | 11 | 2 |
| 15 | 1,307,674,368,000 | 13 | 3 |
| 16 | 20,922,789,888,000 | 14 | 3 |
| 17 | 355,687,428,096,000 | 15 | 3 |
| 18 | 6,402,373,705,728,000 | 16 | 3 |
| 19 | 121,645,100,408,832,000 | 18 | 3 |
| 20 | 2,432,902,008,176,640,000 | 19 | 4 |
The Factorial Calculator computes n! (n factorial) for any non-negative integer. The factorial of n is the product of all positive integers from 1 to n: n! = n × (n−1) × ... × 2 × 1.
Factorials grow extremely fast. While 10! = 3,628,800, by 20! the result exceeds 2.4 quintillion. Despite this explosive growth, factorials are fundamental — they appear in permutations, combinations, probability distributions, Taylor series, and countless mathematical formulas.
This calculator handles values up to 170! (the limit of JavaScript's floating-point precision) and shows the number of trailing zeros, which is determined by the number of times 5 divides into n!.
Factorials grow astronomically fast and are tedious to compute by hand. This calculator provides exact results (up to floating-point limits) and shows step-by-step multiplication.
n! = n × (n−1) × (n−2) × ... × 2 × 1
0! = 1 (by definition)
Trailing zeros = Σ floor(n/5^k) for k = 1, 2, ..Result: 3,628,800
10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 3,628,800. It has 7 digits and 2 trailing zeros.
The number of permutations of n objects is n!. Combinations use factorials: C(n,r) = n!/(r!(n−r)!). Many probability distributions (binomial, Poisson) involve factorials.
For large n, n! ≈ √(2πn)(n/e)^n. This approximation is remarkably accurate even for moderate n and is essential in statistical mechanics and information theory.
For exact results beyond 170!, arbitrary-precision arithmetic (BigInt) is needed. Many programming languages provide big-integer libraries specifically for factorial-related computations.
Mastering this concept provides a strong foundation for advanced coursework in mathematics, statistics, and related quantitative disciplines. Understanding when and how to apply factorials is essential for solving real-world problems in probability and combinatorics.
Last updated:
n! (read "n factorial") is the product of all positive integers up to n. For example, 5! = 120. It counts the number of ways to arrange n distinct items in order.
By convention and the empty product rule. There is exactly one way to arrange zero items. It also makes formulas like C(n,0)=1 work correctly.
Extremely fast. 10! = 3.6 million, 20! = 2.4 quintillion, and 100! has 158 digits. Factorials grow faster than exponential functions.
Trailing zeros come from factors of 10 = 2×5. Since there are always more factors of 2 than 5, count the factors of 5: floor(n/5) + floor(n/25) + floor(n/125) + ...
The gamma function Γ(z) extends factorials to all complex numbers except negative integers. For positive integers, Γ(n) = (n−1)!. Γ(0.5) = √π.
n!! is the product of all integers from 1 to n with the same parity. 7!! = 7×5×3×1 = 105. It appears in combinatorics and certain integrals.
Calculate combinations C(n, r) — the number of ways to choose r items from n without regard to order.
Calculate permutations P(n, r) — the number of ordered arrangements of r items from n.