How this factorial calculator works
The factorial of a non-negative integer n, written n!, is the product of every whole number from 1 up to n. So 4! = 4 × 3 × 2 × 1 = 24, and 6! = 6 × 5 × 4 × 3 × 2 × 1 = 720. Factorials grow extremely fast — much faster than exponentials — which is why even modest inputs produce enormous results.
Because the answers get so large, this calculator uses big-integer arithmetic (JavaScript BigInt) to multiply the numbers exactly. That means 100! is shown as its full 158-digit value rather than being squashed into a rounded floating-point figure like 9.33 × 10157. For convenience we still display that scientific-notation approximation and the total digit count alongside the exact integer.
Reference table: 0! through 10!
| n | n! |
|---|---|
| 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 |
Reference note: the ordinary factorial is defined only for non-negative integers, with 0! = 1 by convention. Negative numbers and decimals are rejected. Inputs above 100000 are capped to keep the calculation responsive.
Frequently asked questions
- What is a factorial?
- A factorial, written n!, is the product of every integer from 1 up to n. For example 5! = 5 × 4 × 3 × 2 × 1 = 120. It counts the number of ways to arrange n distinct items in order.
- What is 0 factorial?
- 0! equals 1 by definition. There is exactly one way to arrange an empty set — the empty arrangement — and defining 0! = 1 keeps formulas such as the binomial coefficient and the recurrence n! = n × (n−1)! consistent.
- How big is 100 factorial?
- 100! is a 158-digit number, approximately 9.33 × 10^157. It is far too large for ordinary floating-point numbers, which is why this calculator uses exact big-integer arithmetic to show every digit.
- What is a factorial used for?
- Factorials appear throughout combinatorics and probability. They count permutations (orderings) of n items, form the denominators of combination and permutation formulas, and appear in Taylor series, the gamma function, and many statistical distributions.
- Can you take the factorial of a negative or decimal number?
- The ordinary factorial is only defined for non-negative integers (0, 1, 2, 3, …). Negative numbers and decimals are not allowed here. The gamma function extends the idea to other values, but that is a different operation from the integer factorial this tool computes.
- What is 10 factorial?
- 10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 3,628,800. It is the number of distinct ways to order ten different items.