Factorial calculator

Type a natural number n. The factorial n! multiplies 1·2·…·n. 5! = 120, because 1·2·3·4·5. 0! = 1, because the empty product is taken as one. 7! = 5040.

Factorial is defined for a whole n, n ≥ 0. The calculator uses the integer part. A negative n drops to zero and returns 0! = 1.

Input data

Results

Enter data and click Calculate.

How it works

The factorial n! is the product of the natural numbers from 1 to n. 5! = 1·2·3·4·5 = 120. 3! = 6. 1! = 1. The exclamation mark is this operation, not a shout.

0! = 1. That is not a quirk of the calculator. An empty product, with no factor left to multiply, is taken as one. Combination and variation formulas stay consistent: C(n,0) and V(n,0) equal 1.

The field is n, a natural number. The calculator uses the integer part: 5.7 is counted as 5! = 120. A negative n drops to zero and returns 1. Type 5 and click Calculate.

The same n! counts the ways to line up n distinct things. Five books on a shelf have 120 orders. That is a permutation of n items, written P(n) = n! on the permutations card.

The calculator multiplies in a loop and stays with a whole number. Stirling’s approximation and the gamma function are not here. A large n still comes from the same product, not from a shortcut.

7! = 5040. 10! = 3628800. 4! = 24. 2! = 2. 6! = 720. Both 0 and 1 return 1, for two different reasons: the empty product and the single factor one.

Formula

n! = 1 · 2 · … · n, and 0! = 1

How to use

  1. Type n, for example 5.
  2. Click Calculate. 5! = 120.
  3. Zero in the field gives 1. That is the definition of 0!, not a glitch.
  4. 7! = 5040. 10! = 3628800.
  5. Arrangements of n things are n! here. Choosing k of n with no order lives on combinations.

5! = 120

The factorial n! multiplies 1·2·…·n. 5! = 120. 0! = 1. 7! = 5040. The field n is a natural number, including zero.

factorial
The product of the numbers up to n. 5! = 120. 7! = 5040. The symbol is n!, not a shout.
n
The natural number in the field. The calculator uses the integer part. 5.2 is counted as 5! = 120.
0!
One, from the empty product. Not zero. That is why C(n,0) and V(n,0) equal 1.

Examples

Example 1

  • n = 5

120

What is 5!? 120, because 1·2·3·4·5.

Example 2

  • n = 0

1

Is 0! zero? No. 0! = 1, the empty product.

Example 3

  • n = 7

5040

What is 7!? 5040.

Related calculators

Common questions

What is 5!?

120. You multiply 1·2·3·4·5. The symbol n! means factorial, not a plain exclamation mark.

Is 0! equal to 0?

No. 0! = 1. The empty product is taken as one, so C(n,0) and V(n,0) stay consistent.

What are 7! and 10!?

7! = 5040. 10! = 3628800. Same product, only longer.

What does factorial mean?

The product of the natural numbers up to n. 4! = 24. For zero the result is 1, not 0.

Does 5.7 give a different factorial from 5?

No. The calculator uses the integer part, so 5.7 is counted as 5! = 120.

What about a negative number?

School factorial is for n ≥ 0. Here a negative n drops to zero and returns 0! = 1.

How is factorial different from a permutation?

The number is the same: P(n) = n!. Here you see the product. On the permutations card that same 5! = 120 is an arrangement of five items.

Does the calculator use Stirling or gamma?

No. It stays with the ordinary whole-number product. There is no approximation and no fractional n.

What are 1! and 2!?

1! = 1. 2! = 2. 3! = 6. Each next step multiplies by the next number.

What is 5! good for in a line?

Five different people can stand in 120 orders. Choosing two of five with no order is C(5,2) = 10, on combinations.

Knowledge sources

The calculator computes the same formula as the definition below.

Page updated in 2026.