Factorial Calculator

How to Calculate a Factorial

The factorial of a number n (written n!) is the product of all positive integers from 1 to n. By definition, 0! = 1.

The formula

n! = n × (n−1) × (n−2) × ... × 2 × 1

Step-by-step

  1. Enter a non-negative integer.
  2. The calculator multiplies all integers from 1 up to n.

Worked example

5! = 5 × 4 × 3 × 2 × 1 = 120. 10! = 3,628,800. 0! = 1 (by convention).

When to use factorials

Factorials are central to combinatorics — permutations and combinations both use factorials. They also appear in probability, Taylor series in calculus, and the Poisson distribution.