Skip to content
  • Open the math solver
  • Ask the AI tutor
  • Find an AP course
  • Create a quiz
  • Open the calculator
  • Graphing Calculator
  • Browse all calculators
  • Read math guides
↑ ↓Enter to open · Esc to close
Solve a problem

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 mm ways and a second, independent choice in nn ways, the two together can be made in m×nm \times n 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 3×4×2=243 \times 4 \times 2 = 24 different outfits. A four-digit PIN using the digits 0 to 9, with repeats allowed, has 10×10×10×10=104=10,00010 \times 10 \times 10 \times 10 = 10^4 = 10{,}000 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 nn distinct objects in a row gives nn choices for the first position, n−1n - 1 for the second, and so on down to 1. This product is called nn factorial:

n!=n×(n−1)×(n−2)×⋯×2×1n! = n \times (n-1) \times (n-2) \times \cdots \times 2 \times 1

So 5!=1205! = 120: five books can be lined up on a shelf in 120 orders. By definition 0!=10! = 1, which keeps the formulas below consistent, since there is exactly one way to arrange nothing. Factorials grow astonishingly fast: 10!=3,628,80010! = 3{,}628{,}800, and a shuffled deck of cards has 52!52! possible orders, a number with 68 digits.

Permutations: order matters

A permutation is an ordered arrangement of rr objects chosen from nn distinct objects. Because order matters, first-second-third is different from third-second-first. The number of permutations is

nPr=n!(n−r)!{}_nP_r = \frac{n!}{(n-r)!}

Example 1: medals in a race

  1. Eight runners compete. In how many ways can gold, silver and bronze be awarded?
  2. Gold can go to any of 8 runners, silver to any of the remaining 7, bronze to any of the remaining 6.
  3. 8P3=8!5!=8×7×6=336{}_8P_3 = \frac{8!}{5!} = 8 \times 7 \times 6 = 336.

Arranging people around a circular table is a special case. Rotating everyone one seat gives the same arrangement, so nn people can be seated in (n−1)!(n-1)! distinct ways. Six people around a round table have 5!=1205! = 120 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 rr objects corresponds to r!r! permutations, so we divide them out:

nCr=(nr)=n!r! (n−r)!{}_nC_r = \binom{n}{r} = \frac{n!}{r!\,(n-r)!}

Example 2: choosing a committee

  1. How many three-person committees can be chosen from 8 people?
  2. There are 336 ordered selections, as in Example 1.
  3. Each committee appears 3!=63! = 6 times among them.
  4. (83)=3366=56\binom{8}{3} = \frac{336}{6} = 56.

Combinations are symmetric: (nr)=(nn−r)\binom{n}{r} = \binom{n}{n-r}, 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 (a+b)n(a + b)^n.

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 r!r! 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 nrn^r, 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

(n+r−1r)=(73)=35\binom{n + r - 1}{r} = \binom{7}{3} = 35

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 11!4! 4! 2!=34,650\frac{11!}{4!\,4!\,2!} = 34{,}650 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

  1. A lottery draws 6 numbers from 1 to 49, and order does not matter.
  2. The number of possible tickets is (496)=13,983,816\binom{49}{6} = 13{,}983{,}816.
  3. A single ticket wins the jackpot with probability 113,983,816\frac{1}{13{,}983{,}816}, about 1 in 14 million.

Example 4: an all-women committee

  1. A group has 5 women and 3 men. Three are chosen at random. What is the probability that all three are women?
  2. Favourable selections: (53)=10\binom{5}{3} = 10. All selections: (83)=56\binom{8}{3} = 56.
  3. P=1056=528≈0.179P = \frac{10}{56} = \frac{5}{28} \approx 0.179.

Card games give more practice. There are (525)=2,598,960\binom{52}{5} = 2{,}598{,}960 possible five-card hands. A hand containing all four aces needs only one more card, chosen from the other 48, so the probability is 482,598,960=154,145\frac{48}{2{,}598{,}960} = \frac{1}{54{,}145}.

Common mistakes

  • Using permutations for a team or committee, which overcounts by a factor of r!r!.
  • Forgetting that 0!=10! = 1, which breaks formulas such as (nn)\binom{n}{n}.
  • 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 nPr{}_nP_r and nCr{}_nC_r 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 nn lists the values (n0),(n1),…,(nn)\binom{n}{0}, \binom{n}{1}, \ldots, \binom{n}{n}. Row 4 reads 1, 4, 6, 4, 1, which are exactly the coefficients in (a+b)4=a4+4a3b+6a2b2+4ab3+b4(a + b)^4 = a^4 + 4a^3b + 6a^2b^2 + 4ab^3 + b^4. The rule that builds the triangle is itself a counting fact:

(nr)=(n−1r−1)+(n−1r)\binom{n}{r} = \binom{n-1}{r-1} + \binom{n-1}{r}

To see why, fix one particular item. Every selection of rr items either includes it, leaving r−1r - 1 to choose from the other n−1n - 1, or excludes it, leaving all rr to choose from the other n−1n - 1. Adding a whole row gives 2n2^n, the total number of subsets of an nn-item set, since each item is either in or out. A pizza shop with 8 toppings can therefore make 28=2562^8 = 256 different pizzas, counting the plain one.

Practice problems

  1. In how many ways can 4 of 7 different books be arranged on a shelf? Answer: 7P4=7×6×5×4=840{}_7P_4 = 7 \times 6 \times 5 \times 4 = 840.
  2. How many ways can you pick 4 toppings from 10? Answer: (104)=210\binom{10}{4} = 210.
  3. How many distinct arrangements does BANANA have? Answer: 6!3! 2!=60\frac{6!}{3!\,2!} = 60.
  4. How many five-letter codes can be made from 26 letters if repeats are allowed? Answer: 265=11,881,37626^5 = 11{,}881{,}376.

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.

MathSolver Pro Editorial Team

Math content and review

Our editorial team writes every guide to explain the reasoning behind each method, not just the answer. Each worked example is checked against the site's own solver engines and automated tests before it is published, and articles are revised whenever a method or an exam format changes.