Factorial Calculator
The factorial n! is the product of the integers from 1 up to n: 5! = 1 × 2 × 3 × 4 × 5 = 120. It is the basic building block of ordering (permutation) and selection (combination) problems; the number of different ways n distinct objects can be arranged is exactly n!.
Factorials grow astonishingly fast: 10! is about 3.6 million, 20! runs past a trillion, and 100! has 158 digits. This calculator computes the result EXACTLY for values up to 500; for very long results it shows the first 40 digits, the total digit count, the scientific notation, and the number of trailing zeros.
Formula
n! = 1 × 2 × 3 × ... × (n − 1) × n 0! = 1 (by definition) n! = n × (n − 1)!
It is easy to forget that 0! = 1: the empty set has exactly one arrangement, the empty one. The factorial of a negative integer is undefined, and the calculator warns you on such input.
How to Calculate
- Enter an integer between 0 and 500.
- Read n! as an exact integer in the results; for values longer than 40 digits, the first 40 digits and the total digit count are shown.
- Use the scientific notation and the number of trailing zeros to grasp the scale of the result.
- Study the table to see how the values grow from 0! up to 20!.
Worked Examples
5 factorial
5! = 1 × 2 × 3 × 4 × 5 = 120. In other words, 5 different books can be arranged on a shelf in 120 different orders. The result ends with 1 zero, which comes from the 2 × 5 among the factors.
Value of 5!: 120 · Scientific notation: ≈ 1.20 × 10² · Number of digits: 3
10 factorial
10! = 3,628,800 (roughly 3.6288 × 10⁶). A queue of 10 people can be formed in more than 3.6 million different orders, and the number ends with 2 zeros.
Value of 10!: 3,628,800 · Scientific notation: ≈ 3.6288 × 10⁶ · Number of digits: 7
100 factorial
100! is a number with exactly 158 digits: around 9.3326 × 10¹⁵⁷. It ends with 24 zeros, because up to 100 there are 20 multiples of five and 4 multiples of twenty-five (20 + 4 = 24).
Value of 100!: 9332621544394415268169923885626670049071… · Scientific notation: ≈ 9.3326 × 10¹⁵⁷ · Number of digits: 158