What is a factorial?
A factorial is the product of all positive whole numbers from 1 up to a given number. It is written with an exclamation mark. For example, 5 factorial, written 5!, equals 5 × 4 × 3 × 2 × 1 = 120.
Examples
1! = 1, 2! = 2, 3! = 6, 4! = 24 and 6! = 720.
By definition, 0! = 1. This makes many formulas work neatly.
Fast growth
Factorials grow extremely fast. 10! is 3,628,800, and 20! is more than 2 quintillion.
52!, the number of ways to arrange a deck of playing cards, is a number with 68 digits. A well-shuffled deck is almost certainly in an order that has never existed before.
What factorials count
The factorial of a number tells you how many different ways you can arrange that many items in order. For example, three books can be arranged on a shelf in 3! = 6 ways.
Factorials are used in probability, statistics and combinations, such as counting lottery outcomes or possible teams.
History
The exclamation mark notation was introduced by the French mathematician Christian Kramp in 1808.
Mathematicians in ancient India studied ways of arranging objects long before the modern notation.
Beyond whole numbers
A function called the gamma function extends the idea of factorials to fractions and other numbers.
Calculators often have an n! or x! button.