About Factorial Calculator
Enter a whole number n and get n factorial, the product 1 × 2 × … × n, written out in full with every digit. Alongside it are the number of digits, the number of trailing zeros and a rounded value in scientific notation that is easier to quote.
Ordinary calculators switch to an approximation after 170!, where floating-point numbers run out. This tool multiplies exact whole numbers instead, so 1,000! comes back with all 2,568 digits, and the full result can be copied.
How it works
- The product is built by splitting the range in half and multiplying the halves, which keeps the numbers being multiplied of similar size and the whole calculation fast.
- Trailing zeros are counted with Legendre’s formula: each factor of 5 pairs with a factor of 2 to make a 10, so the count is n/5 + n/25 + n/125 and so on, rounded down.
- The scientific value is rounded to 10 significant digits from the exact result, not estimated.
Questions
Why is 0! equal to 1?
n! counts the ways to arrange n things, and there is exactly one way to arrange nothing. It also keeps the rule n! = n × (n − 1)! working at n = 1.
Why stop at 10,000?
10,000! already has 35,660 digits. Much larger results take noticeably longer to compute and print in a web page, so the limit keeps the tool instant.
Can I get the factorial of a decimal or a negative number?
No. Factorials of negative whole numbers do not exist, and values between whole numbers need the gamma function, which this tool does not compute.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.