Factorial calculator
Multiply every whole number from one up to n.
anındahesapla Editör Ekibi · Updated:
5 factorial = 120. The calculator multiplies every whole number from one to five: one times two times three times four times five.
Students working on probability, teachers writing exercises, programmers practising loops and anyone counting arrangements use this operation. The result grows so fast that multiplying by hand soon becomes impractical, even for numbers in the low twenties.
Result
120
5! = 120
Result in all units
Step-by-step solution
n! = n × (n−1) × … × 1
What a factorial is
The factorial of a positive whole number is the product of all whole numbers from one up to it.
In maths it is written with a mark after the number and read aloud as the number followed by the word factorial.
Zero factorial is defined as one.
That convention is not arbitrary: there is exactly one way to arrange an empty set, and the permutation and combination formulas only stay consistent at their edges when zero factorial equals one.
A factorial counts the orderings of n distinct items. Five books can stand on a shelf in 120 different orders.
Permutations and combinations are built on factorials.
Growth is explosive. Ten factorial is above three million. Twenty factorial has nineteen digits.
That growth pushes computers to their number limits. Large factorials need special data types or approximation formulas.
Negative whole numbers have no factorial.
For fractions and decimals, the gamma function extends the idea. That belongs to university maths.
Programming courses use the factorial as a first example of loops and recursion.
Each step multiplies the previous result by the next number, so the working can be checked line by line.
A shuffled deck of cards is a famous example: the number of possible orders is so large that a well-shuffled deck is in all likelihood in an order never seen before.
Exam questions on factorials usually reward simplifying before multiplying. When one factorial is divided by another, most of the factors cancel and only a short product is left, which can be worked out by hand in seconds.
The same cancelling is what makes permutation and combination counts manageable without a calculator.
How to calculate it
Formula: n factorial = n × (n − 1) × … × 1.
- Enter a positive whole number.
- Read the factorial.
- Check the multiplication steps.
| Input or result | Value |
|---|---|
| Number (n) | 5 |
| Product | 1 × 2 × 3 × 4 × 5 |
| Result | 120 |
Each step builds on the one before.
For large inputs, note the answer in scientific notation, because past twenty the digit count climbs fast and copying a long number by hand makes it easy to drop or add a digit without noticing.
Try a few small values by hand first. Seeing the pattern makes larger results easier to trust.