Statistics
Permutations and Combinations Explained
By MathSolver Pro Editorial Team · Published
Permutations count arrangements where order matters, and combinations count selections where it does not. Both grow from the fundamental counting principle and factorials, and they power probability calculations from card games to lotteries.
The fundamental counting principle
Counting problems ask how many ways something can happen. The foundation is the fundamental counting principle: if one choice can be made in ways and a second, independent choice in ways, the two together can be made in ways. The idea extends to any number of stages.
If you own 3 shirts, 4 pairs of trousers and 2 pairs of shoes, you can make different outfits. A four-digit PIN using the digits 0 to 9, with repeats allowed, has possibilities. Every formula in this article is a shortcut for this multiplication, so when a problem feels unfamiliar, going back to stage-by-stage counting is always a safe fallback.
Factorials
Arranging all distinct objects in a row gives choices for the first position, for the second, and so on down to 1. This product is called factorial:
So : five books can be lined up on a shelf in 120 orders. By definition , which keeps the formulas below consistent, since there is exactly one way to arrange nothing. Factorials grow astonishingly fast: , and a shuffled deck of cards has possible orders, a number with 68 digits.
Permutations: order matters
A permutation is an ordered arrangement of objects chosen from distinct objects. Because order matters, first-second-third is different from third-second-first. The number of permutations is
Example 1: medals in a race
- Eight runners compete. In how many ways can gold, silver and bronze be awarded?
- Gold can go to any of 8 runners, silver to any of the remaining 7, bronze to any of the remaining 6.
- .
Arranging people around a circular table is a special case. Rotating everyone one seat gives the same arrangement, so people can be seated in distinct ways. Six people around a round table have arrangements, not 720.
Combinations: order does not matter
A combination is a selection where only membership counts. Choosing Ana, Ben and Cara for a committee is the same committee in any order. Each group of objects corresponds to permutations, so we divide them out:
Example 2: choosing a committee
- How many three-person committees can be chosen from 8 people?
- There are 336 ordered selections, as in Example 1.
- Each committee appears times among them.
- .
Combinations are symmetric: , because choosing 3 people to include is the same as choosing 5 to leave out. They are also the entries of Pascal's triangle and the coefficients in the binomial expansion of .
How to tell which one to use
Ask a single question: if I swap two of the chosen items, do I get a different result? If yes, order matters and you need permutations. If no, use combinations.
- Positions, rankings, passwords, seating plans and schedules: permutations.
- Teams, committees, hands of cards, lottery tickets and pizza toppings: combinations.
- Roles inside a group, such as a president and a treasurer, make order matter even though the people come from one pool.
A quick check: the permutation count is always times the combination count. If your two answers do not satisfy that relationship, one of them is wrong.
Counting with repetition and repeated letters
When items may be reused, the formulas change. Ordered selections with repetition number , as in the PIN example. Unordered selections with repetition, such as choosing 3 scoops of ice cream from 5 flavours where you may repeat a flavour, number
Arranging letters with repeats needs one more adjustment: divide by the factorial of each repeated count, because swapping identical letters changes nothing. The word MISSISSIPPI has 11 letters, with 4 I's, 4 S's and 2 P's, so it has distinct arrangements.
Using counting to find probabilities
When outcomes are equally likely, a probability is a count of favourable outcomes divided by a count of all outcomes, so permutations and combinations do most of the work. The basics of that ratio are covered in probability basics.
Example 3: the lottery
- A lottery draws 6 numbers from 1 to 49, and order does not matter.
- The number of possible tickets is .
- A single ticket wins the jackpot with probability , about 1 in 14 million.
Example 4: an all-women committee
- A group has 5 women and 3 men. Three are chosen at random. What is the probability that all three are women?
- Favourable selections: . All selections: .
- .
Card games give more practice. There are possible five-card hands. A hand containing all four aces needs only one more card, chosen from the other 48, so the probability is .
Common mistakes
- Using permutations for a team or committee, which overcounts by a factor of .
- Forgetting that , which breaks formulas such as .
- Ignoring identical items, as in arrangements of letters with repeats.
- Multiplying stages that are not independent without adjusting the later counts.
The permutation and combination calculator evaluates and with the factorial steps shown, and the probability calculator turns those counts into probabilities.
Pascal's triangle and subsets
Each entry of Pascal's triangle is the sum of the two entries above it, and row lists the values . Row 4 reads 1, 4, 6, 4, 1, which are exactly the coefficients in . The rule that builds the triangle is itself a counting fact:
To see why, fix one particular item. Every selection of items either includes it, leaving to choose from the other , or excludes it, leaving all to choose from the other . Adding a whole row gives , the total number of subsets of an -item set, since each item is either in or out. A pizza shop with 8 toppings can therefore make different pizzas, counting the plain one.
Practice problems
- In how many ways can 4 of 7 different books be arranged on a shelf? Answer: .
- How many ways can you pick 4 toppings from 10? Answer: .
- How many distinct arrangements does BANANA have? Answer: .
- How many five-letter codes can be made from 26 letters if repeats are allowed? Answer: .
Frequently asked questions
Why is zero factorial equal to one?
There is exactly one way to arrange zero objects: do nothing. Defining 0! as 1 also keeps formulas consistent, for example the number of ways to choose all n items from n is n! divided by n! times 0!, which must equal 1.
Is a combination lock really a combination?
Mathematically no. The order of the digits matters, so a lock code is a permutation with repetition, and a three-dial lock with digits 0 to 9 has 1,000 possible codes.
Which is always larger, nPr or nCr?
For r of 2 or more, nPr is larger, because it equals nCr multiplied by r factorial. When r is 0 or 1 the two values are equal.
What does n choose r mean?
It is the number of ways to choose r items from n distinct items when order does not matter, written with the binomial coefficient notation and equal to n! divided by r!(n-r)!.
How do I count arrangements where two people must sit together?
Treat the pair as a single block, arrange the blocks, then multiply by the number of orders inside the block. Five people in a row with two of them always adjacent gives 4! times 2, which is 48 arrangements.