Factorial Calculator (n!)

Type a whole number n to get n! = n × (n − 1) × … × 1. Big factorials are worked out exactly, not rounded.

n!

36,28,800

Number of digits
7
Zeros at the end
2
Show working
  1. 10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1
  2. Z = ⌊10/5⌋ = 2

How to use

  1. Type a whole number from 0 to 5,000.
  2. Read n!, the number of digits and the zeros at the end.
  3. Open the steps to see every digit (up to 1000!).

Good to know

n! (n factorial) is the product of all whole numbers from 1 to n: 5! = 5 × 4 × 3 × 2 × 1 = 120. By definition 0! = 1. Factorials count arrangements: 5 books can be arranged on a shelf in 5! = 120 ways, which is why they appear in permutations and combinations (nPr, nCr) in Class 11.

The calculator uses exact whole-number arithmetic (BigInt), so 1000! shows all 2,568 digits in the steps, in groups of 10. Ordinary calculators stop at 170! (about 7.26 × 10³⁰⁶), the largest factorial that fits in a standard floating-point number.

Trailing zeros come from factors of 10 = 2 × 5, and there are always more 2s than 5s, so count the 5s (Legendre's formula): zeros in n! = ⌊n/5⌋ + ⌊n/25⌋ + ⌊n/125⌋ + … For 100!: 20 + 4 = 24 zeros. This is a common aptitude test question.

Questions

What is 0 factorial?

0! = 1. There is exactly one way to arrange nothing, and it keeps formulas like nCr working.

What is 10!?

36,28,800 (3,628,800).

How many zeros are at the end of 100!?

24: ⌊100/5⌋ + ⌊100/25⌋ = 20 + 4.

Can I find the factorial of a decimal or negative number?

Not here. n! is defined for whole numbers 0, 1, 2… The gamma function extends it to other numbers but is beyond school maths.

How many digits does 1000! have?

2,568.

Last updated: