ALGEBRAArithmeticMathematics Calculator
!

Factorial: n! = nƗ(nāˆ’1)Ɨ...Ɨ1

n! is the product of all positive integers from 1 to n. 0! = 1 by convention. Used in permutations (n!), combinations (n!/(k!(nāˆ’k)!)), and probability. Stirling approximation for large n.

Concept Fundamentals
n! = nƗ(nāˆ’1)Ɨ...Ɨ1
Definition
1 (convention)
0!
n! arrangements
Permutations
n! ā‰ˆ √(2Ļ€n)(n/e)ⁿ
Stirling
Calculate FactorialEnter n for n!

Why This Mathematical Concept Matters

Why: Factorial counts arrangements: n! ways to order n distinct items. Appears in permutations, combinations, Taylor series (e^x), and probability (binomial).

How: Multiply 1Ɨ2Ɨ3Ɨ...Ɨn. For large n, use Stirling: n! ā‰ˆ √(2Ļ€n)(n/e)^n. 0! = 1. Negative factorial is undefined.

  • ā—n! grows very fast: 10! = 3,628,800.
  • ā—Permutations of n objects = n!.
  • ā—Stirling: n! ~ √(2Ļ€n)(n/e)^n as nā†’āˆž.

šŸ“ Examples — Click to Load

factorial.sh
CALCULATED
$ factorial --n=5 --mode=standard
n!
120
n!!
15
!n
44
Factorial Calculator
5! = 120
5!! = 15
numbervibe.com
Share:

Factorial Growth

Result Magnitude

šŸ“ Step-by-Step Breakdown

SETUP
Identify n
n = 5
METHOD
Expand
5! = 5 Ɨ 4 Ɨ 3 Ɨ ... Ɨ 2 Ɨ 1
RESULT
Result
5! = 120
Double factorial
5!! = 15
n imes (n-2) imes ... imes 1 ext{or} 2
Subfactorial
!5 = 44
ext{Derangements} ( ext{no} ext{fixed} ext{points})

āš ļøFor educational and informational purposes only. Verify with a qualified professional.

🧮 Fascinating Math Facts

šŸ“

0! = 1 by convention. n! = n Ɨ (nāˆ’1)!.

šŸ”¢

Permutations: P(n,r) = n!/(nāˆ’r)!.

šŸ“‹ Key Takeaways

  • • n! = n Ɨ (n-1) Ɨ ... Ɨ 1. By convention, 0! = 1 and 1! = 1
  • • Factorials grow extremely fast: 10! ā‰ˆ 3.6 million, 70! exceeds 10^100
  • • Double factorial n!! multiplies every 2nd number down to 1 or 2
  • • Subfactorial !n counts derangements (permutations with no fixed points)
  • • Stirling's approximation: n! ā‰ˆ √(2Ļ€n) Ɨ (n/e)^n — accurate for large n

šŸ’” Did You Know?

šŸ“5! = 120 equals the number of ways to arrange 5 distinct objects in a row.Source: Combinatorics
ā±ļø10! = 3,628,800 seconds is exactly 6 weeks.Source: Time Conversion
šŸŽ²Factorials appear in permutations, combinations, and probability.Source: Probability
šŸ“ˆFactorial growth is faster than exponential — 20! has 19 digits.Source: Growth Rates
šŸ”¬Stirling's formula gives <1% error for n ≄ 10.Source: Approximation
šŸ“šThe gamma function Ī“(n+1) = n! extends factorials to real numbers.Source: Analysis

šŸ“– How It Works

n! is the product of all positive integers from 1 to n. By definition, 0! = 1 (empty product). For large n, we use BigInt for exact values up to 170!. Stirling's approximation gives estimates for n > 100.

šŸ“ Worked Example: 5!

Expand: 5! = 5 Ɨ 4 Ɨ 3 Ɨ 2 Ɨ 1

Step 1: 5 Ɨ 4 = 20

Step 2: 20 Ɨ 3 = 60

