Factorial Calculator

Find the exact value of n! or n!! for any whole number up to 5,000, with its digits, trailing zeros and scientific notation.

Loading calculator...

Factorial calculator in short
On this page

How to use the factorial calculator

1

Enter n

Any whole number from 0 to 5,000.

2

Choose the type

n! (factorial) or n!! (double factorial).

3

Read the result

See the exact value, its digit count and trailing zeros.

What is a factorial?

The factorial of n, written n!, is the product of all whole numbers from 1 to n. It counts how many ways n different things can be put in order. Factorials grow very fast: 20! already has 19 digits.

Factorial formulas

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

0! = 1

n!! = n × (n − 2) × (n − 4) × … (down to 1 or 2)

Example 1: small factorials

Easy to check by hand.

  • 5! 5 × 4 × 3 × 2 × 1 = 120
  • 10! 3,628,800
  • 20! 2,432,902,008,176,640,000

Example 2: big factorials

Exact values a normal calculator cannot show.

  • 25! 15,511,210,043,330,985,984,000,000
  • 100! ≈ 9.332622 × 10^157 (158 digits, 24 trailing zeros)
  • 1000! 2,568 digits, 249 trailing zeros

Example 3: double factorials

Every second number.

  • 7!! 7 × 5 × 3 × 1 = 105
  • 8!! 8 × 6 × 4 × 2 = 384

Where factorials are used

Permutations

Count the ways to arrange items in order.

Combinations

Count the ways to choose groups.

Probability

Work out odds in card games and lotteries.

Series in calculus

Taylor series for e, sin and cos use factorials.

Related tools

Count arrangements with the permutation and combination calculator, work out odds with the probability calculator, or multiply huge numbers in the big number calculator.

Factorial calculator FAQ

n! is the product of every whole number from 1 to n. For example, 5! = 120.

There is exactly one way to arrange zero items, and it keeps formulas like n! = n × (n − 1)! working.

10! = 3,628,800.

158 digits. It is about 9.332622 × 10^157 and ends in 24 zeros.

Add n ÷ 5, n ÷ 25, n ÷ 125 and so on, keeping only whole numbers. 100! has 20 + 4 = 24.

No. Factorials are only defined for whole numbers 0 and above.

Embed this calculator on your website

Free to use on any site. Copy the code below and paste it into an HTML block on your page. Please keep the credit link under the calculator.

Show the embed code

Works with WordPress, Wix, Squarespace, Webflow and most site builders that allow HTML. How embedding works.

Estimates, not advice

PureCalculate’s calculators give estimates for planning and education. They aren’t financial, tax or legal advice. Fees and tax rules change, so check the official source before making a decision. Spotted a mistake? Please tell us through the contact page.

Scroll to Top