Calculate the factorial of any non-negative integer n! Supports large numbers with BigInt, shows step-by-step multiplication, digit count, and scientific notation. Free and instant.
Enter a non-negative integer (0 – 10,000)
The factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. By definition, 0! = 1. This calculator uses JavaScript's BigInt to handle very large factorials that exceed normal number limits. It also shows the number of digits, trailing zeros, and a scientific notation approximation for large results.
The factorial of a number n (written as n!) is the product of all positive integers from 1 to n. For example: 4! = 4 × 3 × 2 × 1 = 24. By mathematical convention, 0! = 1.
0! = 1 is a mathematical convention that makes many formulas work correctly, especially in combinatorics and the binomial theorem. It represents the empty product (the product of no numbers), which is defined as 1.
This calculator supports factorials up to 10,000! using JavaScript's BigInt. 10,000! has 35,660 digits. For even larger numbers, the browser may run out of memory.
The number of trailing zeros in n! equals the number of times n! is divisible by 10. Since 10 = 2 × 5, and there are always more factors of 2 than 5, the count is: floor(n/5) + floor(n/25) + floor(n/125) + ...