Answer first
What this calculator tells you
Calculate n factorial for a whole number up to 170 and count its trailing zeros. Use it to size a permutation count before you commit to listing the arrangements. Formula: n! = n × (n−1) × … × 2 × 1; trailing zeros = ⌊n÷5⌋ + ⌊n÷25⌋ + ⌊n÷125⌋ + …. At the worked-example inputs, the n factorial is 3,628,800. Holding every other input steady, moving whole number n from 8 to 12 moves the result from 40,320 to 479,001,600.
Transparent method
The formula
Use it to size a permutation count before you commit to listing the arrangements.
Worked example
Example inputs
How to interpret the result
Factorials outrun intuition fast. Ten factorial is 3,628,800. Twenty is past two quintillion. The number counts the ways to order a set of items, so it tells you when listing every arrangement stops being an option and a formula or a sample is the only route. The trailing-zero count is a quick way to see how many times the product picks up a factor of ten.
At the worked-example inputs the n factorial is 3,628,800. It rises with whole number n.
These are exact arithmetic operations; results are limited only by floating-point precision.
Before you rely on it
What to check
Confirm the item count is whole and small enough. Above 170 the true answer exceeds what a computer number can hold, so the page stops there.
The common error
Where people go wrong with factorial calculator
Using n factorial when order does not matter. Choosing three people from ten as a group is a combination, which divides the factorial down; ten factorial itself counts every seating order.
Sensitivity evidence
How whole number n changes the n factorial
Holding every other input at the worked-example value, moving whole number n from 8 to 12 moves the n factorial from 40,320 to 479,001,600: a spread of 478,961,280, or 13199% of the worked-example result.
| Whole number n | n factorial | Trailing zeros |
|---|---|---|
| 8 | 40,320 | 1 |
| 9 | 362,880 | 1 |
| 10worked example | 3,628,800 | 2 |
| 11 | 39,916,800 | 2 |
| 12 | 479,001,600 | 2 |
Step by step
The worked example, input by input
| Input | Value used | What it means |
|---|---|---|
| Whole number n | 10 | A whole number from 0 to 170. Beyond 170 the answer no longer fits in a computer's number format. |
| n factorial | 3,628,800 | |
| Trailing zeros | 2 | |
Inputs, definitions and assumptions
Whole number n
A whole number from 0 to 170. Beyond 170 the answer no longer fits in a computer's number format. The prefilled worked-example value is 10.
How to use this calculator
- 1Verify the inputs. Gather whole number n from your own documents; the prefilled values are examples.
- 2Save a baseline. The worked example puts the n factorial at 3,628,800. Store your own version of it as Scenario A.
- 3Test one change. Start with whole number n, the input with the biggest effect here: moving whole number n from 9 to 11 takes the n factorial from 362,880 to 39,916,800, a swing of 1090% of the worked-example figure.
- 4Check the extremes. At half the example whole number n (5) the n factorial is 120; at double (20) it is 2,432,902,008,176,640,000.
People also ask
Frequently asked questions
How do you calculate factorial?
n! = n × (n−1) × … × 2 × 1; trailing zeros = ⌊n÷5⌋ + ⌊n÷25⌋ + ⌊n÷125⌋ + …. At the worked-example inputs the n factorial is 3,628,800.
What does the factorial result mean?
Use it to size a permutation count before you commit to listing the arrangements. At the worked-example inputs the n factorial is 3,628,800. It rises with whole number n.
How much does whole number n change the n factorial?
Holding every other input at the worked-example value, moving whole number n from 8 to 12 moves the n factorial from 40,320 to 479,001,600, a spread of 478,961,280.
What are the limits of this factorial calculator?
These are exact arithmetic operations; results are limited only by floating-point precision. The tables on this page test whole number n only from 8 to 12; a value outside that range is not tabulated here.
If I double whole number n in the factorial calculator, does the n factorial double?
Doubling it from 10 to 20 takes the n factorial from 3,628,800 to 2,432,902,008,176,640,000, which is 670442572800.00 times the worked-example figure. So the result grows faster than the input does. Halving it to 5 gives 120.
Which inputs change the trailing zeros in the factorial calculator?
At the worked-example inputs it is 2. Whole number n takes it from 1 to 2.
Why does every whole number have a unique prime factorization?
This is the Fundamental Theorem of Arithmetic: any integer greater than 1 breaks down into prime factors in exactly one way (ignoring order). It's why prime numbers are called the 'building blocks' of the integers: there is only ever one valid blueprint.
What is special about the Fibonacci sequence?
Each term is the sum of the two before it, and the ratio of neighboring terms approaches the golden ratio, about 1.618. The sequence shows up in counting problems and in some natural growth patterns.
How can I check whether a number is prime by hand?
Divide it by every prime up to its square root. If none divides evenly, it is prime. For 97 you only need to test 2, 3, 5 and 7, since 11 squared is already 121.
Sources and evidence
Free Calculators Online is independent and is not affiliated with or endorsed by the source organizations. Educational estimates only.