In more detail
5! = 5 × 4 × 3 × 2 × 1 = 120. The recursive form n! = n × (n − 1)! explains why 0! = 1: it is what makes 1! = 1 × 0! work. n! counts the orders of n distinct items, so six books fit on a shelf in 6! = 720 ways. The gamma function extends factorials beyond whole numbers (Γ(n + 1) = n!, giving 0.5! = √π / 2 ≈ 0.8862), and Stirling's approximation n! ≈ √(2πn) × (n/e)ⁿ gives 3,598,696 for 10!, 0.83% below the true 3,628,800.
Why it matters
Factorials sit inside every Permutation and Combination formula, and they grow faster than any exponential. 20! = 2,432,902,008,176,640,000 is the largest factorial that fits in a signed 64-bit integer (maximum 9,223,372,036,854,775,807); 21! overflows. Cancel before multiplying: 10! / 7! is just 10 × 9 × 8 = 720.
Example
A shuffled 52-card deck can be in 52! orders:
>>> import math
>>> math.factorial(52)
80658175170943878571660636856403766975289505440883277824000000000000
That is about 8.07 × 10⁶⁷, a 68-digit number, so a well-shuffled deck is almost certainly in an order no deck has ever been in before.