Factorial

Definitionnoun

What is a factorial in math?

The factorial of a whole number n, written n!, is the product of all the whole numbers from n down to 1. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. It counts the ways to arrange n different objects in a row. By agreement, 0! = 1.

In Spanish
factorial
Also called
n factorial, n!, factorial notation
Grade level
Precalculus
Algebra 2PrecalculusStatisticsCCSS HSS-CP.B.9SATACTASVAB

Factorial in a picture

Four factorial counts the ways to line up 4 booksFour slots show 4, 3, 2 and 1 choices, so 4 factorial is 24. A table lists factorials: 0! = 1, 1! = 1, 2! = 2, 3! = 6, 4! = 24, 5! = 120, 6! = 720 and 10! = 3,628,800.Line up 4 books on a shelf41st spotchoices×32nd spotchoices×23rd spotchoices×14th spotchoices4! = 4 × 3 × 2 × 1 = 24 ordersnn!0111223642451206720103,628,800← by agreement
Each spot has one fewer choice than the spot before, so the number of orders is 4 × 3 × 2 × 1 = 4!. The table shows how quickly factorials grow.

Formal definition and notation

For a positive integer n, n! = n(n − 1)(n − 2) ⋯ 2 · 1, and 0! = 1. Equivalently, factorials are defined recursively by 0! = 1 and n! = n · (n − 1)! for n ≥ 1. The number n! is the number of permutations (orderings) of n distinct objects. Factorials are not defined for negative integers.

Symbol Read it as Meaning
n! n factorial the product n × (n − 1) × ⋯ × 1
0! zero factorial equals 1
n!(n − r)! n factorial over n minus r factorial the number of ordered arrangements of r objects chosen from n

Key facts

  • Factorials grow very fast: 10! = 3,628,800, and 20! has 19 digits.
  • 0! = 1: there is exactly one way to arrange zero objects (do nothing), and it keeps n! = n × (n − 1)! working at n = 1.
  • Factorials power counting formulas: permutations n!(n − r)! and combinations n!r!(n − r)!.
  • n! is divisible by every whole number from 1 to n. For example, 6! = 720 is divisible by 4 and by 5.
  • The exclamation mark binds tightly: 2 × 3! means 2 × 6 = 12, not 6! = 720.

Where the name comes from. The exclamation-mark notation n! was introduced by Christian Kramp in 1808.

Factorial formula

Factorial formula
n! = n × (n − 1) × (n − 2) × ⋯ × 2 × 1
n
a whole number (0, 1, 2, 3, …)
n! = n × (n − 1)!
each factorial is the one before times the next number, so 6! = 6 × 120 = 720

To simplify a quotient of factorials, cancel the shared part instead of multiplying everything out: 9!7! = 9 × 8 = 72.

Factorial examples, step by step

Example 1: Evaluate a factorial

Warm-up

Find 6!.

  1. Write the product: 6! = 6 × 5 × 4 × 3 × 2 × 1.
  2. Multiply in pairs: 6 × 5 = 30 and 4 × 3 = 12, with 2 × 1 = 2.
  3. 30 × 12 = 360, and 360 × 2 = 720.

Answer: 6! = 720.

Example 2: Simplify a quotient of factorials

Core

Simplify 10!8! × 2!.

  1. Write 10! = 10 × 9 × 8!.
  2. Cancel 8!: 10 × 92!.
  3. 2! = 2, so 902 = 45.

Answer: 10!8! × 2! = 45.

Example 3: Arrangements with a condition

Test-style

Five friends line up for a photo. How many different orders are possible? How many if Maya must stand first?

  1. Any order: 5 choices for the first spot, then 4, 3, 2, 1. That is 5! = 120.
  2. If Maya is first, only the other 4 friends move.
  3. They can line up in 4! = 24 orders.

Answer: There are 120 orders in all, and 24 orders with Maya first.

Common mistakes

