Factorial Calculator (n!)
Compute n! for any non-negative integer. View the exact value, multiplication chain, digit count, and step-by-step breakdown instantly.
Calculating...
Enter a non-negative whole number and click Calculate Factorial to see n!, the multiplication chain, and steps.
What Is a Factorial?
A factorial of a non-negative integer n, written as n!, is the product of all positive integers from 1 up to n. Factorials appear in combinatorics, probability, algebra, and computer science whenever you count arrangements or permutations.
The classic example is ordering items. If you have 5 books, there are 5! = 120 different ways to arrange them on a shelf. As n grows, the factorial grows extremely fast, which is why large factorials are usually written in scientific notation.
Factorial Formula
By definition, 0! = 1 and 1! = 1. This convention makes many combinatorial formulas work cleanly.
How to Calculate n!
Start with 1 and multiply by every whole number from 2 up to n. For small values you can do this by hand. For example:
- 3! = 3 × 2 × 1 = 6
- 4! = 4 × 3 × 2 × 1 = 24
- 5! = 5 × 4 × 3 × 2 × 1 = 120
This calculator uses arbitrary-precision arithmetic so it can compute exact factorials up to 10,000!, then shows the full value, digit count, and scientific approximation.
Factorial Growth
Factorial values grow exponentially even for small inputs.
Factorial Table
| n | n! | Digits |
|---|---|---|
| 0 | 1 | 1 |
| 1 | 1 | 1 |
| 5 | 120 | 3 |
| 10 | 3,628,800 | 7 |
| 20 | 2,432,902,008,176,640,000 | 19 |
| 50 | ≈ 3.04 × 10⁶⁴ | 65 |
| 100 | ≈ 9.33 × 10¹⁵⁷ | 158 |
Factorial Calculator FAQ
What is a factorial? +
A factorial is the product of all positive integers from 1 up to a given number n. It is written as n! and is used to count permutations and arrangements.
How do I calculate n! by hand? +
Multiply every whole number from 1 to n together. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120.
What is 0!? +
0! equals 1 by definition. This convention makes combinatorial formulas consistent, especially when counting empty sets or zero-item arrangements.
Why does factorial grow so fast? +
Each step multiplies the previous result by a larger number, so the value increases exponentially. Even 20! is already over 2 quintillion.
What is the largest factorial this calculator can compute? +
This calculator computes exact factorials up to 10,000!. For larger inputs it returns an error because the result would contain tens of thousands of digits.
Where are factorials used? +
Factorials are used in permutations, combinations, probability distributions such as the binomial distribution, Taylor series, and many areas of discrete mathematics.
External Resources
Authoritative references for factorials and combinatorics.