Online Factorial Calculator

What Is a Factorial Calculator?

The online factorial calculator helps you quickly compute the factorial (n!) of any non-negative integer. The factorial is the product of all integers from 1 up to that number, e.g., 5! = 5 × 4 × 3 × 2 × 1 = 120.

Factorial Formulas

  • Basic definition: for a positive integer n, n! = n × (n-1) × (n-2) × ... × 2 × 1
  • Recursive definition: n! = 1 (when n = 0 or n = 1); n! = n × (n-1)! (when n > 1)
  • By convention, 0! = 1.

How to Use the Factorial Calculator?

  1. Enter the non-negative integer (0 - 170) you want to compute in the "Number" input box.
  2. Click the "Calculate" button, or press Enter on your keyboard.
  3. The result is shown in the "Output" box in the format "n! = result".

Notes

  • The maximum supported value is 170!; beyond that, the value exceeds JavaScript\'s representable range.
  • The input must be an integer; decimals or text are not accepted.