Formula and method
For a whole number n, factorial is n! = n × (n − 1) × … × 2 × 1. The standard empty-product convention makes 0! equal to 1.
Boundaries
- Only nonnegative whole numbers from 0 through 170 are accepted.
- 170 is the largest supported input whose factorial remains finite in a JavaScript number.
- Results are displayed as whole-number formatted values; very large values are subject to floating-point precision limits.
Version and verification
Calculation version 1.0.0; deterministic fixtures last verified 2026-08-20.