This permutation and combination calculator finds how many ways you can choose r items from a set of n, both when order matters (permutations, nPr) and when it does not (combinations, nCr). It works with or without repetition and gives exact results even for very large numbers.
Formulas
| Order matters (permutation) | Order does not matter (combination) | |
|---|---|---|
| No repetition | nPr = n! ÷ (n − r)! | nCr = n! ÷ (r! × (n − r)!) |
| Repetition allowed | nʳ | (n + r − 1)! ÷ (r! × (n − 1)!) |
n! (n factorial) means n × (n − 1) × … × 1, and 0! = 1.
Permutation or combination?
- Permutation: arranging people in a line, assigning first, second and third prize, or creating a PIN code. ABC and CBA are different.
- Combination: choosing a committee, picking lottery numbers or selecting pizza toppings. ABC and CBA are the same group.
Worked example
From 10 runners, there are 10 × 9 × 8 = 720 ways to award gold, silver and bronze (permutations), but only 720 ÷ 3! = 120 ways to choose a group of three (combinations).
A 4-digit PIN using digits 0–9 with repetition allowed has 10⁴ = 10,000 permutations.
Frequently asked questions
What is the difference between a permutation and a combination?
In a permutation the order of the chosen items matters; in a combination it does not. That is why there are always at least as many permutations as combinations.
How many combinations does a 6/49 lottery have?
Choosing 6 numbers from 49 without repetition gives 49C6 = 13,983,816 combinations.
What is 0 factorial?
0! is defined as 1. That keeps the formulas consistent, for example nC0 = 1 and nCn = 1.
Can r be larger than n?
Only when repetition is allowed. Without repetition you cannot choose more items than you have.
Why does the calculator show scientific notation?
For very large answers it shows the leading digits and the power of ten, plus the total number of digits, so the result stays readable.
Related calculators
Last reviewed: October 2026.