Example
Expand and multiply a factorial. A factorial multiplies together every whole number from the given value down to one, and it counts the number of ways to arrange that many distinct items in order. Writing the product out in full before multiplying makes the pattern clear and shows how quickly factorial values grow as the input increases.
highlighted = computed this step
Step 1 — Set up
Start with the factorial.
Step 2 — Expand
Expand the factorial into factors.
5!=5⋅4⋅3⋅2⋅1
Step 3 — Multiply
Multiply the first factors.
5⋅4⋅3=60
Step 4 — Result
State the factorial value.
5!=120
factorial
n! = n × (n-1) × (n-2) × ⋯ × 2 × 1 Special case: 0! = 1