Factorial Calculator

Compute n! with exact results even for very large numbers.

Your result will appear here

Fill in the fields and press Calculate.

A factorial (n!) is the product of all whole numbers from 1 up to n, and it is the building block of probability, permutations, combinations and counting problems. Its value grows astonishingly fast: 5! is only 120, but 10! exceeds three million and 20! is an eighteen-digit number. That growth overflows most calculators — this tool gives an exact result even for large numbers.

Enter a number and n! is computed exactly.

How is it calculated?

Definition

n! = n × (n−1) × (n−2) × … × 2 × 1. For example 5! = 5 × 4 × 3 × 2 × 1 = 120.

Special cases

  • 0! = 1. Zero factorial is defined as 1 (the empty product). This is required for the combination and permutation formulas to work consistently.
  • 1! = 1.
  • Negative and non-integer numbers have no factorial in the basic definition.

How fast does it grow?

nn!
5120
103,628,800
136,227,020,800
202,432,902,008,176,640,000

13! no longer fits on a calculator display; 20! has eighteen digits. This faster-than-exponential growth is why factorials involve very large numbers — the tool uses exact integer arithmetic with no loss of digits.

Where it is used

  • Permutations: all arrangements of n distinct objects total n!.
  • Combination and permutation formulas: C(n,r) and P(n,r) are defined with factorials.
  • Probability: the denominators of arrangement and selection problems.

For direct selection and arrangement use a combination calculator and a permutation calculator.

Worked example

Take 5!: 5 × 4 × 3 × 2 × 1 = 120 — exactly the number of ways five people can line up in a row. To see how fast it grows: 10! = 3,628,800 (arrangements of ten people), 13! = 6,227,020,800 (now ten digits). Because each step multiplies the previous by n, the value compounds: going from 5! to 10! multiplies the result by more than 30,000. And remember 0! is defined as 1 — required for the consistency of the selection formulas.

FAQ

How is a factorial calculated?+

n! is the product of all whole numbers from 1 up to n: 5! = 5×4×3×2×1 = 120. The tool returns the exact value even for large n, with no loss of digits.

Why does 0! equal 1?+

By definition the empty product is 1. Also, 0! must equal 1 for combination and permutation formulas (like C(n,n)=1) to remain consistent.

How fast does a factorial grow?+

5! = 120, 10! ≈ 3.6 million, and 20! is an eighteen-digit number. Because each step multiplies by n, it grows faster than exponentially, which is why large n needs special computation.

Does a negative or decimal number have a factorial?+

Not in the basic definition — factorials are defined only for 0 and positive integers. (Advanced maths extends this with the gamma function, but this tool works with integers.)

Where are factorials used?+

In arrangement (permutation) and selection (combination) problems, probability, and series expansions. All arrangements of n distinct objects total exactly n!.

Why does my calculator error on large factorials?+

Most calculators round or overflow past a certain number of digits. This tool uses exact integer arithmetic, so it computes even very large values like 100! precisely.