Calculate Factorial

Enter a non-negative integer (0-20):

What is a Factorial?

A factorial is the product of all positive integers less than or equal to a given number. It's denoted by an exclamation mark (!) after the number.

Factorial Formula

For any positive integer n:

n! = n × (n-1) × (n-2) × ... × 2 × 1

Special case:

0! = 1

Examples

n Calculation Result
0 0! = 1 1
1 1! = 1 1
3 3! = 3 × 2 × 1 6
5 5! = 5 × 4 × 3 × 2 × 1 120
10 10! = 10 × 9 × ... × 2 × 1 3,628,800

Applications of Factorials

  • 🔢 Combinatorics: Counting arrangements and selections
  • 🎲 Probability: Calculating odds and permutations
  • 📊 Statistics: Distribution calculations
  • 🔬 Mathematics: Series expansions and special functions
  • 💻 Computer Science: Algorithm analysis and complexity

Limitation Note

⚠️ Note: Factorials grow extremely large very quickly. This calculator is limited to n ≤ 20 to prevent overflow. For larger factorials, specialized mathematical software is recommended.

Interesting Facts

  • The factorial function grows faster than exponential functions
  • Factorials are used in the famous birthday problem
  • They appear in Taylor series expansions
  • The number 1 appears in every factorial greater than 1