The short answer: Permutations count arrangements in which order matters; combinations count selections in which it does not. For n distinct items taken r at a time, nPr = n! / (n − r)! and nCr = n! / (r!(n − r)!). Choosing 3 of 8 people for a committee gives 56 possibilities; awarding gold, silver, and bronze to 3 of 8 runners gives 336.

Key takeaways

  • Ask whether swapping two chosen items creates a different outcome.
  • nPr counts ordered arrangements; nCr counts unordered selections.
  • nCr = nPr / r!, because each selection has r! orderings.
  • 0! = 1 by convention, which keeps the formulas valid at r = 0 and r = n.
  • Repetition changes the count: n^r ordered, and C(n + r − 1, r) unordered.
  • Identical items require dividing by the factorial of each repeat count.

Order is the whole question

A diner chooses three dishes from a menu of eight. If the dishes are placed on the table together, choosing soup, salad, and pasta is the same as choosing pasta, soup, and salad: order does not matter. If the dishes are served as first, second, and third courses, those two orders are different meals: order matters.

The same distinction decides which formula to use. A committee, a hand of cards, a set of lottery numbers, and a pizza with toppings are unordered selections. A podium, a password, a batting order, and a queue are ordered arrangements.

Before computing anything, write down what one outcome looks like. If swapping two items produces a different outcome, count permutations. If it produces the same outcome, count combinations.

Factorials and the 0! convention

A factorial multiplies a positive integer by every smaller positive integer: 5! = 5 × 4 × 3 × 2 × 1 = 120. Factorials count arrangements of distinct items, so 5 books can be shelved in 120 orders.

By convention, 0! = 1. There is exactly one way to arrange nothing, and the convention keeps the formulas consistent. Without it, nCn = n! / (n! × 0!) would be undefined instead of 1, even though choosing all n items can be done in exactly one way.

Factorials grow explosively: 10! = 3,628,800, 20! ≈ 2.43 × 10¹⁸, and 52! ≈ 8.07 × 10⁶⁷. That growth is why counting problems quickly leave calculator range and why exact big-integer arithmetic or logarithms is needed.

Permutations without repetition

A permutation is an ordered arrangement of r items chosen from n distinct items, with no item used twice. The count is nPr = n! / (n − r)!.

For 8 runners and 3 medals, there are 8 choices for gold, 7 remaining for silver, and 6 for bronze: 8 × 7 × 6 = 336. The formula gives 8! / 5! = 336, because the 5! cancels the unselected runners.

The falling-product view is often safer than the formula: multiply r consecutive integers downward from n. It also makes the special cases obvious. Choosing all n items gives n!, since every item is arranged. Choosing 0 items gives 1, the empty arrangement. Use permutations when positions are labeled and swapping two selected items changes the result.

Combinations without repetition

A combination is an unordered selection. Start with the permutation count and divide by r!, because each set of r items has r! internal orders that were counted separately: nCr = n! / (r!(n − r)!) = nPr / r!.

For 8 people and a 3-person committee, 8C3 = 336 / 6 = 56. The formula is symmetric: nCr = nC(n − r). Choosing 3 of 8 to include is the same as choosing 5 of 8 to exclude, so 8C3 = 8C5 = 56. The symmetry is a useful arithmetic shortcut.

Pascal’s rule, nCr = (n − 1)C(r − 1) + (n − 1)Cr, builds each row of Pascal’s triangle from the row above. It is also the basis of the binomial theorem, where nCr gives the coefficient of the r-th term.

When repetition is allowed

Repetition changes both formulas. Ordered with repetition, each of the r positions has n choices, so the count is n^r. A 4-digit PIN has 10^4 = 10,000 possibilities; a 6-character password from 26 letters and 10 digits has 36^6 = 2,176,782,336.

Unordered with repetition counts multisets, selections where an item may appear more than once but order is ignored. The stars-and-bars formula is C(n + r − 1, r). With 10 ice-cream flavors and 3 scoops, C(12, 3) = 220.

Stars and bars assumes unlimited supply and that only the counts of each item matter. It does not apply when the items are distinct objects that cannot be reused, and it does not count different orders as different outcomes. Mixing up the four cases, ordered or not and repeated or not, is the most common source of wrong answers.

Identical items and multiset permutations

