n! Factorial Calculator (n!)

Exact factorials, even with thousands of digits.

No ratings yet — be the first

Enter details

Log in or create a free account to save your inputs and results, so you don't have to enter them again next time.🔒 No spam, ever. We never sell or share your details, and you can delete your history or account at any time. Privacy policy

Fill in the details and click Calculate to see your results.

Formula at a glance

Factorial Calculator: Factorial — n! = n × (n − 1) × … × 2 × 1,  0! = 1. Example: 20! → 20!: 2,432,902,008,176,640,000
How the Factorial Calculator works: Factorial — n! = n × (n − 1) × … × 2 × 1, 0! = 1

Rate this calculator

Was it useful? A quick star rating helps others — and you can leave a comment too.
Rate it: ★ ★ ★ ★ ★

📘 About the Factorial Calculator

The factorial n! multiplies all whole numbers from 1 to n: 5! = 120. It counts the ways to arrange n different objects and appears in permutations and combinations, probability, and the Taylor series of eˣ and sin x. Factorials grow astonishingly fast — 70! is more than 10¹⁰⁰.

Enter n. The calculator gives the exact value with big-number arithmetic, the number of digits, trailing zeros (from factors of 5) and Stirling’s approximation. Double factorials multiply every second number, and non-whole numbers use the gamma function (0.5! = √π/2).

🧮 Formula

Factorial
n! = n × (n − 1) × … × 2 × 1, 0! = 1
Trailing zeros
⌊n/5⌋ + ⌊n/25⌋ + ⌊n/125⌋ + …
Stirling
n! ≈ √(2πn)·(n/e)ⁿ

✏️ Worked examples

20!

You enter
n20
TypeFactorial n!
You get
20!2,432,902,008,176,640,000
Number of digits19
Trailing zeros4
Stirling’s approximation2.4227868 × 10^18

2,432,902,008,176,640,000.

100!

You enter
n100
TypeFactorial n!
You get
100!9.332621544 × 10^157 (158 digits)
Number of digits158
Trailing zeros24
Stirling’s approximation9.3248476 × 10^157

9.332621544 × 10^157 (158 digits).

🧭 How to use this calculator

What you enter

  • n
  • Type

What you get

  • 20!
  • Number of digits
  • Trailing zeros
  • Stirling’s approximation

❓ Frequently asked questions

Why is 0! equal to 1?

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

How many zeros are at the end of 100!?

24 — from ⌊100/5⌋ + ⌊100/25⌋ = 20 + 4.

Can you take the factorial of a decimal?

Yes, through the gamma function: x! = Γ(x + 1). For example 0.5! ≈ 0.8862.