Factorial Calculator
Calculate n! exactly for any whole number up to 2000, using big-integer arithmetic so every digit of the answer is correct.
How to use it
- Enter a whole number between 0 and 2000.
- The full exact answer is printed underneath — no rounding, no scientific notation.
- The digit count tells you how fast factorials explode.
Examples
| 5! | 120 |
| 10! | 3,628,800 |
| 20! | 2,432,902,008,176,640,000 |
A factorial counts the number of ways to arrange a set of distinct items in order. 5! = 120 means there are 120 different orders for five items on a shelf. Factorials grow explosively — 20! is already a 19-digit number, and 100! has 158 digits — so this tool uses big-integer arithmetic rather than the floating-point maths a standard calculator relies on, which loses precision past about 15–17 significant digits.
Where factorials come up
- Permutations — the number of ways to order n items is n!.
- Combinations — nCr = n! ÷ (r! × (n − r)!), the basis of lottery odds and probability problems.
- Series expansions in calculus, such as the Taylor series for eˣ and sin(x), which divide each term by a factorial.
- Queueing and scheduling problems that count arrangements of tasks or people.
Worked example
A relay team of 4 runners can be lined up in 4! = 24 different orders. Extend that to a 10-runner squad picking any 4 for the relay, and the count becomes a permutation, 10! ÷ 6! = 5,040 — factorials are the building block even when the final question is about a subset rather than the whole group.
Questions people ask
Why is 0! equal to 1?
There is exactly one way to arrange nothing — the empty arrangement. Defining 0! as 1 also keeps the formula n! = n × (n−1)! working all the way down.
Can I take the factorial of a decimal?
Not directly. The gamma function extends factorials to non-integers, but this calculator works with whole numbers only.
Is anything sent to a server?
No. Every calculation runs in your browser, so nothing you type is uploaded and the page keeps working offline once it has loaded.
Last updated 17 August 2026