Skip to content
Math & Stats

Factorial Calculator

Calculate the factorial (n!) of any non-negative integer instantly. Get the exact value using BigInt math plus the total digit count, for n up to 2000.

Factorial Calculator

Method

How this calculator works

The factorial of n is n! = n × (n − 1) × (n − 2) × … × 2 × 1, with the special case 0! = 1. This calculator multiplies each integer in that chain using exact BigInt arithmetic.

  1. Enter a non-negative whole number n (for example 6) in the input field.
  2. Click Calculate, or simply type — the result updates automatically.
  3. Read the exact factorial value in the large result panel, along with its total digit count.

Examples

Worked examples

Real numbers, end-to-end results.

5!

= 120

5 × 4 × 3 × 2 × 1 = 120.

0!

= 1

The factorial of zero is defined as 1.

10!

= 3,628,800

A 7-digit number produced from just ten factors.

Use cases

When to use it

  • Counting permutations and arrangements in probability and combinatorics.
  • Computing binomial coefficients for statistics and the binomial theorem.
  • Evaluating terms in Taylor and Maclaurin series expansions.
  • Checking homework and exam answers in discrete mathematics.

FAQ

Frequently asked questions

What is a factorial?
A factorial, written n!, is the product of every positive integer from 1 up to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. It counts the number of ways to arrange n distinct objects in order.
What is 0 factorial?
By definition, 0! equals 1. There is exactly one way to arrange zero objects — the empty arrangement — so mathematicians define the empty product as 1 to keep formulas consistent.
Can I calculate the factorial of a negative number or decimal?
Standard factorials are only defined for non-negative integers (0, 1, 2, 3, …). Factorials of negatives or decimals require the Gamma function, which this calculator does not compute. Enter a whole number of 0 or greater.
Why is there a limit of 2000?
Factorials grow astronomically fast — 2000! already has 5,736 digits. Capping the input keeps the calculation instant and prevents your browser from freezing while multiplying enormous numbers.
How is the exact value computed without rounding errors?
This tool uses JavaScript BigInt arithmetic, which stores integers of arbitrary size exactly. Unlike floating-point math, BigInt never loses precision, so even 1000! is returned digit-for-digit correct.