Compute n! for any n from 0 to 500 using exact BigInt arithmetic. Shows digit count, trailing zeros, Stirling approximation, and a P(n,r)/C(n,r) helper.
Factorials grow deceptively fast. 10! = 3,628,800, a number that fits comfortably on screen. 100! has 158 digits. 500! has 1,135. This calculator uses JavaScript BigInt so every digit of every result is exact: no floating-point rounding, no scientific-notation approximations cutting the answer short after 17 significant figures.
Beyond the raw value, the results panel shows how many digits the factorial produces, how many trailing zeros it carries, and (for n ≥ 3) a Stirling approximation so you can compare the exact answer against the asymptotic formula without switching tabs. A built-in permutation and combination helper reuses the same n, so you can answer “how many ways can I arrange 10 cards and choose 3 of them?” in the same tool.
Press Load Sample and n becomes 10. The result is 3628800, produced by the chain 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1. The facts panel confirms 7 digits and 2 trailing zeros (from the factor pairs 5×2 and 10×1). The Stirling panel shows 3.5988 × 10^6, which is within 0.83% of the true value.
With r set to 3, the permutation box shows P(10, 3) = 720 (the number of ordered arrangements of 3 items from 10) and the combination box shows C(10, 3) = 120, the number of unordered selections. Both are exact BigInt results, not estimates.
A trailing zero in n! comes from a factor of 10 = 2 × 5 in the multiplication. Powers of 2 always outnumber powers of 5 in n!, so the count of trailing zeros equals the total number of times 5 divides into the integers 1 through n. This is Legendre’s formula:
trailing zeros = ⌊n/5⌋ + ⌊n/25⌋ + ⌊n/125⌋ + …
For n = 100: 20 + 4 + 0 = 24 trailing zeros. The formula runs in O(log n) time, so the result for n = 500 (124 zeros) appears instantly without factoring the full 1,135-digit number.
Display
10! =
3628800
Expression
10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1
Digits
7
Trailing Zeros
2
Stirling Approx
3.5987 × 10^6
Permutations & Combinations
Uses the same n above. Set r to choose how many you're selecting.
P(10, 3) — Permutations
n! / (n − r)! — ordered arrangements
720
C(10, 3) — Combinations
n! / (r! × (n − r)!) — unordered selections
120