Factorial Calculator

A factorial is the product of all positive integers from 1 to n, denoted as n!. For example, 5! = 5 * 4 * 3 * 2 * 1 = 120. By convention, 0! = 1. This calculator computes the factorial of any non-negative integer and displays both the regular result and scientific notation for large values. Factorials grow extremely rapidly: 10! = 3,628,800, and 20! exceeds 2 billion. Factorials are essential in combinatorics (counting permutations and combinations), probability theory, and calculus. The calculator includes a reference table showing factorials from 0! through 20! for quick reference.

Non-negative integer (0-170)
120
1.20 × 10^2

Factorial formula

n! = n * (n-1) * (n-2) * ... * 2 * 1
0! = 1 (by definition)
Example: 5! = 5 * 4 * 3 * 2 * 1 = 120

Factorials reference (0! to 20!)

n n! n n!
011139,916,800
1112479,001,600
22136,227,020,800
361487,178,291,200
424151,307,674,368,000
51201620,922,789,888,000
672017355,687,428,096,000
75,040186,402,373,705,728,000
840,32019121,645,100,408,832,000
9362,880202,432,902,008,176,640,000
103,628,800

Factorial calculator: frequently asked questions

What is a factorial?

A factorial (written as n!) is the product of all positive integers from 1 to n. For example, 5! = 5 * 4 * 3 * 2 * 1 = 120. By definition, 0! = 1.

When are factorials used?

Factorials appear in combinatorics (counting arrangements and combinations), probability theory, calculus, and algebra. For example, the number of ways to arrange n objects is n!.

What is 0 factorial?

By definition, 0! = 1. This might seem odd, but it makes mathematical sense in combinatorics. There is exactly one way to arrange zero objects (the empty arrangement).

What is the largest factorial I can calculate?

Due to JavaScript number precision limits, this calculator can accurately compute factorials up to 170!. For factorials beyond that, the result is displayed in scientific notation.

How fast do factorials grow?

Factorials grow extremely fast. 10! = 3,628,800, but 20! is over 2 billion. This rapid growth is why factorial problems are computationally challenging for large n.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology.