Factorial Calculator (n!)

n! = 1 × 2 × … × n. Computes exactly up to 21! (number limit); approximate via Stirling for larger.

Inputs

Result

n!
3628800
Exact value.
  • n10
  • Exact n!3628800
  • Approx digits7
  • Stirling ln(n!)15.0961
  • log10(n!) approx6.5561

Step-by-step

  1. n! = 1 × 2 × … × 10 = 3628800.
  2. Stirling: ln(n!) ≈ n ln n − n + ½ ln(2πn) = 15.0961.
  3. n! has approximately 7 digits.

How to use this calculator

  • Enter n (0 to 200 or so).
  • Read exact value or Stirling approximation.

About this calculator

n! ("n factorial") is the product of all positive integers up to n. 5! = 120; 10! = 3,628,800; 21! = 51,090,942,171,709,440,000 (last one fitting in JS Number). For larger n, this calculator uses Stirling's approximation: ln(n!) ≈ n ln n − n + ½ ln(2πn), accurate to <1% for n > 5. Factorials grow superexponentially: 100! has 158 digits, 1000! has 2568. Used in combinatorics (permutations), Taylor series, probability.

Frequently asked

JavaScript Number is IEEE 754 double — 53-bit precision. 21! = 5.1 × 10^19, just past 2^53. Larger values lose precision.

Related calculators