Skip to content
Calcrivo

Factorial Calculator

Compute n! exactly using BigInt for arbitrarily large results up to 1000!.

Inputs

Non-negative integer (0–1000). Results are computed exactly using BigInt.

n!

3628800

Number of Digits

7

Stirling Approximation

≈ 10^6.56

Step by step

  1. Definition

    10! = 10 × 9 × ... × 2 × 1

  2. Result digits

    = 7

How it works

The factorial of a non-negative integer n, written n!, is the product of all positive integers from 1 to n. By convention, 0! = 1. Factorials grow extremely fast — 100! has 158 digits. This calculator uses BigInt arithmetic to produce exact results up to 1000! (2568 digits). It never returns Infinity or an approximation.

Formulas

Factorial definition

n! = n × (n−1) × (n−2) × ... × 2 × 1, with 0! = 1

n
Non-negative integer

Stirling approximation

n! ≈ √(2πn) × (n/e)^n

n
Large n
e
Euler's number ≈ 2.718

Frequently Asked Questions

Why is 0! equal to 1?

By convention and for consistency with the combinatorial formula: there is exactly one way to arrange zero objects (do nothing). It also ensures n! = n × (n−1)! works for n = 1.

Why cap the input at 1000?

1000! has 2568 digits. Beyond that, the string representation becomes impractically large for display. The computation itself is fast, but rendering thousands of digits offers little practical value.

You might also need