Factorial Calculator
Compute the factorial n! of a whole number, exactly — even very large values.
Results update as you type.
About this calculator
The factorial of n (written n!) is the product of every whole number from 1 up to n. This calculator returns the exact value using arbitrary-precision integers, the number of digits in that value, and an approximate mantissa × power-of-ten form for readability.
The calculation is a running product: 5! = 5 × 4 × 3 × 2 × 1 = 120. Factorials grow extremely fast — 10! = 3,628,800 and 100! already has 158 digits — which is why the tool shows both the full exact integer and its digit count. By definition 0! = 1 and 1! = 1, since there is exactly one way to arrange an empty or single-item set. It accepts n from 0 up to 2000.
Factorials count the number of ways to order n distinct items and are the foundation of permutations and combinations, the binomial theorem, and probability. Whenever you count arrangements or divide out orderings, a factorial is doing the work underneath.
Frequently asked questions
What is a factorial used for?
A factorial counts arrangements: n! is the number of distinct orderings of n items. It is the building block of permutations and combinations.
What is 0! (zero factorial)?
By definition 0! = 1. There is exactly one way to arrange an empty set, so the empty product is 1.
What is 5 factorial?
It is 5 × 4 × 3 × 2 × 1 = 120, the default example this calculator shows.
How large a factorial can it compute?
Up to 2000! exactly, using arbitrary-precision integers, so no accuracy is lost even though the number is enormous.
Why does it show a digit count?
Factorials grow so fast that the full number is unwieldy — 100! has 158 digits — so the digit count gives you a quick sense of its size.
What is the approximate value for?
It expresses the factorial as a mantissa times a power of ten, an easy-to-read estimate shown next to the exact integer.
API — use this calculator from code
Call this calculator as a free JSON endpoint — no key required. Send the field values below as query parameters or JSON. Read the full API docs →
Endpoint
GET https://calculator.free/api/v1/factorial/
curl
curl "https://calculator.free/api/v1/factorial/?n=5"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/factorial/?" + new URLSearchParams({
"n": "5"
}));
const data = await r.json();
console.log(data.results);
Results are estimates for general guidance only, not financial, medical or tax advice.