What Is Combinations and Permutations?
A combination is a selection of r items from a set of n where the order of selection is irrelevant: choosing a committee of 3 from 10 people is one combination whichever order you name them in. The count is written nCr, C(n, r) or "n choose r".
If order does matter, as with a podium finish or a password, the count is a permutation (nPr). Use the options above to switch between combinations and permutations, with or without repetition. The decision guide below explains which one a problem needs, and the examples show how nCr feeds into probability questions.
You will also find the formula for each case, a table of variables and a Pascal's triangle chart that shows where the values of C(n, r) come from.
How to Use the Combinations and Permutations Calculator
- Enter n, the total number of items to choose from, and r, the number you are choosing.
- Leave repetition off if each item can be used only once, such as dealing cards. Turn it on if items can be picked again, such as choosing ice-cream scoops from a fixed set of flavours.
- Read nCr and nPr in the results, and open the step-by-step solution to see the formula filled in.
Combinations and Permutations Formula
Combinations (no repetition)
Permutations (no repetition)
Combinations with repetition
Permutations with repetition
| Question to ask | Combination | Permutation |
|---|---|---|
| Does order matter? | No | Yes |
| Typical examples | Lottery numbers, committees, card hands | Race finishes, passwords, seating plans |
| Formula | n! ÷ (r! (n − r)!) | n! ÷ (n − r)! |
| Relative size | Smaller | Larger by a factor of r! |
Combinations and Permutations Variables Explained
| Symbol | Meaning | Notes |
|---|---|---|
| n | Total number of items to choose from | Whole number, n ≥ 0 |
| r | Number of items chosen | Without repetition, 0 ≤ r ≤ n |
| n! | n factorial | n × (n − 1) × … × 1, with 0! = 1 |
| nCr | Combinations (order ignored) | n! ÷ (r! (n − r)!) |
| nPr | Permutations (order counted) | n! ÷ (n − r)! |
Combinations and Permutations Worked Example
Using the example values (press “Load example” above to try them):
- Combinations: C(10, 3) = 10! ÷ (3! × 7!) = 10 × 9 × 8 ÷ 3 × 2 × 1 = 120.
- Permutations: P(10, 3) = 10! ÷ 7! = 10 × 9 × 8 = 720.
- Check: order matters for permutations, not for combinations, so P = C × r! = 120 × 6 = 720.
Result: Combinations C(n, r) = 120; Permutations P(n, r) = 720.
Combination or permutation? A decision guide
Ask yourself: if I swap two chosen items, do I get a different outcome? If yes, order matters and you want permutations. If no, you want combinations. A second question decides repetition: can the same item be chosen more than once?
| Order matters? | Repetition allowed? | Name | Formula | Example |
|---|---|---|---|---|
| No | No | Combination | n! ÷ (r!(n − r)!) | Choosing 3 team members from 10 |
| Yes | No | Permutation | n! ÷ (n − r)! | Gold, silver and bronze from 10 runners |
| No | Yes | Combination with repetition | (n + r − 1)! ÷ (r!(n − 1)!) | 3 scoops from 5 flavours, repeats allowed |
| Yes | Yes | Permutation with repetition | nʳ | 4-digit PIN (10⁴ = 10,000) |
Worked examples
- Poker hands: C(52, 5) = 2,598,960 five-card hands.
- Lottery 6 from 49: C(49, 6) = 13,983,816, so one ticket wins with probability 1 in 13,983,816.
- Committee of 3 from 10 people: C(10, 3) = 120; if the three hold different offices (president, secretary, treasurer) it is P(10, 3) = 720.
- Seating 5 people in 5 chairs: P(5, 5) = 5! = 120.
- Pizza with 3 toppings from 8, no repeats: C(8, 3) = 56.
Pascal’s triangle and symmetry
The bar chart shows row n of Pascal’s triangle. It is symmetric because C(n, r) = C(n, n − r), and each entry equals the sum of the two above it: C(n, r) = C(n − 1, r − 1) + C(n − 1, r). The row total is 2ⁿ, the number of subsets of an n-item set, and it is shown in the results.
Using combinations in probability
Probability by counting is favourable outcomes divided by total outcomes. For example, the chance of being dealt exactly 4 hearts in a 5-card hand needs C(13, 4) × C(39, 1) ÷ C(52, 5). The hypergeometric and binomial distributions are built on exactly these counts.
Where Combinations and Permutations Is Used
Committees and teams
Counting the ways to pick a group from a larger pool when roles are identical.
Probability problems
Counting favourable outcomes and total outcomes when every selection is equally likely.
Card hands and lotteries
Counting hands or tickets where the order of the cards or numbers is irrelevant.
Binomial coefficients
Finding the coefficients in a binomial expansion, which are the entries of Pascal's triangle.
Common Combinations and Permutations Mistakes to Avoid
- Using permutations when order does not matter, which overcounts by r!.
- Forgetting that r cannot exceed n without repetition.
- Mixing up “at least” with “exactly” in probability questions.
- Using rounded factorials; this calculator uses exact integers.
- C(n, r) = C(n, n − r): choosing r items to take is the same as choosing n − r items to leave.
- Permutations are always at least as large as combinations, because each group of r items can be ordered in r! ways.
- Probability problems often use combinations to count favourable outcomes and total outcomes, then divide.
Combinations and Permutations Terms and Definitions
- Factorial (n!)
- The product of all positive integers up to n; 0! = 1.
- Combination
- An unordered selection of r items from n.
- Permutation
- An ordered arrangement of r items from n.
- Binomial coefficient
- Another name for C(n, r), written “n choose r”.
- Pascal’s triangle
- A triangle of binomial coefficients where each number is the sum of the two above it.
Combinations and Permutations FAQs
How do I calculate nCr by hand?
Multiply r consecutive numbers starting at n going down, then divide by r!. For C(10, 3): (10 × 9 × 8) ÷ (3 × 2 × 1) = 120.
What is the largest n this calculator handles?
Up to 1000 with exact big-integer results, which can run to hundreds of digits.
Why is C(n, 0) equal to 1?
There is exactly one way to choose nothing: the empty selection.
What is the difference between nCr and nPr?
nCr ignores order and nPr counts order. nPr = nCr × r!.
How many ways can 5 people be arranged in a row?
5! = 120 (that is P(5, 5)).
How is C(n, r) related to the binomial theorem?
The coefficients in the expansion of (a + b)ⁿ are C(n, 0), C(n, 1), ..., C(n, n), which is why they are called binomial coefficients.
Do combinations apply to the lottery?
Yes. The order the balls are drawn does not matter, so the number of possible tickets is a combination.
What is nCr?
nCr, also written C(n, r) or "n choose r", is the number of ways to choose r items from n when the order of selection does not matter.
What is the difference between nCr and nPr?
nPr counts ordered arrangements and nCr counts unordered groups. nPr = nCr × r!.
What is 0! and C(n, 0)?
0! is defined as 1, so C(n, 0) = 1 and C(n, n) = 1: there is exactly one way to choose nothing and one way to choose everything.
How many 5-card poker hands are there?
C(52, 5) = 2,598,960 distinct hands from a standard 52-card deck.
When do I use repetition?
Use it when the same item can be chosen more than once, for example picking 3 scoops from 5 flavours where you can repeat a flavour.