Factorial Calculator
The factorial of a whole number n, written n!, is the product of all whole numbers from n down to 1, so 5! = 120. Factorials grow extremely fast and count the ways to arrange things. This calculator gives exact values using whole-number arithmetic, counts the digits, and explains the trailing zeros.
How to use the factorial calculator
- Enter a whole number n from 0 to 3000.
- Press Calculate.
- Read n!, its number of digits and its trailing zeros.
Formula
Worked example: 5!
- n: 5
✓ Answer checked
- Number of digits
- 3
- Trailing zeros
- 1
Step-by-step working (2 steps)
Multiply down to 1 Factorial
n! means n × (n − 1) × … × 2 × 1. By definition 0! = 1.
Trailing zeros Legendre's formula
Each factor of 10 needs a 2 and a 5; there are fewer 5s, so count them.
Formulas used
How this was checked
- ✓ The exact value ends in 1 zeros, matching the count of factors of 5.
Frequently asked questions
What is 0 factorial?
0! = 1. There is exactly one way to arrange nothing, and this makes formulas for combinations work.
How many zeros are at the end of 100!?
24, because 100! contains 24 factors of 5 (and plenty of 2s), and each 2 × 5 makes a 10.
What are factorials used for?
Counting arrangements and combinations, probability, and series such as eˣ = Σ xⁿ/n!.
Related calculators
Permutation & Combination Calculator
Calculate permutations (nPr) and combinations (nCr) exactly, even for large numbers, plus the counts with repetition.
Binomial Distribution Calculator
Calculate binomial probabilities for exactly, at most or at least k successes in n trials.
Taylor Series Calculator
Find the Taylor or Maclaurin polynomial of a function up to order 8, with exact coefficients and a graph of the approximation hugging the curve.
