Factorial Calculator
Enter n to get n factorial in full. Add r to see how many ordered and unordered ways there are to pick r items from n.
Use the tool
Loading the tool…
About Factorial Calculator
Work out the factorial of a whole number n, from 0 to 1000, which is the product of all whole numbers up to n. Optionally, enter r to calculate permutations and combinations.
Worked example
Enter 5. The tool shows 120, which is 5 x 4 x 3 x 2 x 1.
Limits
Factorials grow very quickly, so results for large numbers are very long. The tool shows the result as it can, and it may not show every digit.
How to use Factorial Calculator
- Type n, a whole number from 0 to 1000.
- Add r if you also want permutations and combinations.
- Read the value, digit count and trailing zeros, or copy the full number.
Good to know
- n factorial is 1 x 2 x 3 x ... x n, and 0 factorial is 1.
- All the digits are exact, which is why results with hundreds of digits are shown in full.
- Permutations P(n, r) count ordered picks, and combinations C(n, r) count unordered picks.
- The limit of 1000 keeps the page fast. 1000 factorial has 2,568 digits.
Frequently asked questions
How many trailing zeros does n factorial have?
It is shown for you. Each zero comes from a factor of 10, which is a pair of 2 and 5 in the product.
What is the difference between a permutation and a combination?
In a permutation the order matters, so picking A then B differs from B then A. In a combination it does not.
Is anything I type saved or sent?
No. The work happens in your browser on this page, and nothing is stored or sent to us.