Factorial Calculator
Calculate n! (n factorial) for any non-negative integer. See the full expansion, digit count, and applications in permutations and combinations.
β Factorial Calculator
Result
Related
π‘ What is a Factorial and What is it Used For?
The factorial of a non-negative integer n, written as n!, is the product of all positive integers from 1 to n. For example, 5! = 5 Γ 4 Γ 3 Γ 2 Γ 1 = 120. By convention, 0! = 1. Factorials grow extraordinarily fast β 10! = 3,628,800 and 20! = 2,432,902,008,176,640,000 (over 2.4 quintillion).
Factorials are the foundation of combinatorics β the mathematics of counting. Permutations (ordered arrangements) use the formula P(n,r) = n!/(nβr)!, and combinations (unordered selections) use C(n,r) = n!/(r!(nβr)!). These formulas appear in probability theory, statistics, computer science algorithms, and even card games and lottery calculations.
Stirling's approximation (n! β β(2Οn) Γ (n/e)βΏ) is used to estimate factorials of very large numbers. The gamma function Ξ(n) = (nβ1)! extends factorials to non-integer and even complex numbers, which is essential in advanced mathematics, physics, and engineering.
Where:
- n! = Product of all positive integers from 1 to n
- 0! = Defined as 1 (by convention)
- P(n,r) = Permutations = n!/(nβr)!
- C(n,r) = Combinations = n!/(r!(nβr)!)
π Worked Example
6!
6 Γ 5 Γ 4 Γ 3 Γ 2 Γ 1= 720
C(10, 3) β choose 3 from 10
10! / (3! Γ 7!) = 720/(6Γ5040)= 120 ways