Factorial Calculator

Factorial n! of a non-negative integer.

Result —

How it works

n! = 1 × 2 × 3 × … × n (with 0! = 1)

Factorials grow extremely fast and appear in combinatorics and probability. Beyond n = 170 the value overflows the float range and shows "—".

FAQ

Why is 0! defined as 1?

So combinatorial identities (e.g. C(n,0)=1) stay consistent; mathematically 0! is defined as 1.

Worked example

5! = 5×4×3×2×1 = 120; 10! = 3,628,800; by definition 0! = 1.

Factorials explode: 20! ≈ 2.43×10¹⁸, beyond a 64-bit integer.

Notes and limitations

Factorial is defined for non-negative integers (the gamma function extends it). Large factorials overflow quickly — use logs or a big-integer library in practice.

Home