Math FIELD NOTES · 4 MIN READ
The Factorial: Multiplication That Outgrows Everything
What n! counts, why 0! equals 1, how fast factorials grow, and why the calculator stops at 170 — the edge of 64-bit precision.
Multiply every whole number from 1 up to n together and you have n! — the factorial. The recipe takes one line to state, but the results outrun every other everyday operation in mathematics, which is exactly why calculators, not humans, are the right tool for anything past a handful of terms.
The definition, and the strange case of 0!
n! = 1 × 2 × 3 × … × n
5! = 1 × 2 × 3 × 4 × 5 = 120
10! = 3,628,800
One value looks wrong at first glance: 0! = 1. There are two ways to see it. Structurally, the factorial obeys n! = n × (n − 1)! at every step — 5! = 5 × 4! — and that pattern has to keep working on the way down: 1! = 1 × 0!, so 0! must be 1 for the chain to hold. Combinatorially, 0! counts the ways to arrange nothing, and there is exactly one such arrangement: the empty one. The calculator encodes both facts directly — any input of 0 or 1 returns 1 without running the loop.
How fast the growth really is
1! = 1
5! = 120
10! = 3,628,800
20! = 2,432,902,008,176,640,000
52! ≈ 8.07 × 10⁶⁷
Growth is brutal because the multiplier itself keeps growing — you multiply by 2, then 3, then 4, never repeating. The famous example is a deck of cards: 52! is the number of possible orderings, about 8.07 × 10⁶⁷. Shuffle well and your arrangement is, with near certainty, one that no previous shuffle in history has ever produced. Numbers at this scale stop being listable and start needing scientific notation — and past 10¹² or so they outgrow even the named scales in how big numbers get their names.
Why the calculator stops at 170
The calculator rejects any input above 170, and that ceiling is not arbitrary: 64-bit floating-point arithmetic tops out near 1.8 × 10³⁰⁸, and 170! is the last factorial that fits under it.
170! ≈ 7.2574 × 10³⁰⁶ (just under the 64-bit ceiling)
171! would overflow to Infinity
Past 170 the tool prefers an honest error message over a fake answer, because once the product overflows, every larger "result" is the same meaningless Infinity. If you need magnitudes beyond that, log-factorials or Stirling's approximation take over — a different tool for a different regime.
What factorials count
The factorial's day job is counting orderings. Ten runners can finish a race in 10! = 3,628,800 orders; a 4-digit PIN uses digits that can repeat, which is why it is 10⁴, not 10!. Selections come from dividing factorials: the number of ways to arrange r of n items is n!/(n − r)!, and the number of ways to choose r of them ignoring order is n!/(r!(n − r)!). The classic: a 5-card poker hand from 52 cards is 52!/(5!·47!) = 2,598,960 possible hands. The permutations vs combinations explainer works through that division in detail.
Factorial versus exponent
It is easy to assume exponents always win growth contests, but the factorial pulls ahead because its multiplier grows at every step while exponentiation multiplies by the same fixed base:
2²⁰ ≈ 1.05 × 10⁶
20! ≈ 2.43 × 10¹⁸ (over two trillion times bigger)
By 100 the gap is absurd: 100! ≈ 9.3 × 10¹⁵⁷ against 2¹⁰⁰ ≈ 1.27 × 10³⁰. The two growth curves cross early and never look back — a fact that matters in computer science, where algorithms with factorial running time become hopeless around n = 15 while exponential ones merely become expensive. How exponents and logarithms work covers the other side of that comparison.
Try it yourself
The Factorial Calculator multiplies out any integer from 0 to 170 — try 10 for a satisfying 3,628,800, then 52 to watch scientific notation take over, then 171 to meet the honest error. Feed the results into the Permutation & Combination Calculator to count arrangements and selections, and the Exponent Calculator to race factorials against fixed-base powers yourself.