Factorial Calculator

Calculate n! (n factorial) exactly for any whole number up to 5,000, with the number of digits, the number of trailing zeros and scientific notation.

10!
3,628,800
Digits
7
Trailing zeros
2

Step-by-step working

  1. n! multiplies every whole number from 10 down to 110! = 10 × 9 × 8 × … × 1
  2. Result3628800

Formula n! = n × (n − 1) × … × 2 × 1, 0! = 1

Ask the tutor about your result

An AI tutor reads your inputs and results above and explains them in plain English. The numbers come from the calculator; the explanation is AI-written, so check it against your notes.

How fast factorials grow

10! = 3,628,800. 20! already has 19 digits, which is past the exact range of a typical calculator. 52!, the number of ways to shuffle a deck of cards, is about 8.07 × 10⁶⁷. This calculator uses exact big-integer arithmetic, so every digit is correct.

Trailing zeros

Each trailing zero comes from a factor of 10 = 2 × 5. Factors of 2 are plentiful, so count the 5s: n ÷ 5 + n ÷ 25 + n ÷ 125 + …, rounding down each time. 100! ends in 20 + 4 = 24 zeros.

Frequently asked questions

Why is 0! equal to 1?

There is exactly one way to arrange zero objects, and defining 0! = 1 keeps formulas like C(n, n) = n! ÷ (n! · 0!) = 1 working.

Can you take the factorial of a negative number or a decimal?

Not with the ordinary definition. The gamma function extends factorials to non-integers (Γ(n + 1) = n!), but it is undefined at negative integers.