Skip to main content

Factorial Calculator n! – Steps & Big Numbers

Quick answer

n!

  • = n×(n−1)×…×1 with 0!=1 by definition.
  • Example: 5!=120, 10!=3628800.

Figures are estimates from this calculator’s standard formula — adjust the inputs in the tool below for your exact number.

How the Factorial Calculator Works

n! = n × (n−1) × (n−2) × … × 2 × 1 | 0! = 1

A factorial counts ordered arrangements, so it multiplies every whole number from n down to 1: 5! = 5×4×3×2×1 = 120, the number of ways to order five books on a shelf. The value explodes fast — 10! = 3,628,800 and 20! = 2,432,902,008,176,640,000. Zero factorial is defined as 0! = 1 so that formulas like C(n,r) = n!/(r!(n-r)!) stay valid at the boundaries. This calculator lists each partial product (5, 20, 60, 120) so the growth is visible, and it switches to scientific notation for large n. Standard floating-point doubles overflow beyond 170! ≈ 7.26×10³⁰⁶, the hard ceiling for everyday tools; the calculator warns when you approach it and explains the exact-math alternative.

  1. 1

    Enter n

    Type a non-negative integer such as 5 or 20

  2. 2

    Chain the multiplications

    Multiply n × (n−1) × … × 1, printing each partial product

  3. 3

    Handle 0 and 1

    Both return 1: 0! = 1 by definition and 1! = 1

  4. 4

    Format large results

    Switch to scientific notation past 20! and warn near the 170! limit

Use Cases

Permutation Counting

Ordering 8 runners: 8! = 40,320 possible finish orders

Combinatorics Formulas

Feed n! into nCr and nPr for combinations and arrangements

Probability Problems

Chance deals like shuffled decks rely on 52! ≈ 8×10⁶⁷ orders

Tips

  • 1

    0! = 1, not 0 — the empty product convention

  • 2

    Factorials outrun exponentials: 20! ≈ 2.43×10¹⁸ but 20³ is only 8,000

  • 3

    Doubles stop at 170!; beyond that use logs or big-integer math

Common Mistakes

  • Assuming 0! = 0 instead of the defined value 1

  • Believing (n+1)! is roughly n! + n; actually (n+1)! = (n+1)×n!, so 6! = 6×120 = 720

  • Applying factorial to non-integers without the gamma function

  • Trusting calculator displays past 170! where doubles overflow to infinity

FAQs

What is 0! equal to?

1. It is defined so combinatorial formulas stay consistent — there is exactly one way to arrange zero items.

How large is 10!?

3,628,800. The chain 10×9×8×7×6×5×4×3×2×1 grows past three million by the final factor.

Why does my calculator fail at 171!?

Standard double-precision floats top out near 1.8×10³⁰⁸; 170! ≈ 7.26×10³⁰⁶ fits, 171! does not.

How fast do factorials grow?

5! = 120, 10! ≈ 3.63×10⁶, 20! ≈ 2.43×10¹⁸ — roughly a 10× jump every 3.7 steps of n.

How is n! used in combinations?

C(n,r) = n!/(r!(n−r)!). For C(5,2): 120/(2×6) = 10 ways to choose 2 of 5.