Factorial Calculator
Calculate the factorial of a non-negative integer.
Runs locally in your browser
Your inputs are processed locally in your browser and are not uploaded or stored by us.
The Factorial Calculator finds the factorial (!) of non-negative integers up to 18 using exact integer arithmetic.
How to calculate a factorial
- Enter a non-negative integer from 0 through 18.
- Click "Calculate" to find the product of all positive integers less than or equal to n.
Factorial Definition
n! = n × (n−1) × ... × 2 × 1
(with 0! = 1)
The calculator computes the strict integer factorial. It does not evaluate Gamma-function semantics for fractions.
Calculating 5!
Number5
5! = 5 × 4 × 3 × 2 × 1
Result: 120
Notes
- Only non-negative integers are accepted.
- The input domain is restricted to a maximum of 18. (i.e. 18! is supported, 19! is rejected).
- This calculator returns exact JavaScript safe integers. 18! fits within the supported safe-integer range, while 19! does not, so 19! is rejected rather than approximated.
- The calculator preserves exact integer relationships within its documented limits.
- Your inputs are processed locally in your browser and are not uploaded or stored by us.