Want a Custom tool for Yourself?

Need a Custom Tool? We build custom tools that can save hours per employee per day.

Factorial Calculator

Calculate n factorial for a whole number and get the exact result. Useful for permutations, combinations, and counting problems in probability.

Enter the Details


Last updated: February 13, 2026

Created by: Eon Tools Dev Team

Reviewed by: Okan Atalay



What this calculator does

So, you want the factorial of a number, written with an exclamation mark as n. This tool works it out. Enter a whole number and it multiplies it by every whole number below it down to 1, giving the factorial.

One input, one button. Because factorials grow enormous, the tool accepts numbers up to 160, beyond which the result becomes too large to give precisely.

How to use it

  1. Enter a whole number, zero or above.
  2. Press Calculate.

What a factorial is

The factorial of a number is the product of that number and all the whole numbers beneath it, stopping at 1. So 5 factorial means 5 times 4 times 3 times 2 times 1, which is 120. The exclamation mark is the notation, introduced by the mathematician Christian Kramp in the early nineteenth century. Factorials are a compact way of writing a long descending multiplication, and they turn up constantly in counting problems, probability, and algebra. The tool builds the answer by multiplying down from your number, one step at a time.

Why zero factorial is one

There is one value that surprises people: zero factorial equals 1, not 0. It looks odd, but there is good reason for it. The cleanest explanation comes from counting: a factorial counts the number of ways to arrange a set of objects, and there is exactly one way to arrange nothing, namely the empty arrangement. Defining zero factorial as 1 also keeps the patterns and formulas that use factorials working smoothly, without special exceptions. The tool follows this standard definition and returns 1 for an input of zero.

How fast factorials grow

Factorials grow faster than almost anything you meet in ordinary arithmetic. Look at how quickly they climb: 5 factorial is 120, 10 factorial is already over three million, and 20 factorial runs into the quintillions. Each step multiplies by an ever larger number, so the totals explode. This runaway growth is exactly why the tool caps the input at 160: past that point the answers become so gigantic that they cannot be represented precisely. It is a good reminder that a small-looking input to a factorial can produce a genuinely astronomical output.

Factorials count arrangements

The reason factorials matter so much is that they count orderings. If you have a handful of distinct objects and want to know how many different ways they can be lined up, the answer is the factorial of how many there are. Three objects can be arranged in 3 factorial, which is 6, different orders. This is because there are that many choices for the first position, one fewer for the second, and so on down to a single choice for the last. These orderings are called permutations, and factorials are the natural language for counting them, which is why they sit at the heart of probability and combinatorics.

A worked example

Take 5 factorial. Multiply 5 by 4 to get 20, then by 3 to get 60, then by 2 to get 120, then by 1, which leaves it at 120. So 5 factorial is 120. As a check on the counting idea, this says five distinct items can be arranged in 120 different orders.

Questions people ask

What is a factorial?

The product of a whole number and every whole number below it down to 1. For example, 5 factorial is 5 times 4 times 3 times 2 times 1, which is 120.

Why is zero factorial equal to one?

Because there is exactly one way to arrange nothing, and defining it as 1 keeps the counting formulas consistent.

Why does the tool limit the input?

Factorials grow astronomically fast. Beyond about 160 the result is too large to represent precisely, so the tool caps the input there.

Can I take the factorial of a negative number?

The ordinary factorial is defined only for whole numbers zero and above, so the tool asks for a non-negative whole number.

What are factorials used for?

Counting arrangements, or permutations, of objects, which makes them central to probability and combinatorics.

References

On the factorial. The factorial of n is the product of all whole numbers from n down to 1, with zero factorial defined as 1.

  1. Eric W. Weisstein, "Factorial," from MathWorld, a Wolfram resource, on the factorial, the special case of zero factorial, and counting permutations.
  2. "Factorial," Wolfram Language Documentation, on the factorial function and its values.


Okan Atalay

Okan Atalay is a results driven senior operations manager and a graduate of Industrial Engineering from Bilkent University. With over 22 years of experience in textile manufacturing and integrated operations, he has led large scale business process improvements and strategic planning initiatives. Currently, he serves as a top mathematics expert for a global ed tech platform, where he applies his analytical expertise to solve complex mathematical problems. At Eon Tools, he reviews converter and maths tools.