Home Math & Science Factorial Calculator

Factorial Calculator

Calculate n! (n factorial) — the product of all positive integers up to n. Supports values up to 170 (JavaScript number-precision limit).

Inputs

n!
Number of digits
Scientific notation
Stirling approximation

About Factorial Calculator

What is a factorial?

n! = n × (n−1) × (n−2) × … × 1. Special case: 0! = 1 (by convention, useful for empty-product definitions and combinatorial formulas).

Why precision caps at 170!

JavaScript numbers are 64-bit floats. 170! is about 7×10³⁰⁶, near the maximum representable. 171! overflows to Infinity. For larger values you’d need BigInt arithmetic.

Where factorials show up

Permutations (n!), combinations (C(n,k) = n!/(k!(n−k)!)), Taylor series for e^x and sin/cos, probability distributions like Poisson, and many counting problems.