Factorial Calculator

Calculate the factorial of a number with exact precision, even for very large values. No sign-up, instant results. For permutations (nPr) and combinations (nCr), use the permutation calculator.

Factorial calculator

n! 0

What is a factorial

The factorial of a positive whole number n, written as n!, is the product of every integer from 1 up to n. For example, 5! equals 5 × 4 × 3 × 2 × 1, which is 120. Factorials grow extremely fast: 10! already passes 3 million, and 20! has 19 digits. This calculator uses arbitrary-precision arithmetic internally, so the result is always exact, even for numbers with thousands of digits.

Why 0! equals 1

By convention, 0! is defined as 1. This definition doesn't come from an actual multiplication, but from keeping formulas that use factorials, like permutations and combinations, consistent even when one of the terms involved is zero.

Where the factorial shows up

Besides standing on its own, the factorial is the foundation of formulas like permutations and combinations, used to count arrangements and groupings of items. For those ready-made calculations, use the permutation calculator.

Practical example

In a tournament with 20 teams, working out how many ways the teams could be ranked from first to last place involves 20!, a number with 19 digits: 2,432,902,008,176,640,000.

Frequently asked questions

What is a factorial?

It's the product of every positive whole number from 1 up to the given number. The factorial of 5, for example, is 120.

What is 0 factorial?

0! equals 1, by mathematical convention.

Why does the factorial grow so fast?

Because each term multiplies the previous result by an ever larger number. From 10! to 20!, the result jumps from just over 3 million to more than 2 quintillion.