Permutation & Combination

nPr and nCr.

P(8, 3)
336

How to Use the Permutation & Combination Calculator

  1. **Enter n** — type the total number of items in your set (e.g., 10 students, 52 cards).
  2. **Enter r** — type how many items you are selecting or arranging at a time (r must be ≤ n).
  3. **Choose the operation** — select *Permutation (nPr)* if order matters (e.g., ranking, passwords) or *Combination (nCr)* if order does not matter (e.g., choosing a committee).
  4. **Click Calculate** — the calculator applies the appropriate factorial formula and displays the exact result instantly.
  5. **Interpret the result** — the number shown is the total count of distinct arrangements (permutation) or selections (combination) possible.

Permutation and Combination Formulas

P(n,r) = n! / (n−r)!    |    C(n,r) = n! / [r! × (n−r)!]

There are two core formulas used in this calculator:

Permutation (nPr) — counts ordered arrangements:

P(n, r) = n! / (n − r)!

Combination (nCr) — counts unordered selections:

C(n, r) = n! / [r! × (n − r)!]

Both formulas rely on the factorial function (n! = n × (n−1) × … × 2 × 1). The key difference is that combinations divide out the r! ways the chosen items could be re-ordered, since order doesn't matter in a combination.

  • n — The total number of distinct items in the set (must be a non-negative integer).
  • r — The number of items being chosen or arranged at a time (must satisfy 0 ≤ r ≤ n).
  • n! — Factorial of n — the product of all positive integers from 1 up to n (e.g., 5! = 120). By convention, 0! = 1.
  • (n − r)! — Factorial of the difference between n and r; appears in both formulas to cancel out items not selected.
  • r! — Factorial of r; appears only in the combination formula to remove duplicate orderings of the selected items.
  • P(n,r) — The number of permutations — distinct ordered arrangements of r items chosen from n items.
  • C(n,r) — The number of combinations — distinct unordered subsets of r items chosen from n items.

Worked Example: Permutation and Combination

n = 8 (total items), r = 3 (items chosen)
**Permutation P(8,3):**
P(8,3) = 8! / (8−3)! = 8! / 5! = (8 × 7 × 6 × 5!) / 5! = 8 × 7 × 6 = **336**

**Combination C(8,3):**
C(8,3) = 8! / [3! × (8−3)!] = 8! / (6 × 120) = (8 × 7 × 6) / (3 × 2 × 1) = 336 / 6 = **56**

Result: P(8,3) = 336 ordered arrangements; C(8,3) = 56 unordered selections

What Your Result Means

With n = 8 and r = 3:

  • 336 permutations means there are 336 different ways to pick and arrange 3 items in order from a group of 8. For example, awarding a 1st, 2nd, and 3rd place prize to 3 people from 8 contestants yields 336 distinct outcomes.
  • 56 combinations means there are only 56 distinct groups of 3 items when order is irrelevant. For example, choosing a 3-person committee from 8 people gives 56 possible committees.

The ratio 336 / 56 = 6 = 3! confirms that each combination corresponds to exactly 3! = 6 different ordered permutations.

Understanding Permutation & Combination

Permutations vs. Combinations — Key Concepts

When Does Order Matter?

The fundamental question is: does the sequence of selection change the outcome?

  • Yes → use a Permutation. Examples: PIN codes, race finishing positions, letter arrangements in a word.
  • No → use a Combination. Examples: lottery ticket numbers, pizza toppings, team rosters.

The Role of Factorials

Both formulas are built on factorials. The factorial n! grows extremely fast:

  • 5! = 120
  • 10! = 3,628,800
  • 20! ≈ 2.43 × 10¹⁸

For large n and r, calculators or software are essential because hand computation becomes impractical.

Relationship Between nPr and nCr

nPr = nCr × r!

This shows that a permutation is simply a combination multiplied by the number of ways to order the chosen items (r!). Every combination can generate r! permutations.

Special Cases

  • r = 0: C(n,0) = P(n,0) = 1 (there is exactly one way to choose or arrange nothing).
  • r = n: C(n,n) = 1 (only one way to select all items); P(n,n) = n! (all possible orderings of the full set).
  • r = 1: C(n,1) = P(n,1) = n.

Real-World Applications

| Scenario | Type | Why | |---|---|---| | Arranging books on a shelf | Permutation | Order of books changes the arrangement | | Choosing a lottery ticket | Combination | Numbers drawn in any order win | | Creating a password | Permutation | Different sequences are different passwords | | Forming a sports team | Combination | Team composition, not order, matters | | Assigning ranked medals | Permutation | Gold/Silver/Bronze are distinct positions |

Common Mistakes

  • **Confusing permutation with combination** — always ask 'does order matter?' before choosing the formula. A common error is using nPr when selecting a committee (order irrelevant) instead of nCr.
  • **Setting r > n** — both formulas are undefined when r exceeds n, because you cannot arrange more items than exist. Always verify r ≤ n before calculating.
  • **Forgetting that 0! = 1** — when r = n, the formula includes (n−n)! = 0! = 1, not 0. Treating 0! as 0 makes the denominator zero and produces an error.
  • **Misidentifying n and r** — n is always the larger set size; r is the subset size. Swapping them gives a completely wrong answer.
  • **Ignoring identical items** — the standard nPr formula assumes all n items are distinct. If some items are identical (e.g., repeated letters), you must use the multinomial formula instead.
  • **Calculator mode errors** — ensure your scientific calculator or spreadsheet function uses the correct function: PERMUT(n,r) for permutations and COMBIN(n,r) for combinations in Excel/Google Sheets.

Common Questions About Permutation & Combination

What is 10 choose 4 (C(10,4))?

C(10,4) = 10! / (4! × 6!) = (10 × 9 × 8 × 7) / (4 × 3 × 2 × 1) = 5040 / 24 = 210.

How many ways can 5 people be arranged in a line?

This is P(5,5) = 5! = 120 different arrangements.

How many 3-digit PINs can be formed from digits 0–9 if digits can repeat?

With repetition allowed the count is 10³ = 1,000, not a permutation. If digits cannot repeat it is P(10,3) = 720.

What is the probability formula using combinations?

For equally likely outcomes, P(event) = C(favorable outcomes) / C(total outcomes). For example, the probability of being dealt 5 specific cards from a 52-card deck is 1 / C(52,5) = 1 / 2,598,960.

How is Pascal's Triangle related to combinations?

Each entry in Pascal's Triangle is a combination: row n, position r equals C(n,r). For example, row 4 reads 1, 4, 6, 4, 1, which equals C(4,0), C(4,1), C(4,2), C(4,3), C(4,4).

Frequently Asked Questions

What is the difference between a permutation and a combination?

A permutation counts ordered arrangements — the sequence ABC is different from BAC. A combination counts unordered selections — {A, B, C} and {B, A, C} are the same group. Use permutations when order matters (rankings, passwords) and combinations when it does not (committees, lottery).

Can r be equal to n?

Yes. When r = n, P(n,n) = n! (all possible orderings of the full set) and C(n,n) = 1 (there is only one way to choose all items at once).

What happens when r = 0?

Both P(n,0) and C(n,0) equal 1. There is exactly one way to arrange or choose nothing — the empty arrangement or empty set.

How large can n be in this calculator?

The calculator handles standard integer inputs, but results grow astronomically fast due to factorials. For very large n (e.g., n > 170), floating-point overflow may occur; look for a big-integer mode or logarithmic output option in the tool settings.

Does this calculator handle repetition (with replacement)?

No — the standard nPr and nCr formulas assume items are distinct and selected without replacement. If repetition is allowed, the count of ordered arrangements becomes nʳ instead of P(n,r).

How do I calculate nCr on a scientific calculator?

On most scientific calculators, enter n, press the nCr or C(n,r) button (sometimes labeled ⁿCᵣ), enter r, then press equals. In Excel or Google Sheets, use =COMBIN(n,r). For permutations, use =PERMUT(n,r).

Related Calculators

Sources

Only sources that have been reviewed are shown. Unverified citations are never published.

Spotted a calculation error?Report an Error