The factorial of a non‑negative integer n, written n!, is the product of all whole numbers from 1 up to n. This page computes exact factorial values in your browser using BigInt, so results are not rounded (within practical performance limits).
For integers n ≥ 1:
n! = n × (n − 1) × (n − 2) × … × 2 × 1
And by convention:
0! = 1 (the “empty product”).
Factorials satisfy:
n! = n × (n − 1)!, with 0! = 1.
This tool is intentionally limited to standard factorials for non‑negative integers. If you need “factorials” of decimals or negative numbers, that’s typically the Gamma function, which is not computed here.
Factorials grow extremely fast. Even modest inputs produce very large integers:
That rapid growth is exactly why factorials appear in counting and probability problems: they count how many ways to arrange or choose items.
Suppose you want to compute 6!.
By the definition:
6! = 6 × 5 × 4 × 3 × 2 × 1 = 720
Interpretation: if you have 6 distinct objects (for example, 6 different books), there are 720 different possible orderings.
This table is helpful for sanity‑checking results and understanding growth.
| n | n! | Digits in n! | Notes |
|---|---|---|---|
| 0 | 1 | 1 | Defined as the empty product |
| 1 | 1 | 1 | Same value as 0! |
| 5 | 120 | 3 | Small counting problems |
| 10 | 3,628,800 | 7 | Already in the millions |
| 20 | 2,432,902,008,176,640,000 | 19 | Exceeds 64‑bit integer range |
| 50 | 30,414,093,201,713,378,043,612,608,166,064,768,844,377,641,568,960,512,000,000,000,000 | 65 | Large but still commonly referenced |
| 100 | 93,326,215,443,944,152,681,699,238,856,266,700,490,715,968,264,381,621,468,592,963,895,217,599,993,229,915,608,941,463,976,156,518,286,253,697,920,827,223,758,251,185,210,916,864,000,000,000,000,000,000,000,000 | 158 | Often used in examples; huge integer |
If you have n distinct items and want to count how many different orderings exist, the answer is n!.
The number of ways to choose r items from n items is:
C(n, r) = n! / (r!(n − r)!)
That’s why factorials show up constantly in probability, statistics, and counting problems.
Factorials appear in power series; for example, the exponential function can be written as:
ex = Σ (xn / n!) for n = 0 to ∞.
BigInt, which is supported by modern browsers. In older environments, this calculator may not work.0! = 1 by convention (the empty product). This makes many formulas—especially in combinations and series expansions—work consistently.
Each step multiplies by a larger integer (e.g., n! includes a factor of n), so growth accelerates quickly. That’s why digit counts rise rapidly as n increases.
Not with this tool. The continuous extension of factorial is the Gamma function, defined for many non‑integer values. This calculator intentionally restricts inputs to integers for exact results.
It depends on your device and browser, but this page sets a maximum to remain responsive. Even before the cap, copying and rendering can be the limiting factor because the result can contain thousands of digits.