When some items are identical, dividing by the factorials of the repeat counts removes the arrangements that look the same. The number of distinct arrangements of n items with groups of sizes n1, n2, and so on is n! / (n1! n2! …).

The letters of MISSISSIPPI give 11 letters: M once, I four times, S four times, and P twice. The count is 11! / (1! × 4! × 4! × 2!) = 39,916,800 / 1,152 = 34,650. A smaller check: three red flags and two blue flags can be arranged in 5! / (3! × 2!) = 10 distinct sequences.

This is the multinomial coefficient. It reduces to nCr when there are only two groups, because choosing which positions hold one group determines the other.

Worked examples: lottery, committee, password

Lottery. A 6/49 draw selects six numbers with no repeats and no order. The count is 49C6 = 13,983,816. One ticket therefore has probability 1 / 13,983,816 ≈ 7.15 × 10⁻⁸, about one in fourteen million.

Committee with a constraint. From 8 people, form a 3-person committee that includes at least one of two specific people. Total committees: 8C3 = 56. Committees that include neither: 6C3 = 20. Subtract: 56 − 20 = 36. Alternatively, exactly one of the two: 2 × 6C2 = 30, plus both: 6C1 = 6, for 36.

Password. A 6-character password from 36 symbols, repetition allowed, is 36^6 ≈ 2.18 × 10⁹. If repetition is forbidden, it is 36P6 = 36 × 35 × 34 × 33 × 32 × 31 ≈ 1.40 × 10⁹. In each case the structure of one outcome, not the story, chooses the formula.

Common mistakes

  • Using nPr when order does not matter, which overcounts by a factor of r!.
  • Forgetting to divide by r!: computing 8C3 as 336 instead of 56.
  • Dividing by repeat factorials that are not there, or failing to divide when letters repeat.
  • Applying nCr when items may be reused; combinations without repetition assume each item is used once.
  • Treating “at least one” as a single case instead of using the complement 1 − P(none).
  • Using probability = favorable / total when outcomes are not equally likely.
  • Forgetting that 0! = 1, which breaks edge cases such as nC0.

A quick sanity check catches most of these. nCr must be a whole number and must not exceed nPr. Both counts must equal 1 when r = 0 or r = n. And the answer should grow when n or r grows in the expected direction.

Practical caveats and checks

The formulas count outcomes only when the items are distinguishable and each outcome is equally likely. Real sampling may be biased, and a committee may have eligibility rules that change the denominator.

Circular arrangements use (n − 1)! because rotations are considered identical; if reflections also count as the same, the count halves. Seating around a table, necklace beads, and round-robin schedules need these adjustments.

Large counts overflow floating point. 52! has 68 digits, and even 20! exceeds exact double precision. Use exact integers, logarithms, or a library function such as COMBIN in a spreadsheet or comb in Python. Finally, state the assumption: “number of ways” is meaningless until you say whether order matters, whether repetition is allowed, and whether items are distinct.

Frequently asked questions

What is the difference between a permutation and a combination?

A permutation counts ordered arrangements; a combination counts unordered selections. For 3 of 8 items, 8P3 = 336 and 8C3 = 56.

Why is 0! equal to 1?

There is one way to arrange nothing, and the value keeps n! = n(n − 1)! consistent at n = 1, where 1! = 1 × 0!.

How many different lottery tickets are there in a 6/49 draw?

49C6 = 13,983,816, because the six numbers are unordered and chosen without replacement.

How many distinct arrangements does MISSISSIPPI have?

34,650, from 11! divided by 4! for the repeated I, 4! for the repeated S, and 2! for the repeated P.

Is a password a permutation or a combination?

A permutation, because character order matters; with repetition allowed the count is n^r rather than nPr.

What is the combinations-with-repetition formula?

C(n + r − 1, r), the stars-and-bars count for choosing r items from n types when order is ignored and repeats are allowed.

Further reading

Keep exploring

Read next Logarithm: Base, Product Rule, and Scale A logarithm is an exponent in disguise. Learn the definition, the product, quotient and power rules, change of… Read next Order of Operations: PEMDAS and Ambiguous Expressions PEMDAS is a shared convention, not a law of mathematics. Learn the real precedence rules, the exponent and… Read next Significant Figures: Counting, Rounding, and Precision Significant figures record how precisely a value was measured. Learn the counting rules, the addition and multiplication rules,…