Factorial Calculator

Calculate factorials (n!), double factorials (n!!), and more.

Enter a non-negative integer or an expression like 5! or 10!! to calculate its value. See the step-by-step expansion and result.

Calculate Factorial

Enter a number or expression (e.g., 5, 5!, 6!!).
Result

Step-by-Step Solution

Expression:

Formula:

Final Result:

📖 The Logic of Permutations

The factorial of a non-negative integer , denoted by the symbol , represents the product of all positive integers less than or equal to . The term comes from the French mathematician Christian Kramp, who introduced the exclamation point notation in 1808.

Mathematically, factorials are defined recursively: , with the base cases of and . This recursive property makes them essential for solving complex series and sequences. Beyond integers, the concept is extended to complex numbers via the Gamma Function, a cornerstone of advanced analytic number theory.

🏗️ Real-World Applications

1. Combinatorics & Probability

Factorials are the engine behind combinations and permutations. Whether you are calculating the odds of winning the lottery or determining how many different ways a deck of cards can be shuffled, factorials provide the mathematical proof for the total number of possible outcomes.

2. Computer Science & Algorithmics

In computer science, factorials are often used to teach recursion. They also define the time complexity of certain algorithms, such as those solving the Traveling Salesperson Problem (TSP). Understanding factorial growth is essential for software engineers to avoid building systems that crash when dataset sizes increase.

3. Statistical Mechanics & Entropy

Physicists use factorials to calculate the entropy of a system. Boltzmann's entropy formula relies on the number of possible microstates for a set of particles, which is calculated using factorial-based permutations of energy states.

💡 Common Pitfalls

  • Explosive Growth: Factorials grow faster than exponential functions. While 5! is only 120, 20! is a number so large (over 2 quintillion) that it can cause integer overflow errors in standard 64-bit computer programs.
  • The Multi-Factorial Trap: Students often mistake the double factorial (n!!) for a factorial of a factorial (n!)!. A double factorial only multiplies every other number of the same parity. For example, 5!! is 5x3x1, not 120!.

🧠 Quick Quiz: Test Your Understanding

Answer the questions below.

1. What is 3! ?
2. What is 0! ?

📚 Frequently Asked Questions

📘 Summary

Factorials are fundamental in mathematics for counting arrangements and ordering. This calculator helps you compute standard and multi-factorials quickly.


Popular Calculators

Try our most used tools

View All Calculators
Quadratic Solver
Solve ax² + bx + c = 0 instantly with discriminant, roots, and graph.
Slope Calculator
Find the slope or gradient between two points with step-by-step explanation.
Percentage Calculator
Calculate the result of multiplying two percentages.
Digit Sum
Calculate the sum of digits of a number.