Advertisement

Factorial Calculator

Enter a whole number and press Calculate. The answer and the working behind it will show up here.

— —
Working out
Advertisement

Exact factorials, up to 2000!

Enter a whole number and get its factorial computed exactly (not as a rounded approximation), along with its digit count, trailing zero count and scientific notation for very large results.

How to use

  1. Enter a whole number (0 to 2,000)
  2. Press Calculate
  3. Read the exact value, or its scientific notation and digit count if it runs long

Common questions

How large a factorial can this calculate exactly?

Up to 2000!, which runs to 5,736 digits — computed with BigInt so every digit is exact, not an approximation. Beyond that the result would be too long to display usefully, so larger values are rejected.

Why is 0! equal to 1 and not 0?

There's exactly one way to arrange nothing at all — the empty arrangement — so 0! is defined as 1. This also keeps the identity n! = n × (n−1)! consistent at the bottom of the chain, since 1! = 1 × 0!.

How does it count trailing zeros without actually looking at the digits?

Every trailing zero needs a factor of 10, which is a 2 paired with a 5 — and in a factorial there are always more factors of 2 than 5, so counting multiples of 5, then 25, then 125, and so on within n is enough to get the exact count without ever multiplying anything out.