Factorial Calculator
n!, up to the point where a computer runs out of room.
Work out Factorial. n!, up to the point where a computer runs out of room. Free, with no account and nothing to download.
10!
3,628,800
7 digits
Factorials grow faster than any exponential. 10! has 7 digits; 11! would have roughly 8. This is why brute-forcing arrangements becomes impossible so quickly — 20! already exceeds the number of seconds since the universe began.
How the Factorial Calculator works
The factorial of n is the product of every whole number from 1 to n, and it counts the ways n things can be arranged. It grows faster than any exponential — 170! is about 7.26 × 10³⁰⁶, and 171! exceeds what ordinary numbers can hold.
Also known as: n factorial calculator · what is 0 factorial · factorial formula · how to calculate factorial
Why 0! is 1
It looks like a special case pushed in to make formulas work, and in a sense it is — but it is also the honest answer.
A factorial counts arrangements. There is exactly one way to arrange nothing: the empty arrangement. Zero ways would mean arranging nothing is impossible, which it plainly is not.
It also follows from the recursive definition: n! = n × (n−1)!, so 1! = 1 × 0!, and since 1! is 1, 0! must be too.
How fast they grow
10! is 3,628,800. 20! is about 2.4 × 10¹⁸ — more than the number of seconds since the universe began.
170! is roughly 7.26 × 10³⁰⁶, which is the largest that fits in an ordinary double-precision number. 171! overflows to infinity, so this page refuses it rather than displaying ∞ as though it were a value.
This growth is why brute force fails so quickly on ordering problems. Checking every route between 20 cities means 20! possibilities, and no amount of computing power makes that tractable.
Frequently asked questions
What is a factorial?
The product of all whole numbers from 1 up to n. 5! is 5 × 4 × 3 × 2 × 1 = 120, and it counts the number of ways five things can be ordered.
Why is 0! equal to 1?
Because there is exactly one way to arrange nothing — the empty arrangement. Defining it as 1 also keeps every formula that uses factorials working without special cases.
How large can a factorial get?
170! is the largest an ordinary double-precision number holds, at roughly 7.26 × 10³⁰⁶. 171! overflows to infinity, so this page refuses it rather than showing ∞.
Why do factorials grow so fast?
Each step multiplies by a larger number than the last, so growth accelerates. 20! already exceeds the number of seconds since the universe began, which is why brute-forcing arrangements becomes impossible so quickly.
Put this calculator on your own site
Free to use, on any site, commercial or not. Paste this where you want it to appear. It is a plain iframe, so it works in WordPress, Squarespace, Wix, Webflow, Ghost and anything else that accepts HTML.
<iframe src="https://www.thecalclibrary.com/embed/factorial-calculator" width="100%" height="640" style="border:1px solid #e2e8f0;border-radius:12px" loading="lazy" title="Factorial Calculator"></iframe>The only condition is that the credit line stays visible. It sits inside the frame, so you do not have to do anything to keep it.
Related calculators
Permutation and Combination Calculator
nPr and nCr, with and without repetition.
OpenPrime Factorization Calculator
Prime factors, the divisor count, and where it comes from.
OpenProbability Calculator
Two events combined, and the odds over repeated trials.
Open