What is a factorial calculator?
A factorial calculator finds the factorial of a non-negative whole number, written and read aloud as “n factorial.” The factorial is the product of every positive integer from up to and including . Enter a value for and the calculator returns immediately.
Factorials grow extremely fast: is already , and exceeds three million. Because of this rapid growth, factorials appear throughout combinatorics, probability, algebra, and calculus whenever you need to count the number of ways objects can be arranged.
How does it work?
The factorial is defined as the product of all positive integers up to :
There is one important special case. The factorial of zero is defined to equal one:
This is not an accident or an exception bolted on after the fact. There is exactly one way to arrange zero objects (the empty arrangement), so keeps counting formulas consistent. It also follows from the recursive rule : setting gives , which only holds if .
Factorials are defined only for non-negative integers. A negative number or a fraction such as has no ordinary factorial, so the calculator leaves the result blank for those inputs. (The gamma function extends the idea to other numbers, but that is beyond a basic factorial.)
Worked examples
Notice the recursive shortcut at work: once you know , computing is just , and builds the same way one step at a time.
Practical notes
Factorials are the engine behind permutations and combinations. The number of ways to arrange distinct items in order is , and the formulas for permutations and combinations are both written in terms of factorials. If you are counting arrangements or selections, see the permutations calculator at https://www.mega-calculator.com/math/permutations/ and the combinations calculator at https://www.mega-calculator.com/math/combinations/.
Because factorials explode in size, this calculator accepts values up to . Beyond that point exceeds the largest finite value a standard computer number can represent, so the result is left blank rather than reported as infinity. For everyday counting and probability work, that range is more than enough.