Factorial Calculator

Calculate n factorial (n!) exactly, even for large n with hundreds or thousands of digits, with the multiplication steps shown so you can see how the result was built.

n factorial

How to Calculate a Factorial

Enter any non-negative whole number to see n! and the multiplication that produces it.

1

Enter n

Type a non-negative whole number, like 5. Factorials are only defined for whole numbers zero and above.

2

The calculator multiplies 1 through n

It multiplies every whole number from 1 up to n together using exact BigInt arithmetic, so there is no rounding error even when n is large and the result has hundreds or thousands of digits.

3

Read the result and steps

The value of n! appears at the top, with the multiplication that produced it listed below. Looking for a different number-theory tool? The GCF Calculator finds the greatest common factor of a list of numbers.

Frequently Asked Questions

What is a factorial?
The factorial of a non-negative integer n, written n!, is the product of every whole number from 1 up to n. For example, 5! = 1 × 2 × 3 × 4 × 5 = 120. Factorials count the number of ways to arrange n distinct items in order, which is why they show up constantly in probability, combinatorics, and permutation problems.
What is 0 factorial?
0! = 1 by definition, not 0. This is a convention rather than something you multiply out: there is exactly one way to arrange zero items (the empty arrangement), so 0! is defined as 1 to keep formulas like combinations and permutations consistent for n = 0.
Why do factorials get so large so fast?
Each step multiplies the running product by a bigger number, so factorial growth compounds faster than exponential growth. 10! is already 3,628,800, 20! is over 2.4 quintillion, and 100! has 158 digits. Ordinary floating-point numbers lose precision well before that point, which is why this calculator uses exact BigInt arithmetic instead of standard JavaScript numbers.
Can this calculator handle very large factorials?
Yes. Because the calculator uses BigInt instead of floating-point numbers, it computes n! exactly with no rounding error, even for values of n in the thousands where the result has thousands of digits. Enter any non-negative whole number to see the exact result and the multiplication steps that produced it.