What Is a Factorial? How to Calculate n! With Examples
A factorial multiplies every whole number up to n. This guide explains the idea, the zero-factorial convention and where factorials are used.
What is the Factorial Calculator?
Enter a whole number n and the tool multiplies every whole number from 1 up to n together. Factorials count arrangements: for example, 5 objects can be ordered in 5 factorial, or 120, different ways. The tool refuses numbers above 170, because beyond that the result exceeds what ordinary numbers in a browser can hold.
How to use it
- Enter a whole number.
- Use zero if you like: zero factorial is 1 by convention.
- Calculate to see the factorial.
Worked example
5! = 5 x 4 x 3 x 2 x 1 = 120.
What is 5 factorial?
Multiply 5 by 4 by 3 by 2 by 1, which gives 120. So there are 120 different ways to arrange five objects in a row, which is why factorials matter in counting and probability.
Frequently asked questions
Why is zero factorial equal to 1?
By convention, so that counting formulas work smoothly. There is exactly one way to arrange nothing, which is to leave it empty.
Why is there a limit at 170?
Beyond 170, factorials grow past the largest finite number a browser can store, so the result would come out as infinity rather than a real answer.