Factorial Calculator
Calculate n factorial, double factorial, subfactorial, trailing zeros, and digit count with large number support.
Enter a non-negative integer (0 to 10,000).
Enter a number to calculate.
—
Double Factorial (0!!)
0
Subfactorial (!0)
0
Trailing Zeros
0
Digit Count
0
| n | n! | Digits |
|---|
Formulae
n! = 1 × 2 × 3 × ... × n (0! = 1)
n!! = product of every second integer down from n
!n = (n−1)(·!(n−1) + !(n−2)), !0 = 1, !1 = 0
Trailing zeros = Σ floor(n / 5^k) for k = 1, 2, 3, ...
How to use
- 1
Enter a number
Type a non-negative integer.
- 2
View the results
See n!, double factorial, subfactorial, trailing zeros, and digit count instantly.
- 3
Explore the table
Toggle table mode to see factorials for a range of values.
Frequently asked questions
What is the largest factorial I can compute?
What is a subfactorial?
How are trailing zeros counted?
Is my data sent anywhere?
Compute factorials and related functions. Enter a non-negative integer
to calculate n!, double factorial (n!!), subfactorial (!n, derangements),
trailing zero count, and digit count. Supports large values using BigInt.
Table mode shows n! for a range of values. All processing runs in your
browser.