Statistics & Probability
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 counts how many different ordered arrangements are possible by multiplying the number of choices at each step. For example, when arranging n distinct objects, you have n choices for the first position, then n-1 for the next, and so on down to 1. By convention, 0! is defined as 1 so that counting formulas work consistently even when there are no objects to arrange.

When to use it

Use factorials when counting permutations, arranging items in order, or calculating combinations in probability and statistics. They also appear in many formulas for counting possibilities, especially when order matters.

Worked example, step by step

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

Common mistakes to avoid

  • Stopping early and forgetting to multiply by 1
  • Using factorial on a negative number or a non-integer in basic counting problems
  • Confusing factorials with powers, such as thinking 4! means 4^4

Did You Know?

Factorials grow astonishingly fast — just 70! already exceeds a googol (10¹⁰⁰).

Share this formula

Reviewed & maintained by the FormulaWon editorial teamLast reviewed September 2026