Definitions
n! = n × (n − 1) × … × 2 × 1, and 0! = 1 because it is an empty product. In terms of the gamma function, n! = Γ(n + 1).
A multifactorial counts down in steps of k: n!(k) = n × (n − k) × (n − 2k) × …, stopping at the last positive term. The double factorial n!! uses k = 2, so 7!! = 7 × 5 × 3 × 1 = 105 and 8!! = 8 × 6 × 4 × 2 = 384. It is not the same as (n!)!.
Worked example
20! = 20 × 19 × … × 1 = 2,432,902,008,176,640,000. That is 19 digits with 4 trailing zeros, or about 2.432902008 × 10¹⁸.
100! has 158 digits. By Legendre's formula it has ⌊100/5⌋ + ⌊100/25⌋ = 24 trailing zeros, because each zero needs a factor of 5 paired with a factor of 2.
Exact arithmetic and limits
Every digit is computed with exact integer arithmetic; nothing is rounded. When the result is too long for the headline, the headline shows scientific notation and the table below lists every digit, with a CSV download. The limit of n = 5,000 (a 16,326-digit answer) keeps the page fast.