✗ Mistake0! = 0.
✓ Instead0! = 1.

There is exactly one way to arrange nothing. Also, 1! = 1 × 0! only works if 0! = 1.

✗ Mistake8!4! = 2!.
✓ Instead8!4! = 8 × 7 × 6 × 5 = 1680.

Factorials do not divide like plain numbers. Expand the larger one until the smaller factorial appears, then cancel.

✗ Mistake5! = 5 + 4 + 3 + 2 + 1 = 15.
✓ Instead5! = 5 × 4 × 3 × 2 × 1 = 120.

A factorial multiplies; it does not add. Adding 1 through 5 gives a triangular number, which is a different idea.

✗ Mistake2 × 3! = 6! = 720.
✓ Instead2 × 3! = 2 × 6 = 12.

The factorial applies only to the number right before the exclamation mark. Compute 3! first, then multiply by 2.

Not to be confused with

Factorialvs.Factor

A factor is a number that divides another (3 is a factor of 12). A factorial is a product of every whole number down to 1 (3! = 6).

Factorialvs.Permutation

A factorial n! counts orders of all n objects. A permutation count n!(n − r)! counts orders of only r of them, such as 5!3! = 20 ways to pick and order 2 of 5.

Factorialvs.Exponent

44 = 4 × 4 × 4 × 4 = 256 repeats the same factor. 4! = 4 × 3 × 2 × 1 = 24 counts down.

Quick check: 3 questions

Question 1 of 3

What is 5!?

Show answer and explanation

Answer: C. 5! = 5 × 4 × 3 × 2 × 1 = 120. 15 adds instead of multiplying, 25 is 52, and 3125 is 55.

Question 2 of 3

What is 12!10!?

Show answer and explanation

Answer: A. 12! = 12 × 11 × 10!, so the quotient is 12 × 11 = 132. 65 divides 12 by 10, and 2 or 2! subtracts the numbers.

Question 3 of 3

In how many orders can 7 runners finish a race if there are no ties?

Show answer and explanation

Answer: D. 7 choices for first place, 6 for second, and so on: 7! = 5040. 49 is 72, 28 is 7 + 6 + ⋯ + 1, and 7 counts only the winner.

Factorial: frequently asked questions

Why does 0! equal 1?

There are two good reasons. Counting: n! is the number of ways to arrange n objects, and there is exactly one way to arrange zero objects. Pattern: n! = n × (n − 1)!, so 1! = 1 × 0!. Since 1! = 1, 0! must be 1. This choice also makes formulas like n!(n − r)! work when r = n.

What is factorial used for?

Factorials count arrangements. They answer questions like how many ways 8 books can sit on a shelf (8! = 40,320) or how many seating orders a team has. They appear in permutation and combination formulas, in probability, in the binomial theorem, and in calculus series such as the one for e.

Can you take the factorial of a negative number or a fraction?

Not with the school definition. n! is defined only for whole numbers 0, 1, 2, 3 and so on, because it counts arrangements of whole objects. Advanced math extends the idea to fractions using the gamma function, but negative integers still have no factorial.

Practice and tools

Sources

  1. Common Core State Standards, High School Statistics and Probability (HSS-CP.B.9)
  2. OpenStax, College Algebra, 9.5 Counting Principles
  3. Weisstein, Eric W. "Factorial." MathWorld, Wolfram Research (Kramp notation, 1808)

Updated November 2026·Reviewed by the Effortless Math team·Standards: CCSS HSS-CP.B.9

Cite this entry

Effortless Math Team. “Factorial.” Effortless Math Dictionary. Updated November 2026. https://www.effortlessmath.com/math-dictionary/factorial/

Flashcard

TermFactorialn!
DefinitionThe product of all whole numbers from n down to 1. 4! = 4 × 3 × 2 × 1 = 24, and 0! = 1.
Study the full deck

Browse all terms in the Math Dictionary · More probability terms · Random term