Skip to content
AllCalcHub

Factorial Calculator

Find n! exactly for any whole number up to 5,000, plus the double factorial n!!.

About the Factorial Calculator

The factorial n! is the product of all whole numbers from 1 to n, and 0! = 1. It counts the ways to arrange n distinct items: 52! (about 8 × 10⁶⁷) is the number of possible orders of a deck of cards. The double factorial n!! multiplies every other number: 7!! = 7 × 5 × 3 × 1. Results are exact, using big integers.

The formula

n! = 1 × 2 × … × n

Worked example

Example: 22! = 1,124,000,727,777,607,680,000

  1. Input: n: 22.
  2. Formula: n! = 1 × 2 × … × n
  3. Result: 22! = 1,124,000,727,777,607,680,000

Questions people ask

Why is 0! equal to 1?

There's exactly one way to arrange nothing, and it keeps formulas like n! = n × (n − 1)! consistent.

Factorials of decimals?

They use the gamma function: x! = Γ(x + 1).