Mathematics

Why Factorials Grow So Fast (And Why Permutation Counts Explode)

A factorial multiplies together every whole number from 1 up to n, and because each additional term is a bigger multiplier than the last, factorials grow far faster than exponential functions — 20! already has 19 digits, which is exactly why permutation and combination formulas need arbitrary-precision arithmetic instead of ordinary number types.

What a factorial is, and why it grows the way it does

n! (n factorial) = n × (n−1) × (n−2) × ... × 2 × 1 — the product of every whole number from 1 up to n. Each step doesn't just add a term, it multiplies by an ever-larger number: going from 10! to 11! multiplies by 11, but going from 100! to 101! multiplies by 101 — the multiplier itself keeps growing as n grows, which is why factorial growth outpaces even exponential growth (where the multiplier stays fixed) once n gets large enough.

A worked progression showing the explosion

5! = 120 (3 digits). 10! = 3,628,800 (7 digits). 20! = 2,432,902,008,176,640,000 (19 digits) — already larger than the largest number a standard 64-bit integer can represent exactly. 25! = 15,511,210,043,330,985,984,000,000 (26 digits). Doubling n from 10 to 20 doesn't double the digit count — it nearly triples it, from 7 to 19, because of how multiplicatively factorial growth compounds.

Why this forces a different kind of arithmetic

Standard JavaScript numbers (and most programming languages' default numeric types) can only represent whole numbers exactly up to 2^53 − 1 (about 9 quadrillion) — beyond that, precision is silently lost. Since 18! already exceeds this limit, any calculator computing factorials, permutations, or combinations for even moderately sized inputs needs arbitrary-precision integer arithmetic (BigInt in JavaScript) to produce an exact answer rather than a silently-rounded approximation.

Why this matters for permutation and combination counts specifically

Both nPr and nCr are built directly from factorials (nPr = n! ÷ (n−r)!, nCr = nPr ÷ r!) — so any combinatorics calculator inherits the exact same explosive growth and exact-arithmetic requirement. A permutation problem with n=20 already needs the same 19-digit-precision handling as computing 20! directly, which is precisely why real combinatorics tools can't rely on ordinary floating-point math once inputs get even moderately large.

An intuitive way to feel the scale

52! (the number of ways to arrange a standard deck of cards) is a number with 68 digits — far larger than the estimated number of atoms in the observable universe (roughly 10^80, which is "only" an 81-digit number, for comparison, but still vastly larger than most everyday quantities). This is why "there are more possible shuffles of a deck of cards than atoms in the universe" is a genuinely true, not exaggerated, statement — a direct, tangible consequence of just how fast factorial growth compounds.