No ads, no sign-upChecked 2026-08-25

Factorial Calculator

Result

120

Result: 120
How the result moves

n! multiplies every whole number from 1 up to n, so 5! is 1 × 2 × 3 × 4 × 5 = 120. It counts the orderings of n different things: five runners can finish in 120 ways. By definition 0! is 1.

Worked examples

How it's calculated

n! = 1 × 2 × 3 × … × n

  1. StepEnter a whole number from 0 to 21.
  2. StepEvery integer from 1 up to n is multiplied together.
  3. ResultThe answer is also the number of ways to order n items.

Reference table

nReads asn!
0the empty arrangement1
1one item, one order1
51 × 2 × 3 × 4 × 5120
10orderings of ten items3628800
13past six billion6227020800
20past two quintillion2432902008176640000
21the last one a double prints exactly51090942171709440000

Questions

What is a factorial?

A factorial is the product of every positive whole number up to n, written n!, so five factorial is 1 × 2 × 3 × 4 × 5 = 120. It counts the ways to arrange n distinct items in order, which is why it turns up throughout probability, combinations and permutations.

Why does 0! equal 1?

There is exactly one way to arrange an empty set — the empty arrangement — so the count is 1, not 0. It also keeps the formulas consistent: the recurrence that turns n factorial into n × (n − 1) factorial makes one factorial equal 1 × zero factorial, which only works out if zero factorial is 1.

What do factorials actually count?

The number of distinct ways to put n different items in a row. Three books have six possible shelf orders, five runners have 120 possible finishing orders.

How fast do factorials grow?

Faster than any exponential. Five factorial is only 120, but ten factorial is already 3,628,800 and twenty factorial is over 2.4 quintillion. Each step multiplies by the next integer, so the value explodes.

Why does this tool stop at 21!?

Because 22 factorial is the first one a standard number can no longer write out digit for digit: it prints as 1,124,000,727,777,607,700,000 when the true value ends in 680,000. Larger factorials need arbitrary-precision arithmetic, so the calculator stops where every printed digit is still true.

Sources and last check

  1. mathworld.wolfram.com

Information, not professional advice.