Skip to content
Calculator Tools
Basic Math Calculators

Factorial Calculator

Compute n! exactly for any whole number up to 5,000, with the number of digits and trailing zeros.

Enter values

Results update as you type.

Result

20!

2.43290200 × 10^18

Exact value
2432902008176640000
Number of digits
19
Trailing zeros
4

About the Factorial Calculator

Compute n! exactly for any whole number up to 5,000, with the number of digits and trailing zeros.

Also known as: n factorial, factorial of a number, n!, factorials.

How to use this calculator

  1. Enter n.
  2. The result updates instantly as you type — press Calculate (or Enter) at any time.
  3. Review the breakdown shown under the main result.
  4. Use Copy result or Share to save the answer or send a link with your inputs.

Formula

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

Worked example

Using the values pre-filled in the calculator above:

  • n = 20

the calculator returns:

  • 20!: 2.43290200 × 10^18
  • Exact value: 2432902008176640000
  • Number of digits: 19
  • Trailing zeros: 4

Frequently asked questions

Why is 0! equal to 1?

There is exactly one way to arrange zero objects (do nothing), and defining 0! = 1 keeps formulas such as n! = n × (n − 1)! and the combination formula consistent.