How to Calculate Permutations and Combinations (nPr, nCr and Factorials)
Learn the difference between ordered and unordered selections and compute nPr, nCr and n! with examples for lotteries, schedules and passwords.

Counting arrangements is the base of probability. The key question is simple: does order matter?
Quick answer
- If order matters, use permutations: nPr = n! ÷ (n − r)!
- If order does not matter, use combinations: nCr = n! ÷ (r! × (n − r)!)
Examples
Permutations. How many ways can 3 runners finish first, second and third out of 8? 8P3 = 8 × 7 × 6 = 336.
Combinations. How many ways to choose a committee of 3 from 8 people? 8C3 = 336 ÷ 6 = 56.
Factorial. 5! = 5 × 4 × 3 × 2 × 1 = 120.
Repeats allowed
- Permutations with repetition: n^r. A 4-digit PIN: 10⁴ = 10,000.
- Combinations with repetition: (n + r − 1) C r.
Using the calculator
- Enter n, the total number of items.
- Enter r, how many you choose.
- Read nPr, nCr, n! and the repeat counts.
Where it appears
- Lottery odds: a 6-from-49 lottery has 49C6 = 13,983,816 combinations.
- Scheduling: order of speakers at an event.
- Passwords and PINs: number of possible codes.
- Teams and committees.
Tips
- Factorials grow fast: 20! is over 2 quintillion; the tool handles large values.
- r cannot be greater than n unless repeats are allowed.
- Always decide first whether order matters.



