FACT computes a factorial — n! = n × (n−1) × … × 1 — the building block of permutations, combinations, and probability. FACT(5) = 120.
The example
5! = 120.
| A | B | |
|---|---|---|
| 1 | n | n! |
| 2 | 5 | 120 |
| 3 | 10 | 3,628,800 |
The formula
The formula:
How it works
How it works:
FACT(n)multiplies every whole number from 1 to n.- It grows extremely fast — 10! is over 3.6 million, 20! exceeds 2 quintillion.
- Combine for arrangements: permutations
=FACT(n)/FACT(n-k), combinations=FACT(n)/(FACT(k)*FACT(n-k)). - Excel also has
PERMUTandCOMBINthat do these directly.
Use COMBIN/PERMUT for counting: they’re cleaner and avoid overflow on large n. FACT is best for the raw factorial or when you need the full expression. For huge n, factorials exceed Excel’s number limit and error.
Try it: interactive demo
Enter n.
Variations
Combinations
Choose k of n:
Permutations
Ordered:
By formula
From FACT:
Pitfalls & errors
Overflow. Factorials above ~170 exceed Excel’s maximum and error.
Whole numbers only. FACT truncates decimals; negative inputs error.
Prefer COMBIN/PERMUT. They avoid intermediate overflow for counting problems.
Practice workbook
Frequently asked questions
How do I calculate a factorial in Excel?
How do I compute combinations and permutations?
Why does FACT return an error?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class