The Fundamentals of the Factorial Operation
The factorial function, denoted by an exclamation mark (n!), is one of the most foundational operations in discrete mathematics, probability theory, and combinatorial analysis. The factorial of a non-negative integer n is defined as the product of all positive integers less than or equal to n: n! = n × (n-1) × (n-2) × … × 1. By convention, 0! = 1, which keeps formulas for binomial coefficients and series expansions consistent. The primary use of the factorial is counting permutations — the number of ways to arrange n distinct objects in a sequence.
Factorials grow extremely fast. While 5! = 120 and 10! = 3{,}628{,}800, by 171! the result exceeds the maximum value a standard 64-bit floating-point number can hold (about 10^(308)), causing overflow. This calculator's Integer Factorial mode supports exact results for n from 0 to 170; beyond that it reports the overflow and falls back to Stirling's approximation.