Factorial Calculator (n!)
—
Formula: n! = n × (n-1) × (n-2) × ... × 2 × 1
n! = n × (n-1) × (n-2) × ... × 2 × 1
Step-by-Step Examples
5 = 120
5! = 5 × 4 × 3 × 2 × 1 = 120
Frequently Asked Questions
What is a factorial?
The factorial of n (written n!) is the product of all positive integers from 1 to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120.
What is 0!?
0! = 1 by definition. This is necessary for the combinatorial formula C(n,0) = 1 to work correctly.
Why does the calculator stop at 170?
JavaScript numbers can represent up to about 1.8 × 10³⁰⁸. 170! is the largest factorial that fits; 171! exceeds this limit.