Calculate Factorial

Calculator and formula for computing the factorial x!

Factorial Calculator

Factorial function

Computes the product of all natural numbers from 1 up to the given argument. Important in combinatorics.

Enter argument
!
Integer between 0 and 170
Calculation result
Factorial:
Calculation: n! = 1 × 2 × 3 × ... × n

Factorial Info

Properties

Factorial: Product of all natural numbers up to n

Combinatorics Permutation n!

Domain: Natural numbers only (0, 1, 2, 3, ...)
Limit: Up to 170! (due to system limits)

Examples
4! = 1×2×3×4 = 24
5! = 1×2×3×4×5 = 120
0! = 1 (by definition)


Formulas for factorial

Basic definition
\[n! = 1 \times 2 \times 3 \times \ldots \times n\]

Product of all natural numbers from 1 to n

Mathematical notation
\[n! = \prod_{k=1}^{n} k\]

Product notation with the product symbol

Recursive definition
\[n! = n \times (n-1)!\] \[0! = 1\]

Recursive computation with base case

Stirling approximation
\[n! \approx \sqrt{2\pi n} \left(\frac{n}{e}\right)^n\]

Approximation formula for large n

Calculation examples for factorial

Example 1: Small factorials
Compute 6!
6! = 1×2×3×4×5×6
= 6×24 = 120×6
\[6! = 720\]

Result: 720

Example 2: Combinatorics application
Competition with 6 participants
Possible orderings:
Place 1: 6 choices
Place 2: 5 choices
etc...
\[\text{Total: } 6! = 720\]

720 different finish orders possible

Step-by-step calculation of 5!
5! = 5×4!
4! = 4×3!
3! = 3×2!
2! = 2×1!
1! = 1
= 120

Recursive computation from the inside out

Applications of factorial

The factorial is fundamental in mathematics and has many applications:

Combinatorics
  • Permutations (arrangements)
  • Compute combinations
  • Probability theory
  • Binomial coefficients
Analysis & Algebra
  • Taylor series expansion
  • Gamma function
  • Power series
  • Differential equations
Computer Science
  • Algorithm analysis
  • Complexity theory
  • Sorting algorithms
  • Recursive programming
Practical applications
  • Tournament results
  • Seating arrangements planning
  • Lottery calculations
  • Coding theory

Factorial: Foundation of combinatorics

The factorial is one of the fundamental functions in mathematics. It assigns to each natural number the product of all positive integers not exceeding it. The exclamation mark (!) as notation makes the factorial one of the most recognizable mathematical symbols and highlights its central role in enumerative combinatorics.

Properties
  • Rapidly growing function
  • Defined only for natural numbers
  • 0! = 1 by definition
  • Computable recursively
Significance
  • Number of permutations
  • Basis for combinations
  • Probability calculations
  • Mathematical analysis
Special notes
  • Exponential growth
  • Large numbers for small n
  • System limits for n > 170
  • Stirling approximation for large n
Summary

The factorial links elementary multiplication with combinatorics. The simple definition — product of all natural numbers up to n — enables solutions to a wide range of mathematical problems. From counting arrangements to probability calculations and advanced mathematical theories, the factorial remains an indispensable tool. It demonstrates how simple arithmetic operations give rise to powerful mathematical structures.