Step 3: 60 Ɨ 2 = 120

Result: 5! = 120

Interpretation: 120 ways to arrange 5 distinct objects.

šŸš€ Real-World Applications

šŸŽ² Permutations

Ways to arrange n distinct objects: n!

šŸ”¢ Combinations

C(n,k) = n!/(k!(n-k)!)

šŸ“Š Probability

Counting arrangements in probability.

šŸ”¬ Taylor Series

e^x = Σ x^n/n!

šŸ“ Combinatorics

Counting problems, partitions.

šŸ’» Algorithms

Complexity of sorting, permutations.

āš ļø Common Mistakes to Avoid

  • Negative factorial: n! is undefined for n < 0. Use gamma function for non-integers.
  • 0! = 0: Wrong. 0! = 1 by convention (empty product, recursive definition).
  • Confusing n! and n!!: n!! is double factorial — multiplies every 2nd number.
  • Overflow: 171! exceeds JavaScript number precision. Use Stirling for large n.
  • Trailing zeros: Count = floor(n/5) + floor(n/25) + floor(n/125) + ...

šŸŽÆ Expert Tips

šŸ’” Stirling for Large n

For n > 100, exact factorial exceeds precision. Use Stirling's approximation.

šŸ’” Double Factorial

8!! = 8Ɨ6Ɨ4Ɨ2 = 384. For odd n: 7!! = 7Ɨ5Ɨ3Ɨ1 = 105.

šŸ’” Trailing Zeros

Number of trailing zeros in n! = floor(n/5) + floor(n/25) + ...

šŸ’” Binomial Link

C(n,k) = n!/(k!(n-k)!). Factorials are essential for combinatorics.

šŸ“Š Reference Table

nn!
01
11
22
36
424
5120
6720
75040
840320
9362880
103628800

šŸ“ Quick Reference

0!
= 1
5!
= 120
10!
= 3,628,800
170!
Max exact

šŸŽ“ Practice Problems

6! = ? Answer: 720
Trailing zeros in 25!? Answer: 6
C(5,2) = 5!/(2!3!) = ? Answer: 10
!4 (derangements) = ? Answer: 9

ā“ FAQ

Why is 0! = 1?

By convention, to make formulas like C(n,0)=1 and the empty product consistent. It also fits n! = n Ɨ (n-1)! when n=1.

What is the largest factorial I can compute exactly?

170! is the largest that fits in a 64-bit double. This calculator uses BigInt for exact values up to 170!.

When to use Stirling's approximation?

For n > 100 when you need an estimate. Error drops below 1% for n ≄ 10 and below 0.1% for n ≄ 50.

What is a derangement?

A permutation where no element stays in its original position. !n counts derangements of n objects.

How many trailing zeros does 100! have?

floor(100/5) + floor(100/25) = 20 + 4 = 24 trailing zeros.

What is double factorial?

n!! = n Ɨ (n-2) Ɨ ... Ɨ 1 (odd n) or Ɨ 2 (even n). 8!! = 8Ɨ6Ɨ4Ɨ2 = 384.

Can I compute factorial of a decimal?

Not directly. Use the gamma function: Ī“(n+1) = n! for real n.

šŸ“Œ Summary

n! = n Ɨ (n-1) Ɨ ... Ɨ 1 with 0! = 1. Factorials count permutations and appear in combinations, probability, and series. Use Stirling for large n. Double and subfactorial extend the concept.

āœ… Verification Tip

Check n! = n Ɨ (n-1)!. For small n, multiply manually. Compare Stirling with exact for n ≤ 170.

šŸ”— Next Steps

Explore the Permutation Calculator, Combination Calculator, or Multifactorial Calculator for n!!, n!!!, n!!!!.

āš ļø Disclaimer: For educational use. Exact factorials use BigInt; Stirling for large n. Not for cryptographic applications.

šŸ‘ˆ START HERE
ā¬…ļøJump in and explore the concept!
AI