✖️ Factorial Calculator

Calculate the factorial of any number from 0 to 170 with step-by-step expansion, scientific notation, and digit count.

Step-by-step expansion:

Factorial Calculator

Factorials are fundamental in combinatorics, probability, algebra, and calculus. This calculator computes n! for any integer from 0 to 170 and shows the full multiplication expansion.

Frequently Asked Questions

What is a factorial?

A factorial (n!) is the product of all positive integers from 1 to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. It is used in combinatorics, probability, and algebra.

Why is the maximum input 170?

JavaScript uses 64-bit floating-point numbers. The factorial of 170 is approximately 7.26 × 10^306, which is close to the maximum representable value (Number.MAX_VALUE). Beyond 170, the result overflows to Infinity.

What is 0 factorial?

0! = 1 by definition. This is a mathematical convention that makes formulas in combinatorics and probability work correctly. Similarly, 1! = 1.