Factorial Calculator (n!)
Enter a non-negative integer n to compute the factorial n! exactly, along with its digit count, Stirling approximation, and the previous factorial. Large values are shown in scientific notation.
Input
Enter a non-negative integer n to compute its factorial n!=1×2×…×n.
Example: enter 10 to compute 10!. Note that 0! equals 1.
Result
Value of 10!
3,628,800
Number of digits
7
Stirling approximation
3.59869562 × 10 to the power 6
Value of (10−1)!
362,880
The Stirling approximation n!≈√(2πn)×(n/e)^n becomes relatively more accurate as n grows.
How it works
- The factorial is defined as n!=1×2×3×…×n, with 0!=1.
- The exact value is computed with big integers, so there is no rounding overflow.
- The digit count uses the sum of common logarithms log10(1)+log10(2)+…+log10(n).
- Stirling approximation n!≈√(2πn)×(n/e)^n is shown as a reference for large n.
- When the result has many digits, it is displayed as a mantissa times ten to a power in scientific notation.
Reviews
Tell us what you think of this calculator.
Write a review
- Home
Factorial Calculator (n!)