Factorial
Calculate the factorial n! and double factorial n!! exactly, with all digits, up to n = 1000. Number of digits, trailing zeros, Stirling formula.
The factorial calculator computes n! and the double factorial n!! exactly — all digits, without rounding, for n up to 1000. It also shows the number of digits, the trailing zeros and Stirling's approximation.
What is a factorial
n! = 1 · 2 · 3 · … · n, 0! = 1
| n | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 |
|---|---|---|---|---|---|---|---|---|---|---|
| n! | 1 | 1 | 2 | 6 | 24 | 120 | 720 | 5040 | 40320 | 3628800 |
The factorial grows very fast: 20! ≈ 2.4 · 1018, and 100! has 158 digits.
Useful properties
- n! = n · (n − 1)! — handy for simplifying: 10!/8! = 10 · 9 = 90.
- Trailing zeros of n! (Legendre's formula): [n/5] + [n/25] + [n/125] + … For 100!: 20 + 4 = 24 zeros.
- Stirling's formula: n! ≈ √(2πn) · (n/e)n.
- Double factorial: n!! = n · (n − 2) · (n − 4) · …, for example 9!! = 9 · 7 · 5 · 3 · 1 = 945.
The factorial is the basis of combinatorics: n! is the number of permutations of n objects, and arrangements and combinations are expressed through factorials.
Linked Calculators
Comments
No comments yet.