Factorial Calculator
Calculate factorials of any size, and understand where they come from and how fast they grow.
Need this done properly for your business?
Radiatus delivers secure cloud, DevOps & compliance engineering.
What a factorial counts
n! is the product of every integer from 1 to n, and it counts the number of ways to arrange n distinct items in order. Five books on a shelf can be arranged 5! = 120 ways: five choices for the first position, four for the second, and so on. That arrangement count is the definition's actual meaning, not a consequence of it.
Why 0! is 1
There is exactly one way to arrange nothing — the empty arrangement — so the count is 1. It also follows from the recursive definition, since n! = n × (n−1)! requires 1! = 1 × 0!, which forces 0! = 1. It is a necessary value, not a convention adopted for tidiness.
Growth outruns everything
Factorials grow faster than any exponential. 10! is 3.6 million, 20! is about 2.4 × 10¹⁸, and 70! exceeds 10¹⁰⁰ — more than the estimated number of atoms in the observable universe. This is why brute-force approaches to permutation problems become impossible so abruptly: 15 items is 1.3 trillion arrangements, and 20 is beyond any computer.
Where factorials appear
Permutations of n items taken r at a time are n!/(n−r)!. Combinations, where order does not matter, are n!/(r!(n−r)!) — the binomial coefficient behind Pascal's triangle and the binomial theorem. Factorials also sit in the denominators of the Taylor series for e^x, sine and cosine, which is why they show up in numerical analysis far from any counting problem.
Computing them safely
Standard integer types overflow quickly: 13! exceeds a 32-bit signed integer and 21! exceeds a 64-bit one. Some languages wrap silently to a negative number, giving a confidently wrong answer with no error. Anything past 20! requires arbitrary-precision arithmetic, and where only the magnitude matters, working with log factorials — summing logarithms rather than multiplying — avoids overflow entirely.
Non-integers and the gamma function
The factorial extends to non-integer and complex arguments through the gamma function, where Γ(n) = (n−1)! for positive integers. It gives meaning to expressions like the factorial of one half, which equals √π/2, and it is why statistical distributions with continuous parameters can be written in factorial-like form.
Frequently Asked Questions
Privacy & Security
All processing happens locally in your browser — nothing is uploaded.
How to Use
Enter a whole number to compute its factorial exactly.
Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.
Related Tools
Percentage Calculator
MathCalculate percentages, percentage change, increase and decrease, and reverse percentages, with the working shown for each result.
Statistical Calculator
MathCalculate mean, median, mode, standard deviation, and more.
Probability Calculator
MathCalculate probabilities for single and combined events, including conditional probability and Bayes' theorem.