ADVERTISEMENT

Mobile Banner
320×100

Factorial Calculator

Calculate factorials (n!) for permutations, combinations, and probability

Factorial Formulas

Factorial Definition
Loading formula...
Recursive Form
Loading formula...
Special Cases
Loading formula...
!

What is a Factorial?

A factorial, denoted by n!, is the product of all positive integers from 1 to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. Factorials are fundamental in mathematics, particularly in counting, probability, and combinatorics.

The factorial function grows extremely rapidly. While 5! = 120, by the time you reach 10! you get 3,628,800, and 20! exceeds 2 quintillion. This rapid growth makes factorials important in complexity analysis and algorithm design.

By convention, 0! is defined as 1. This isn't intuitive, but it's necessary for many mathematical formulas to work correctly, especially in combinatorics where choosing 0 items from a set should give exactly 1 way (choosing nothing).

Applications of Factorials

🔢

Permutations

P(n,r) = n!/(n-r)! counts arrangements where order matters.

🎯

Combinations

C(n,r) = n!/[r!(n-r)!] counts selections where order doesn't matter.

🎲

Probability

Used in binomial distribution, Poisson distribution, and other probability calculations.

📈

Taylor Series

Factorials appear in denominators of Taylor series expansions for sin, cos, e^x.

Common Factorial Values

Here are the first 15 factorial values for quick reference:

nn!DigitsUses
0 1 1 By definition
1 1 1 Base case
5 120 3 Hand arrangements
7 5,040 4 Week permutations
10 3,628,800 7 Digit arrangements
12 479,001,600 9 Month permutations
15 1,307,674,368,000 13 Large calculations

Important Factorial Properties

🔄

Recursive Property

n! = n × (n-1)!. This property is useful for computing factorials programmatically and understanding factorial relationships.

📊

Stirling's Approximation

For large n: n! ≈ √(2πn)(n/e)^n. This approximation is useful when exact factorials are too large to compute.

0️⃣

Trailing Zeros

The number of trailing zeros in n! equals floor(n/5) + floor(n/25) + floor(n/125) + ... This counts how many times 10 divides n!.

Gamma Function

Factorials extend to non-integers via Γ(n+1) = n!. The gamma function allows factorial-like calculations for any positive real number.

Frequently Asked Questions

Why is 0! equal to 1?

By convention and for mathematical consistency. The empty product (multiplying no numbers) is 1, and this makes formulas like C(n,0) = n!/(0!×n!) = 1 work correctly.

Can you calculate factorial of negative numbers?

No, factorials are only defined for non-negative integers. However, the gamma function Γ(n) extends the concept to complex numbers except negative integers.

What's the largest factorial a calculator can handle?

Most calculators overflow around 170! which exceeds 10^300. This calculator uses special techniques to display larger factorials as scientific notation.

How do I calculate double factorial?

Double factorial n!! means multiplying every other number: 7!! = 7×5×3×1 = 105. It's not (n!)! but a separate operation used in combinatorics.

Pro Tips

  • Bookmark this calculator for quick access in the future
  • Use the share button to send your results to others
  • Try different scenarios to compare outcomes
  • Check out our related calculators for more insights

Found this calculator helpful? Share it with others: