How to use the Factorial Calculator
- Enter a nonnegative whole number no greater than 1,000.
- Read the exact factorial value and its digit count.
- For results longer than 16 digits, an additional scientific-notation preview is shown as an approximation; the exact result remains available.
Factorial definition
Where:
- = a nonnegative whole number
- = the product of every positive integer from 1 through n
Show as plain text
n! = n × (n−1) × ... × 2 × 1; by definition 0! = 1
A factorial multiplies all positive integers up to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120.
The calculator uses JavaScript BigInt for an exact integer result through n = 1,000. Scientific notation, when shown, is a rounded preview derived from the exact integer.
Assumptions and limitations
- Only nonnegative integers from 0 through 1,000 are accepted.
- BigInt multiplication is exact for this range; the scientific notation preview is approximate, while the displayed factorial string is exact.
Example: Calculate 5 factorial
- Start with 5! = 5 × 4 × 3 × 2 × 1.
- Multiply: 5 × 4 × 3 × 2 × 1 = 120.
- Therefore 5! = 120, which has three digits.
When to use the Factorial Calculator
- Finding n! for counting arrangements, probability exercises or discrete mathematics.
- Checking the base case 0! = 1 or comparing factorial result sizes.
- Use the exact result in the combinations calculator or permutations calculator.
Factorial Calculator FAQs
Why is 0! equal to 1?
It is the standard empty-product convention. It also makes factorial identities such as n choose 0 = 1 work consistently.
Is the large factorial result rounded?
No. The exact factorial is calculated and shown as a decimal integer. Only the optional scientific-notation preview is approximate.
Why is n limited to 1,000?
The limit keeps browser computation and display practical while still supporting factorials thousands of digits long.
How this calculator was built and tested is explained in our methodology. Spotted a problem? Let us know.