Factorial Calculator
Calculate factorials (n!), permutations (nPr), and combinations (nCr).
Essential for probability and statistics.
Factorial (n!) is the product of all positive integers from 1 to n:
n! = n × (n-1) × (n-2) × ... × 2 × 1
By definition, 0! = 1.
Examples:
- 5! = 5 × 4 × 3 × 2 × 1 = 120
- 10! = 3,628,800
- 20! = 2,432,902,008,176,640,000
Permutations (nPr) — order matters:
P(n, r) = n! / (n - r)!
Example: How many ways can 3 people finish a race from 10 runners? P(10, 3) = 10! / 7! = 720
Combinations (nCr) — order doesn’t matter:
C(n, r) = n! / (r! × (n - r)!)
Example: How many ways can you choose 3 people from a group of 10? C(10, 3) = 10! / (3! × 7!) = 120
Key identities:
C(n, r) = C(n, n - r)P(n, r) = C(n, r) × r!C(n, 0) = C(n, n) = 1