Factorial calculator
Compute factorials exactly, even when the answer has thousands of digits. Students in combinatorics, probability and programming use it to check results that overflow normal calculators.
- Runs in your browser
- Free, no account needed
- Copy or download the result
Result
Example
25
25! = 15511210043330985984000000 Digits: 26 Trailing zeros: 6 Scientific notation: about 1.551121004 × 10^25
How to use the factorial calculator
- Type a whole number n from 0 to 5,000 in the box.
- Choose a Type: Factorial n! or Double factorial n!!.
- Choose how to show Long results, then press Run.
- Press Copy result or Download to keep the full number.
How it works
n! multiplies every whole number from 1 to n. n!! multiplies every other number, such as 9!! = 9 x 7 x 5 x 3 x 1.
Results use exact big integer math. 5,000! has 16,326 digits.
The output shows the digit count, the number of trailing zeros and, for results over 15 digits, a short scientific notation version. Long results can be broken into lines of 100 digits or kept on one line.
0! and 0!! equal 1 by definition. Negative numbers, decimals and e notation are rejected, and factorials of fractions need the gamma function, which this tool does not support.
Everything runs in your browser. Your input is not uploaded or stored.
Questions and answers
What is a factorial?
n! is the product of all whole numbers from 1 to n. For example, 5! = 5 x 4 x 3 x 2 x 1 = 120.
Why is 0! equal to 1?
There is exactly one way to arrange zero items, and defining 0! = 1 keeps formulas such as combinations working.
What is a double factorial?
n!! multiplies n by every second number below it. 10!! = 10 x 8 x 6 x 4 x 2 = 3840.