Probability & Combinatorics
Basic

Factorial

Product of all positive integers up to n.

Formula

n!=n×(n−1)×⋯×2×1n! = n \times (n-1) \times \cdots \times 2 \times 1

Variables

nNon-negative integer

Example

5! = 120

How it works

A factorial is the product you get by multiplying a whole number by every smaller positive whole number down to 1. It grows very quickly, so even modest values can become large; for example, 6! includes the chain 6 × 5 × 4 × 3 × 2 × 1. In counting problems, factorials naturally appear when every arrangement or ordering of distinct items must be counted, because each new choice multiplies the number of possibilities.

When to use it

Use factorials when counting arrangements, permutations, or ways to order distinct objects. They also appear in probability, algebra, and formulas for combinations and series, especially when counting all possible sequences or selections.

Worked example, step by step

Find 4! 4! = 4 × 3 × 2 × 1 4! = 12 × 2 × 1 4! = 24

Common mistakes to avoid

  • Forgetting to multiply all the way down to 1
  • Writing n! for negative numbers or non-integers
  • Confusing factorial with exponentiation, such as thinking 4! means 4^4

Did You Know?

By convention 0! = 1, which makes many formulae consistent.

Share this formula

Reviewed & maintained by the FormulaWon editorial teamLast reviewed September 2026