Factorial Calculator
Calculate factorials.
About this tool
Enter a whole number n to get n!, the product 1 × 2 × … × n. 10! is 3,628,800, and big values such as 100! come with their digit count and trailing zeros.
How to use
How it works
n! counts the ways to arrange n distinct items. By definition 0! = 1. Factorials grow very fast: 20! already has 19 digits and 100! has 158. Trailing zeros come from factors of 10, so there are ⌊n/5⌋ + ⌊n/25⌋ + … of them.
n! = n × (n − 1) × … × 2 × 1 0! = 1 zeros = ⌊n/5⌋ + ⌊n/25⌋ + ⌊n/125⌋ + …
Worked example
100 factorial
- Input
- n = 100
- Output
- 9.332621 × 10^157 (158 digits, 24 trailing zeros)
- Walkthrough
- Trailing zeros: ⌊100/5⌋ + ⌊100/25⌋ = 20 + 4 = 24.
Limitations
- n must be a whole number of 0 or more, up to 5,000. Larger values are refused.
- Very large results are shown in scientific notation alongside the digit count.
Questions
What is 5 factorial?
What is 20 factorial?
What is 0 factorial?
How many digits does 1000! have?
Features
- Digit count and trailing zeros
- Up to 5,000!
- Runs in your browser
Related resources
Guides and videos from around the web—opens on YouTube or the publisher’s site.
The essence of calculus
3Blue1Brown
Visual calculus story that complements symbolic solvers.
Watch on YouTubeFinding mean, median, and mode
Khan Academy
Stats buttons on scientific calculators need this framing.
Watch on YouTube
- Scientific Notation
Math is Fun
Powers of ten for scientific calculator displays.
- Data Index
Math is Fun
Stats and probability explainers for data tools.