Factorial Calculator

Calculate n factorial as an exact whole number, including 0!, and understand the multiplication behind the result.

Quick Answer

5! = 5 × 4 × 3 × 2 × 1 = 120. By definition, 0! = 1.

n! = n × (n − 1) × ··· × 2 × 1; 0! = 1

Enter a whole number from 0 to 500. The answer is exact, even when it is too large for ordinary floating-point math.

Exact factorial
5! = 120

Multiply every positive whole number from 5 down to 1.

Digits in result3
Trailing zeros1
Steps

    Rate This Tool

    Tell us how useful this tool is.

    No ratings saved on this device yet

    Select a star to save your rating on this device.

    Embed Factorial Calculator

    Copy this iframe code into a page that permits embeds.

    How to Use the Factorial Calculator

    Enter a whole number from 0 to 500. The result shows the exact product and two useful checks: the number of digits and the number of trailing zeros. For large results, scroll within the result area.

    Factorials grow rapidly. The tool uses whole-number arithmetic, so it does not round the answer.

    What Does n! Mean?

    The exclamation mark means multiply all positive whole numbers from n down to 1. For a positive n, n! = n × (n − 1)!. The special starting value 0! = 1 makes that rule consistent.

    6! = 6 × 5 × 4 × 3 × 2 × 1 = 720

    Worked Example: 5 Factorial

    Start at 5 and multiply downward: 5 × 4 = 20, 20 × 3 = 60, 60 × 2 = 120, and 120 × 1 = 120. Therefore 5! = 120. This also counts the distinct ways to arrange five different items in order.

    Why Do Factorials End in Zeros?

    Each trailing zero comes from a factor of 10, or one factor of 2 paired with one factor of 5. Factorials contain more 2s than 5s, so count the factors of 5. The count is ⌊n/5⌋ + ⌊n/25⌋ + ⌊n/125⌋ + … until the quotient is zero.

    100! has ⌊100/5⌋ + ⌊100/25⌋ = 20 + 4 = 24 trailing zeros.

    Common Factorial Mistakes

    Is 0! equal to 0?

    No. The standard factorial definition sets 0! = 1.

    Can I use a negative number or decimal?

    This calculator evaluates the standard elementary factorial for nonnegative whole numbers. Other extensions require different definitions.

    Is n! the same as n × n?

    No. n! multiplies every positive whole number up to n; n × n uses only n twice.

    Factorial Calculator FAQs

    What is 10 factorial?

    10! = 3,628,800.

    Why is 0 factorial 1?

    The empty product is defined as 1, which also keeps n! = n × (n − 1)! consistent at n = 1.

    How large a factorial can this tool calculate?

    It calculates exact factorials for whole numbers from 0 through 500.

    Editorial review

    SolverCalc names Prof. Dr. Khalil Mudassar as its educational reviewer. The calculation follows the standard factorial definition and can be checked against the references below.

    Sources

    View references

    Disclaimer

    For educational use. Check your class or textbook convention when the problem defines a different range, sequence index, or notation.