n = A non-negative integer whose factorial you want to compute
n! = The factorial of n, equal to the product of all positive integers from 1 to n
Worked Example
Problem: Compute 7! (7 factorial).
Step 1: Write out the definition: multiply 7 by every positive integer less than 7, down to 1.
7!=7⋅6⋅5⋅4⋅3⋅2⋅1
Step 2: Multiply the first two factors.
7⋅6=42
Step 3: Continue multiplying from left to right.
42⋅5=210
Step 4: Keep going with the remaining factors.
210⋅4=840,840⋅3=2520,2520⋅2=5040,5040⋅1=5040
Answer: 7! = 5,040
Another Example
This example shows how to simplify a ratio of factorials by cancellation — a technique used constantly in permutations, combinations, and probability, where computing full factorials would be impractical.
Problem: Simplify the expression 10! ÷ 8! without computing each factorial fully.
Step 1: Expand 10! using the recursive property: 10! = 10 × 9 × 8!
8!10!=8!10⋅9⋅8!
Step 2: Cancel the common factor of 8! in the numerator and denominator.
8!10⋅9⋅8!=10⋅9
Step 3: Multiply the remaining factors.
10⋅9=90
Answer: 10! ÷ 8! = 90
Frequently Asked Questions
Why does 0! equal 1?
The value 0! = 1 is defined so that formulas in combinatorics work consistently. For instance, the number of ways to arrange 0 objects is exactly 1 (do nothing). It also keeps the recursive relationship n! = n × (n − 1)! valid when n = 1, because 1! = 1 × 0! requires 0! to be 1.
Can you take the factorial of a negative number or a fraction?
The standard factorial function is defined only for non-negative integers (0, 1, 2, 3, …). However, mathematicians extend the idea to non-integers and some negative values using the gamma function, where Γ(n + 1) = n! for non-negative integers. You will not encounter this extension in most algebra or precalculus courses.
How are factorials used in permutations and combinations?
Permutations count ordered arrangements and use the formula P(n, r) = n! / (n − r)!. Combinations count unordered selections and use C(n, r) = n! / [r!(n − r)!]. Factorials appear in both formulas because they systematically count how many ways you can arrange or choose items from a set.
Permutations vs. Combinations
Permutations
Combinations
What it counts
Ordered arrangements of r items from n
Unordered selections of r items from n
Formula using factorials
P(n, r) = n! / (n − r)!
C(n, r) = n! / [r!(n − r)!]
Does order matter?
Yes
No
Result size
Always ≥ the corresponding combination
Always ≤ the corresponding permutation
Why It Matters
Factorials are essential in counting problems throughout algebra, probability, and statistics. You will use them every time you calculate permutations, combinations, or binomial coefficients — from choosing a committee to expanding (a+b)n with the binomial theorem. They also appear in calculus (Taylor series) and are foundational in computer science algorithms.
Common Mistakes
Mistake: Confusing n! with n × 2, or thinking 0! = 0.
Correction: Remember that n! means multiply n by every positive integer below it, not just by 2. And 0! is defined as 1, not 0. A quick sanity check: 1! = 1, and 0! must also equal 1 for the recursive formula n! = n × (n − 1)! to hold at n = 1.
Mistake: Computing each full factorial separately when simplifying a ratio like n! / (n − r)!.
Correction: Cancel the common factorial instead. For example, 10! / 8! is not best solved by computing 3,628,800 ÷ 40,320. Write 10! as 10 × 9 × 8! and cancel 8! to get 90 directly. This avoids huge numbers and arithmetic errors.
Related Terms
Product — A factorial is a specific product of integers
Integers — Factorials are defined for non-negative integers
Positive Number — The factors in n! are all positive integers