Learn more
Find the exact factorial of any whole number from 0 to 1000 — every digit, not a rounded estimate — plus its length, trailing zeros and scientific notation. Switch to double factorial for n!!.
What is a factorial?
The factorial of a whole number n, written n!, is the product of every whole number from n down to 1. So 4! = 4 × 3 × 2 × 1 = 24. Factorials count arrangements: if you have n different objects, there are n! ways to put them in a row. Four people can stand in line in 24 different orders, and a deck of 52 cards can be shuffled into 52! orders — a 68-digit number.
Why is 0! equal to 1? There is exactly one way to arrange zero objects (do nothing), and defining 0! = 1 makes formulas such as n! = n × (n − 1)! and the combinations formula work for every case.
How to use the factorial calculator
Enter a whole number from 0 to 1000 and choose n! or Double n!!. The calculator shows the exact result, its number of digits, the value in scientific notation and the number of trailing zeros. When the answer is too long to read comfortably, the headline shows scientific notation and the full number sits in an expandable, scrollable box below the results. A table lists the factorials just below your number, and the steps show the multiplication, the trailing-zero count and a check against Stirling's approximation.
Every value is calculated with exact big-integer arithmetic, so 25!, 100! and 1000! are correct to the last digit.
Worked example
With the default input of 10:
10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 3,628,800.
It has 7 digits and 2 trailing zeros. The zeros come from the factors 10 = 2 × 5 and 5 × 2 (or 5 × 4), because every trailing zero needs one 2 and one 5. Since 2s are plentiful, you only need to count 5s: ⌊10/5⌋ = 2. For 100!, the count is ⌊100/5⌋ + ⌊100/25⌋ = 20 + 4 = 24 trailing zeros, and the full number has 158 digits, starting 9.332621544 × 10¹⁵⁷.
Double factorial
The double factorial n!! multiplies every other number, keeping the same parity as n:
Double factorials appear in physics and statistics, for example in moments of the normal distribution and in some integrals. Note that n!! is not (n!)! — that would be astronomically larger.
How big do factorials get?
| n | n! | Digits |
|---|---|---|
| 5 | 120 | 3 |
| 10 | 3,628,800 | 7 |
| 13 | 6,227,020,800 | 10 |
| 20 | 2,432,902,008,176,640,000 | 19 |
| 52 | ≈ 8.065817517 × 10⁶⁷ | 68 |
| 100 | ≈ 9.332621544 × 10¹⁵⁷ | 158 |
| 170 | ≈ 7.257415615 × 10³⁰⁶ | 307 |
| 1000 | ≈ 4.023872601 × 10²⁵⁶⁷ | 2,568 |
Two limits matter in computing. 20! is the largest factorial that fits in a signed 64-bit integer, which is why many programming exercises stop there. 170! is the largest that fits in a standard double-precision floating-point number; 171! overflows, which is why spreadsheets and pocket calculators return an error beyond it. This page avoids both limits.
Where factorials are used
- Permutations and combinations: choosing and ordering items, such as lottery odds or seating plans. The permutation and combination calculator builds on n!.
- Probability: the binomial and Poisson distributions use factorials — see the probability calculator.
- Series in calculus: e = 1/0! + 1/1! + 1/2! + … and the Taylor series for sine and cosine.
Common mistakes
- Thinking 0! = 0. It is 1.
- Entering decimals or negatives. Ordinary factorials are defined only for whole numbers 0 and above; the gamma function extends the idea to other numbers.
- Cancelling too late. For ratios like 100!/98!, cancel first: it is simply 100 × 99 = 9,900.
Sources: definitions follow the NIST Digital Library of Mathematical Functions (§5.4 for factorials and §5.11 for Stirling's formula); trailing-zero counting uses Legendre's formula, standard in number theory texts.
Cite or link to this page
Using this factorial calculator in an article, report or homework? Copy a citation or a ready-made link:
Calcivia. (2026). Factorial Calculator. Retrieved November 11, 2026, from https://www.calcivia.com/factorial-calculator/"Factorial Calculator." Calcivia, 2026, https://www.calcivia.com/factorial-calculator/. Accessed 11 Nov. 2026.<a href="https://www.calcivia.com/factorial-calculator/">Factorial Calculator</a> by Calcivia