Factorial Calculator
Compute n! exactly using BigInt for arbitrarily large results up to 1000!.
About Factorial Calculator
The factorial of a non-negative integer n, written n!, is the product of all positive integers from 1 to n. By convention, 0! = 1. Factorials grow extremely fast — 100! has 158 digits. This calculator uses BigInt arithmetic to produce exact results up to 1000! (2568 digits). It never returns Infinity or an approximation.
Formulas
Factorial definition
n! = n × (n−1) × (n−2) × ... × 2 × 1, with 0! = 1
- n
- Non-negative integer
Stirling approximation
n! ≈ √(2πn) × (n/e)^n
- n
- Large n
- e
- Euler's number ≈ 2.718
Worked example
With the default values below, Factorial Calculator returns n! of 3628800. Change any input above and every figure here is recalculated in your browser.
Inputs used
- naccepts 0–1,000
- 10
Results
- n!
- 3628800
- Number of Digits
- 7
- Stirling Approximation
- ≈ 10^6.56
Step by step
- 1Definition
- 2Result digits= 7
Assumptions and limits
- The result is derived only from the single input listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to whole numbers, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
Why is 0! equal to 1?
By convention and for consistency with the combinatorial formula: there is exactly one way to arrange zero objects (do nothing). It also ensures n! = n × (n−1)! works for n = 1.
Why cap the input at 1000?
1000! has 2568 digits. Beyond that, the string representation becomes impractically large for display. The computation itself is fast, but rendering thousands of digits offers little practical value.
