Factorial Calculator: Quick and Clear

Calculate the factorial of any non-negative integer and see the complete multiplication sequence.

Worked example

6! (read "6 factorial") multiplies every whole number from 6 down to 1:

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

Step by step, the running product is 6, then 30, then 120, then 360, then 720 (the ×1 at the end doesn't change anything) — which is exactly what the tool's step-by-step panel displays for any input of 10 or less.

Why 0! = 1

0! and 1! both equal 1, not 0. This isn't arbitrary: factorials count the number of ways to arrange n items in order, and there's exactly one way to arrange zero items (do nothing) or one item (leave it where it is). The calculator returns 1 for both by definition rather than computing an empty product.

Why the input caps at 170

170! is roughly 7.26 × 10³⁰⁶ — the largest factorial a standard JavaScript double-precision number can represent without overflowing to Infinity. 171! exceeds that limit, so the tool rejects anything above 170 rather than silently returning an infinite or wrong result. For n above 10, the step-by-step multiplication list is hidden by default since it would run to dozens of lines; only the final expansion and total are shown.