GintiCalcEvery calculation

FactLab

Factorial Calculator

n! = n × (n−1) × … × 1.

Factorials from 0 to 20

n factorial is the product of every whole number from 1 to n. It counts the number of ways n distinct items can be arranged in order.

nn!Meaning
01One way to arrange nothing
11One arrangement
36Orderings of 3 books
5120Orderings of 5 people
6720Orderings of 6 items
840,320Orderings of 8
103,628,800Orderings of 10
12479,001,600Orderings of 12
151,307,674,368,000Orderings of 15
202,432,902,008,176,640,000Orderings of 20

0! is defined as 1, which looks arbitrary but is required for the combination and permutation formulas to work at the edges - and there is exactly one way to arrange an empty set. Growth is astonishing: 20! is over two quintillion, larger than the number of seconds since the Big Bang. That is why shuffling a deck of 52 cards produces an order almost certainly never seen before - 52! is roughly 8 followed by 67 zeros. Beyond 21!, results exceed what a double-precision number can represent exactly, so very large factorials lose precision.

Counting every possible order

n! counts the number of ways to arrange n distinct items in a row — 5 books on a shelf can be ordered 5! = 120 different ways, since there are 5 choices for the first spot, 4 for the next, and so on.

Why it grows so fast

Factorials explode in size — 10! is already over 3.6 million, and 20! exceeds a quintillion — which is why it's central to combinatorics, probability, and permutation/combination formulas.

Frequently asked questions

What is a factorial?

n! = n × (n−1) × (n−2) × … × 1. It counts the number of ways to arrange n distinct items. 5! = 5×4×3×2×1 = 120. By convention, 0! = 1 (there's exactly one way to arrange zero items: do nothing).

Why is 0! equal to 1?

There's exactly one way to arrange zero objects: the empty arrangement. It also makes the permutation and combination formulas work: C(n,0) = n!/(0!×n!) = 1, which correctly says there's one way to choose nothing.

What is the largest factorial a calculator can handle?

Most standard calculators overflow at 170! (≈7.26 × 10³⁰⁶) because 171! exceeds the largest floating-point number. This calculator goes up to 170!. For larger values, use Stirling's approximation: n! ≈ √(2πn) × (n/e)ⁿ.

Related Math calculators

You might also like

Last updated: September 6, 2026