This factorial calculator computes n! — the product of all whole numbers from 1 to n — with exact results even for large n, and shows the multiplication written out. Enter any non-negative integer.
What Is a Factorial?
The factorial of a whole number n, written n!, is the product of every positive integer up to n: n! = n × (n−1) × (n−2) × … × 1. Factorials count arrangements — n! is exactly how many ways n distinct items can be ordered — which is why they sit underneath permutations and combinations in probability. This calculator is part of our Math Calculators collection and uses exact big-number arithmetic, so results stay correct up to 1000! (a 2,568-digit number).
Factorial Examples (Verified)
- 0! = 1 — by definition (the empty product); this makes the combination formulas work.
- 5! = 120 — 5 × 4 × 3 × 2 × 1; also the number of ways to arrange 5 books.
- 10! = 3,628,800
- 20! = 2,432,902,008,176,640,000 — already beyond the exact range of ordinary calculators, which is why this one computes with big integers.
Where Factorials Are Used
- Combinations and permutations: C(n, r) = n! ÷ (r!(n−r)!) — computed for you by the Combination Calculator.
- Probability: equally likely arrangements — shuffling a 52-card deck has 52! ≈ 8 × 1067 orders, which is why no two shuffles in history have likely ever matched.
- Series in calculus: ex, sine and cosine are built from terms xn/n!.
- Trailing zeros puzzle: the number of zeros at the end of n! equals how many times 5 divides into the factors — 100! ends in 24 zeros.
Related Tools
- Combination Calculator — nCr and nPr built on factorials
- Probability Calculator — event probabilities
- Scientific Notation Calculator — for the astronomically large results
Frequently Asked Questions
Why is 0! equal to 1?
By the pattern (n−1)! = n!/n, so 0! = 1!/1 = 1. It also matches counting: there is exactly one way to arrange zero items.
What is the largest factorial this calculator handles?
1000!, computed exactly — ordinary calculators overflow near 171! because they use floating-point numbers.
How many digits does 100! have?
158 digits. The calculator reports the digit count with every result.
Do factorials exist for negative numbers or decimals?
Not in the basic definition. The gamma function extends the idea to decimals (e.g., (1/2)! = √π/2 ≈ 0.886), but everyday factorial work uses whole numbers ≥ 0.
How do I calculate a factorial in Excel?
=FACT(n). Excel loses exactness beyond about 20!; this calculator does not.
Is this factorial calculator free?
Yes — free, instant, no sign-up.