Factorial Calculator

Calculate n factorial along with permutations and combinations, and see where the result exceeds floating-point precision.

n! 3,628,800
n! = n × (n − 1) × … × 2 × 1; nPr = n! ÷ (n − r)!; nCr = n! ÷ (r! × (n − r)!)
Permutations nPr 720
Combinations nCr 120
Digits in n! 7
Precision note Exact

Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.

What the Factorial Calculator does

The factorial calculator on this page will calculate n factorial along with permutations and combinations, and see where the result exceeds floating-point precision. Fill in all 2 fields and the result updates as you type — there is no Calculate button to press and no page reload. It is most often used for counting arrangements and selections in probability problems. Companion tools to this one live on FreeToolsWorld.org.

How to use it

  1. Enter n for the factorial.
  2. Enter r as well if you want permutations or combinations.
  3. The digit count shows how large n! is even when the exact value cannot be displayed.
  4. Check the precision note for large values.

When to use it

  • Counting arrangements and selections in probability problems.
  • Working out lottery or card-hand combinations.
  • Checking an answer in a combinatorics exercise.

Common mistakes to avoid

  • Using permutations when order does not matter — a lottery draw is a combination, not a permutation.
  • Expecting exact digits from very large factorials, which exceed what a double can represent.

Frequently asked questions

What is 0!?

One, by definition. It makes the combination formula work for the empty selection and is consistent with the gamma function that generalises factorials.

What is the difference between nPr and nCr?

Order. nPr counts arrangements where ABC and CBA are different; nCr counts selections where they are the same. nPr is always the larger of the two.

Why does it stop at 170?

171! exceeds the maximum value a double-precision float can hold, so the result becomes infinity. Exact arithmetic beyond that needs arbitrary-precision numbers.

Related tools

See all math & statistics calculators →