Part of the Math & Statistics suite · 235 calculators

Factorial Calculator

n! — the product of all whole numbers from 1 to n — exact up to 170 and in scientific notation beyond, with the number of digits and trailing zeros.

n! = n × (n − 1) × … × 2 × 1, with 0! = 1.

Results update as you type
Results
n!
3628800
Number of digits
Trailing zeros
(n − 1)!
log₁₀(n!)
Reviewed September 2026. Pure mathematics: the result does not depend on where you are. Terminology follows US usage (math, parentheses, decimal point).
No account required · Google Analytics off unless allowedCalculator arithmetic runs in your browserResults update as you type
All calculations run 100% in your browser. The calculator code does not submit your figures to GlobalCalc to obtain a result.
About factorial

How the factorial calculator works

n! = n × (n − 1) × … × 2 × 1, with 0! = 1. It counts the ways to arrange n distinct things in a row. Factorials grow faster than any exponential: 20! is already 2.4 × 10¹⁸, and 171! exceeds the largest double-precision number, so larger values are shown via Stirling's approximation of log₁₀.

Formula: n! = n × (n−1) × … × 1; 0! = 1

Worked examples

Inputsn!Note
10!36288003,628,800
20!2.432902e182.43 × 10¹⁸
0!11 by definition
100!9.332622e157158 digits

Frequently asked questions

Why is 0! equal to 1?

There is exactly one way to arrange nothing; it also makes the formulas for permutations and combinations work.

How large can factorials get?

170! ≈ 7.3 × 10³⁰⁶ is the largest that fits a double; the calculator shows bigger ones in scientific notation via logarithms.

Where are factorials used?

Counting arrangements (permutations), combinations, probability, Taylor series and the gamma function.

Why do factorials end in zeros?

Each pair of factors 2 and 5 makes a 10; the count of trailing zeros is ⌊n/5⌋ + ⌊n/25⌋ + ….

What is the factorial of a fraction?

The gamma function extends factorials: Γ(n + 1) = n!, and Γ(½) = √π.

Where these figures come from

Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.