OhMyCalc

Factorial Calculator

Calculate the factorial of any number from 0 to 170. See the full step-by-step expansion and the number of digits in the result.

How to Calculate a Factorial

  1. Enter a non-negative integer between 0 and 170 in the input field.
  2. Click Calculate to compute n! instantly.
  3. View the full expansion showing each multiplication step.
  4. Check the digit count to understand the magnitude of the result.

Referencia Rápida

DeA
3!6
5!120
7!5,040
10!3,628,800
12!479,001,600
0!1

Casos de Uso

Fórmula

n! = n × (n−1) × (n−2) × ... × 2 × 1. By definition, 0! = 1. Factorials grow extremely fast: 20! already exceeds 2.4 × 10¹⁸.

Preguntas Frecuentes

Why does 0! equal 1?
By convention 0! = 1. This makes many formulas (such as combinations and the binomial theorem) work consistently. It also represents the fact that there is exactly one way to arrange zero objects.
Why is there a limit of 170?
170! ≈ 7.26 × 10³⁰⁶ is the largest factorial that fits in a standard 64-bit floating-point number. Beyond that, the value exceeds the representable range (Infinity). The calculator uses BigInt for exact integer results above 20!.
What are factorials used for?
Factorials are fundamental in combinatorics (permutations, combinations), probability, Taylor series in calculus, and many areas of discrete mathematics.