Factorial Calculator (n!)
Calculate the factorial of a number n! = n × (n-1) × (n-2) × … × 1
Solution Steps
Common Factorial Problems
Click on any example to see the calculation and solution:
Factorial Calculator n!
Factorial Calculator n! is a simple yet powerful tool that helps you calculate the factorial of any number n in seconds. Instead of multiplying numbers manually, this calculator instantly gives you both the long integer result and its scientific notation — ideal for large values of n! that quickly grow beyond standard calculator limits.
What Is a Factorial (n!)?
In mathematics, a factorial is a function that multiplies a number by every positive integer below it. It is denoted by an exclamation mark (!).
For any positive integer n:
n! = n × (n − 1) × (n − 2) × (n − 3) × … × 1
By definition, 0! = 1.
This concept is fundamental in combinatorics, probability, and algebra — often used to calculate permutations, combinations, and other discrete mathematics problems.
For example:
5! = 5 × 4 × 3 × 2 × 1 = 120
The Factorial Calculator n! helps you compute such results instantly, even for very large inputs.
How to Use the Factorial Calculator n!
Using the calculator is straightforward:
- Enter an integer n (up to 5 digits long).
- Press Calculate.
- Instantly view:
- The exact factorial value (n!)
- The scientific notation for large results
Large factorials can be extremely long. For instance, 100! has 158 digits. That’s why the calculator also shows the number in scientific notation for easier reading or scientific applications.
Formula for Factorial n
The general formula is:
n! = n × (n − 1) × (n − 2) × … × 3 × 2 × 1
This recursive formula can also be expressed as:
n! = n × (n − 1)!
and by convention:
0! = 1
Examples of Factorial Calculations
Example 1: 10 Factorial (10!)
10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1
10! = 3,628,800
Example 2: 8 Factorial (8!)
8! = 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1
8! = 40,320
Example 3: Factorial of 0
0! = 1 (by definition)
Factorial Table (1! to 20!)
Below is a reference table of common factorial values:
| n | n! Value |
|---|---|
| 0 | 1 |
| 1 | 1 |
| 2 | 2 |
| 3 | 6 |
| 4 | 24 |
| 5 | 120 |
| 6 | 720 |
| 7 | 5,040 |
| 8 | 40,320 |
| 9 | 362,880 |
| 10 | 3,628,800 |
| 11 | 39,916,800 |
| 12 | 479,001,600 |
| 13 | 6,227,020,800 |
| 14 | 87,178,291,200 |
| 15 | 1,307,674,368,000 |
| 16 | 20,922,789,888,000 |
| 17 | 355,687,428,096,000 |
| 18 | 6,402,373,705,728,000 |
| 19 | 121,645,100,408,832,000 |
| 20 | 2,432,902,008,176,640,000 |
As you can see, factorials increase rapidly with each step — a pattern known as factorial growth.
Applications of Factorials
Factorials are essential in many branches of mathematics and science, including:
1. Permutations
They count how many different ways objects can be arranged.
For n unique items, the number of possible arrangements is n!.
Explore more about this concept with the Permutations Calculator.
2. Combinations
Used when the order of objects doesn’t matter. The number of combinations of n items taken r at a time is:
C(n, r) = n! / (r! × (n − r)!)
You can practice this with the Combinations Calculator.
3. Pascal’s Triangle and the Binomial Theorem
Factorials appear in binomial coefficients — the heart of Pascal’s Triangle.
Explore this relationship using the Pascal’s Triangle Calculator.
Understanding Factorials Through Arrangements
There are n! ways to arrange n distinct objects into a sequence.
For example:
- 2! = 2 × 1 = 2 → Two ways to arrange {1, 2}: {1, 2}, {2, 1}
- 4! = 24 → Twenty-four ways to arrange {1, 2, 3, 4}
- 5! = 120 → 120 unique orderings of 5 items
Factorial in Word Problems
Problem 1
How many ways can you arrange the letters in the word “document”?
It has 8 distinct letters.
So, 8! = 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 40,320
Problem 2
How many arrangements for the word “physics”?
There are 7 letters, but “s” repeats twice.
To adjust for duplicates, divide by 2!:
7! / 2! = (7 × 6 × 5 × 4 × 3 × 2 × 1) / (2 × 1) = 2,520
Problem 3
For the word “little” (6 letters, two Ls and two Ts):
6! / (2! × 2!) = 720 / 4 = 180
This method generalizes to any case where duplicates exist — divide n! by the product of factorials of each group of identical items.
Factorial Growth and Limitations
Factorial numbers grow faster than exponential functions.
For instance:
- 10! = 3.6 × 10⁶
- 20! = 2.4 × 10¹⁸
- 50! ≈ 3.0 × 10⁶⁴
Because of this, factorials are used to test the limits of computational mathematics, probability modeling, and algorithm efficiency.
The Factorial Calculator n! is especially useful when you need to compute these enormous values quickly and accurately.
Scientific Notation for Large Factorials
When results exceed standard numerical limits, it’s more practical to represent them using scientific notation.
For example:
100! ≈ 9.3326 × 10¹⁵⁷
This notation keeps numbers manageable and is commonly used in physics, computer science, and large-scale probability computations.
Factorial in Combinatorics and Probability
Factorials form the foundation of combinatorial expressions:
- Permutations: P(n, r) = n! / (n − r)!
- Combinations: C(n, r) = n! / (r! × (n − r)!)
- Binomial Coefficients: Used in expanding (a + b)ⁿ
These relationships allow mathematicians to count possibilities efficiently — whether it’s the number of ways to shuffle cards or assign passwords.
Factorial Calculator n! in Computer Science
Factorials are a classic example of recursion in programming. The recursive definition:
function factorial(n):
if n == 0:
return 1
else:
return n * factorial(n - 1)
This logic is widely used in coding exercises and algorithm design, helping programmers understand stack behavior and recursion depth.
Factorials in Real-World Scenarios
Beyond mathematics, factorials appear in real applications such as:
- Probability and statistics: Calculating likelihoods in random events.
- Data arrangement and encryption: Counting unique orderings or hash possibilities.
- Scientific modeling: Estimating permutations in molecules or particle interactions.
Related Calculators on CalculatorCave
If you’re exploring factorials, you may also find these tools useful:
- Fibonacci Calculator — study number sequences connected to combinatorics.
- Multi-Factorials Calculator — explore double and triple factorials.
- Math Calculators Collection — access general mathematical tools for advanced computation.
Key Takeaways
- The Factorial Calculator n! computes factorials instantly — both full value and scientific form.
- Factorials represent the number of possible arrangements of n objects.
- The function grows extremely fast: n! = n × (n − 1) × (n − 2) × … × 1.
- Applications include permutations, combinations, and probability theory.
- The calculator is essential for students, mathematicians, and data scientists who need precise results for large numbers.
The factorial might seem simple, but it underpins vast areas of mathematics — from combinatorial counting to algorithm design.
With the Factorial Calculator n!, you can explore these concepts interactively, understand factorial growth intuitively, and apply it to both academic and real-world problems.
Factorials aren’t just about big numbers — they’re about understanding how structure and order emerge from possibility.
References
[1] For more information on factorials please see the Factorial page at Wolfram MathWorld.
See also the Multifactorial Calculator to compute n! to n!!!!!
