Factorial
Product of all positive integers up to n.
Formula
Variables
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
More in Statistics & Probability
View allArithmetic Mean
BasicThe average of a data set.
Median
BasicThe middle value separating the higher and lower halves.
Variance
IntermediateAverage squared deviation from the mean.
Standard Deviation
IntermediateSquare root of the variance; typical spread.
Z-Score
IntermediateNumber of standard deviations a value is from the mean.
Bayes' Theorem
IntermediateUpdates a probability given new evidence.