Math

Factorial Calculator

Enter a whole number to calculate its factorial — the product of every whole number from 1 up to that number, a fundamental building block for combinations, permutations, and probability.

Enter a number

n!
Enter a number to calculate.

How the Factorial formula works

The factorial definition:

n! = n × (n−1) × (n−2) × ... × 2 × 1
0! = 1 (by definition)

Step-by-step calculation

  1. Start with the number itself.
  2. Multiply by every whole number below it, down to 1.
  3. The final product is the factorial.

Worked example

6! = 6 × 5 × 4 × 3 × 2 × 1 = 720.

Frequently asked questions

Why is 0! defined as 1, not 0?

It's a mathematical convention that keeps formulas involving factorials (like combinations and permutations) consistent — treating 0! as an 'empty product' equal to 1 makes those formulas work correctly at their boundary cases.

How fast do factorials grow?

Extremely fast — 10! is already 3,628,800, and 20! exceeds 2.4 quintillion. Factorials grow faster than exponential functions, which is why they quickly exceed what standard number formats can precisely represent.