What Are Permutations and Combinations?
Permutations and combinations are the two basic ways of counting how many ways you can choose items from a set. The difference comes down to one question: does the order matter?
- Permutation (nPr): order matters. Choosing a president, secretary and treasurer from 10 people is a permutation, because Alice-Bob-Carol is different from Carol-Bob-Alice. So is a PIN or the finishing order of a race.
- Combination (nCr): order doesn't matter. Choosing 3 people for a committee is a combination, because the same three people are the same committee in any order. Lottery draws, pizza toppings and poker hands are combinations.
This calculator computes both, exactly, even when the answer has thousands of digits. It also covers the "with repetition" versions, where the same item can be chosen more than once, as in a combination lock or scoops of ice cream.
How to Use the Calculator
- Enter n, the total number of distinct items to choose from.
- Enter r, how many items are chosen.
- Read all four results: permutations and combinations, with and without repetition.
- Check the working to see the factorial formula applied.
- List arrangements: type your own items (e.g. names or letters) to see every permutation or combination written out, up to 1,000.
Formulas
| Without repetition | With repetition | |
|---|---|---|
| Permutations (order matters) | P(n, r) = n! / (n − r)! | nr |
| Combinations (order doesn't matter) | C(n, r) = n! / (r! (n − r)!) | C(n + r − 1, r) |
Here "!" means factorial: 5! = 5 × 4 × 3 × 2 × 1 = 120, and 0! = 1. You never need to compute the full factorials: P(10, 3) is just 10 × 9 × 8 = 720, and C(10, 3) = 720 ÷ 3! = 720 ÷ 6 = 120. The calculator uses this shortcut, so even C(5000, 2500) is instant.
Worked Examples
- Race podium: 8 runners, gold, silver and bronze. P(8, 3) = 8 × 7 × 6 = 336 possible podiums.
- Committee: choose 3 from 8 people. C(8, 3) = 336 ÷ 6 = 56 committees.
- Lottery 6/49: C(49, 6) = 13,983,816. Your chance with one ticket is about 1 in 14 million.
- 4-digit PIN: 10 digits, repeats allowed, order matters: 104 = 10,000.
- Ice cream: 3 scoops from 5 flavours, repeats allowed, order doesn't matter: C(7, 3) = 35.
- Poker hands: C(52, 5) = 2,598,960 possible five-card hands.
The Relationship Between nPr and nCr
Every combination of r items can be arranged in r! different orders, so P(n, r) = C(n, r) × r!. For example, each 3-person committee can fill the three officer roles in 3! = 6 ways, which is why there are 6 times as many permutations as combinations. Combinations are also the numbers in Pascal's triangle and the coefficients in the binomial theorem: C(n, r) is the coefficient of xr in (1 + x)n. They're symmetric too: C(n, r) = C(n, n − r), because choosing 3 to include is the same as choosing 7 to leave out of 10.
Features
- Exact resultsBigInt arithmetic for huge counts.
- Four formulasWith and without repetition.
- Step-by-stepFactorial working explained.
- Arrangement listerSee every permutation or combination.
- Scientific notationFor very large answers.
- Copy resultsExport listed arrangements.
Probability with Combinations
Combinations turn directly into probabilities: the chance of an outcome equals the number of favourable combinations divided by the total. For example, the probability of being dealt four aces in a five-card hand is C(4,4) × C(48,1) / C(52,5) = 48 / 2,598,960 ≈ 1 in 54,145.
Frequently Asked Questions
How do I know whether to use a permutation or a combination?
Ask whether rearranging the chosen items creates a different outcome. If yes (rankings, codes, seating), it's a permutation. If no (groups, hands, selections), it's a combination.
What is 5C2?
C(5, 2) = 5! / (2! × 3!) = 10.
What is 0! and why is it 1?
There is exactly one way to arrange nothing, and defining 0! = 1 keeps formulas like C(n, n) = 1 working.
Can r be larger than n?
Not without repetition: you can't choose 5 different items from 3, so the answer is 0. With repetition, yes.
Is a combination lock really a combination?
No! Order matters and digits can repeat, so mathematically it's a permutation with repetition.