Factorial Calculator
Calculate the factorial of any number instantly. Enter n to get the exact value of n! plus the digit count, with the multiplication clearly shown.
Updated 2026-06-14 · Free · No sign-up · Runs privately in your browser
Show the multiplication
How the Factorial Calculator Works
A factorial multiplies together every whole number from 1 up to your chosen number n. It is written with an exclamation mark: n!. This calculator returns the exact value of n!, even for large inputs, plus how many digits the answer has.
The Formula
n! = 1 × 2 × 3 × … × (n − 1) × n
By convention, 0! = 1 (the empty product). Each value can also be built from the one before it, since n! = n × (n − 1)!. The tool uses exact big-integer arithmetic so results never lose precision, no matter how large.
Worked Example
Calculate 6!:
| Step | Running product |
|---|---|
| 1 | 1 |
| 1 × 2 | 2 |
| 2 × 3 | 6 |
| 6 × 4 | 24 |
| 24 × 5 | 120 |
| 120 × 6 | 720 |
So 6! = 720. Notice how quickly the value climbs — by 10! the result is already 3,628,800.
Why Factorials Matter
Factorials count the number of ways to arrange things, which makes them essential in:
- Permutations — the number of orderings of n distinct items is exactly n!.
- Combinations — choosing items uses factorials in the formula n! ÷ (k!(n − k)!).
- Probability and statistics — many distributions and expansions rely on factorials.
- Computer science — recursion, dynamic programming, and complexity analysis frequently use them.
Because factorials grow so fast, even modest inputs produce enormous numbers — this tool shows the full exact value and its digit count.
Frequently asked questions
What is a factorial?+
The factorial of a whole number n, written n!, is the product of every whole number from 1 up to n. For example, 5! = 1x2x3x4x5 = 120.
What is 0 factorial?+
Zero factorial equals 1 by definition. This convention keeps formulas for permutations and combinations consistent and is the empty product.
What is 5 factorial?+
5! = 1 x 2 x 3 x 4 x 5 = 120. It represents the number of ways to arrange five distinct items in order.
How big can factorials get?+
Factorials grow extremely fast. 10! is over 3.6 million and 20! is more than 2 quintillion. This tool uses exact big-integer math to show every digit.
Where are factorials used?+
Factorials count arrangements and appear throughout probability, combinations, permutations, series expansions and many algorithms in computer science.