← All tools
// Number / Math

Factorial Calculator online

Calculate n! — exact result for large numbers using BigInt

Factorial Calculator logo
by
CHUNKY
MUNSTER
!

How to Use factorial-calculator

  1. Enter a non-negative integer in the input field.
  2. The factorial is calculated instantly and displayed in full.
  3. For large n, the result scrolls — copy it for use in combinatorics or probability.
  4. The result shows the digit count as a convenient indicator of magnitude.

The factorial of n (written n!) is the product of all positive integers from 1 to n: 5! = 5 × 4 × 3 × 2 × 1 = 120. Factorials grow extremely rapidly — 20! is 2,432,902,008,176,640,000 (18 digits) and 100! has 158 digits. This calculator uses JavaScript BigInt to compute exact results without floating-point overflow, handling inputs up to several hundred.

Where Factorials Appear

Factorials are the foundation of combinatorics. The number of ways to arrange n distinct items is n! (permutations). Combinations (choosing r items from n without order) use C(n,r) = n! / (r! × (n−r)!). Factorials appear in Taylor series expansions, the Gamma function, Stirling's approximation, and in probability distributions like the Poisson and binomial. The seemingly simple operation has deep mathematical significance.

Frequently Asked Questions

What is 0! (zero factorial)?

By definition, 0! = 1. This is not a convention — it follows from the combinatorial interpretation: there is exactly one way to arrange zero objects (doing nothing).

How fast does factorial grow?

Extremely fast. 10! = 3,628,800. 20! ≈ 2.4 × 10¹⁸. 100! ≈ 9.3 × 10¹⁵⁷. 1000! has 2,568 digits. Factorial growth is much faster than exponential growth.

What is Stirling's approximation?

For large n, n! ≈ √(2πn) × (n/e)ⁿ. This provides a closed-form approximation that is accurate to within 1% for n ≥ 10 and becomes more accurate as n grows. Useful when you only need the order of magnitude.

Is there a factorial for non-integers?

Yes — the Gamma function extends factorial to all complex numbers except negative integers: Γ(n) = (n−1)!. So Γ(1.5) = 0.5! ≈ 0.886. This appears in statistics (the Gamma distribution) and physics.

See also the GCD/LCM Calculator, Fraction Calculator, and the Average Calculator.