Factorial Calculator
Calculate n! (n factorial) for any whole number from 0 to 170, with the number of digits in the result.
Factorial Formula: n! = n x (n-1) x (n-2) x ... x 2 x 1
Special case: 0! = 1 by definition, which keeps formulas for arrangements and probability consistent.
Example:
10! = 10 x 9 x 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1 = 3,628,800
That is 7 digits long, and it counts something real: 10 different books can be arranged on a shelf in exactly 3,628,800 different orders.
Frequently Asked Questions
Why is 0! equal to 1 and not 0?
Because there is exactly one way to arrange zero objects: do nothing. Defining 0! = 1 also makes the counting formulas work smoothly: n! = n x (n-1)! still holds at n = 1 only if 0! is 1.
Why does this stop at 170?
Factorials grow explosively. 170! is about 7.3 x 10^306, near the largest number standard computer arithmetic can store (about 1.8 x 10^308). 171! overflows to infinity in ordinary calculators, though mathematics handles it fine on paper.