Factorial Calculator
The factorial of n, written n!, is the product of every whole number from 1 up to n. It counts how many ways you can arrange n items and is the building block of permutations and combinations.
Your numbers
Result
- Number of digits
- 3
| Step | Detail |
|---|---|
| 5! | 5 x 4 x 3 x 2 x 1 |
| Result | 120 |
| Number of digits | 3 |
How factorials work
n! multiplies all whole numbers from 1 to n: 5! = 5 x 4 x 3 x 2 x 1 = 120. By definition 0! = 1 (there is exactly one way to arrange nothing). Factorials grow extremely fast — 10! is already over 3.6 million, and 20! passes 2 quintillion.
Where factorials appear
Factorials count arrangements. The number of ways to order n distinct items is n!. They power permutations and combinations, and appear throughout probability, algebra (the binomial theorem) and calculus (Taylor series).
Frequently asked questions
Sources
- Factorial (product of integers from 1 to n)
Embed this calculator
Copy the code and paste it into your site or blog. Credit with a link back to Contania is included, and the height adjusts itself.
<iframe src="https://contania.app/embed/math/factorial" title="Factorial Calculator (n!)" width="100%" height="720" loading="lazy" style="border:1px solid #e5e0d8;border-radius:12px;max-width:640px"></iframe>
<script>window.addEventListener("message",function(e){if(e.data&&e.data.type==="contania:embed-height"){var f=document.querySelector('iframe[src="https://contania.app/embed/math/factorial"]');if(f){f.style.height=e.data.height+"px"}}});</script>Related calculators
Combinations
Calculate combinations (nCr) and permutations (nPr). Enter n and r to find how many ways to choose or arrange items — order matters for permutations, not for combinations.
CalculateMathProbability
Calculate the probability of an event from the favorable and possible outcomes. See the result as a percentage, a decimal and a fraction.
CalculateMathExponent
Raise any number to a power. Enter a base and an exponent — including negative and fractional exponents — to get the result.
CalculateMathFractions
Add, subtract, multiply and divide fractions, with the result already simplified and shown as a decimal. Enter the numerators and denominators.
CalculateMathGeometric Mean
Calculate the geometric mean of a set of positive numbers — the nth root of their product. Useful for growth rates, ratios and returns.
CalculateMathLCM & GCF
Find the least common multiple (LCM) and the greatest common factor (GCF/GCD) of two or more whole numbers.
Calculate