MathUpdated March 30, 2026

Combinations & Permutations Guide: When Order Matters (and When It Doesn't)

By The hakaru Team·Last updated March 2026

Quick Answer

  • Permutations count arrangements where order matters (ABC ≠ CBA). Formula: nPr = n! / (n – r)!
  • Combinations count selections where order doesn't matter (ABC = CBA). Formula: nCr = n! / (r! × (n – r)!)
  • Choosing 3 from 10: 720 permutations vs 120 combinations — permutations are always ≥ combinations.
  • With repetition allowed, permutations = nr and combinations = (n + r – 1)! / (r! × (n – 1)!).

What Are Combinations and Permutations?

Both combinations and permutations deal with counting the ways you can select items from a larger set. The only difference: does order matter?

Picking a 3-person committee from 10 people? Order doesn't matter — that's a combination. Assigning 1st, 2nd, and 3rd place in a race of 10 runners? Order absolutely matters — that's a permutation.

According to the Mathematical Association of America, confusing these two concepts is one of the most common errors in introductory probability courses. Getting the distinction right is the foundation for everything from lottery odds to cryptography.

Permutations: Order Matters

The Permutation Formula (nPr)

The number of ways to arrange r items from a set of n, where order matters:

nPr = n! / (n – r)!

Example: How many 3-letter arrangements can you make from the letters A, B, C, D, E?

5P3 = 5! / (5 – 3)! = 120 / 2 = 60 arrangements

Why 60? For the first position you have 5 choices, then 4, then 3. That's 5 × 4 × 3 = 60.

Permutations with Repetition

When items can be reused, the formula simplifies to nr. A 4-digit PIN using digits 0–9 (repetition allowed) has 10&sup4; = 10,000 possibilities. This is why the National Institute of Standards and Technology (NIST) recommends passwords of at least 8 characters — with 95 printable ASCII characters, that's 95&sup8; ≈ 6.6 quadrillion combinations.

Combinations: Order Doesn't Matter

The Combination Formula (nCr)

The number of ways to choose r items from n, where order doesn't matter:

nCr = n! / (r! × (n – r)!)

Example: Choosing 3 people from 10 for a committee.

10C3 = 10! / (3! × 7!) = 720 / 6 = 120 ways

Compare that to 10P3 = 720 permutations. The combination count is always smaller (or equal) because it removes the redundant orderings. Specifically, nCr = nPr / r!.

Combinations with Repetition

When you can pick the same item more than once (like scoops of ice cream from 5 flavors, choosing 3 scoops), the formula becomes:

(n + r – 1)! / (r! × (n – 1)!)

For 5 flavors, 3 scoops: (5 + 3 – 1)! / (3! × 4!) = 7! / (6 × 24) = 5040 / 144 = 35 combinations.

Side-by-Side Comparison

ScenarioTypeFormulaResult
3-letter codes from A–E (no repeat)Permutation5P360
3-letter codes from A–E (repeat OK)Permutation w/ rep.125
Choose 3 from 5 people (committee)Combination5C310
3 scoops from 5 flavors (repeat OK)Combination w/ rep.7C335

Understanding Factorials

Both formulas rely on factorials. A factorial (n!) is the product of every positive integer up to n.

nn!Value
01 (by definition)1
55 × 4 × 3 × 2 × 1120
1010 × 9 × ... × 13,628,800
2020!2,432,902,008,176,640,000
5252!≈ 8.07 × 10&sup6;&sup7;

Factorials grow absurdly fast. 52! (the number of ways to shuffle a standard deck of cards) is roughly 8 × 10&sup6;&sup7; — a number so large that, according to a 2015 Stanford mathematics paper, every shuffle you've ever performed has almost certainly been unique in human history.

Pascal's Triangle and Combinations

Pascal's triangle is a triangular array where each entry is the sum of the two entries directly above it. The entries in row n correspond to nC0, nC1, nC2, ... nCn. This pattern was described by Blaise Pascal in 1654, though Chinese mathematician Jia Xian documented it around 1050 AD.

Row 5, for example, reads: 1, 5, 10, 10, 5, 1. That means 5C0 = 1, 5C1 = 5, 5C2 = 10, 5C3 = 10, 5C4 = 5, 5C5 = 1. Notice the symmetry — nCr always equals nC(n – r).

Real-World Applications

Lottery Odds

Powerball requires choosing 5 numbers from 69 (combination, no repeat) plus 1 from 26. That's 69C5 × 26 = 11,238,513 × 26 = 292,201,338 to 1 odds of winning the jackpot. The Multi-State Lottery Association publishes these odds on every ticket.

Passwords and Security

A password of length 12 using uppercase, lowercase, digits, and 10 symbols (72 characters total) has 72¹² ≈ 1.9 × 10²² permutations. According to NIST Special Publication 800-63B, this level of entropy (approximately 74 bits) exceeds the minimum recommendation for most authentication systems.

Sports Brackets

The NCAA March Madness bracket has 63 games, each with 2 outcomes. That's 2&sup6;³ ≈ 9.2 quintillion possible brackets. Warren Buffett's famous $1 billion perfect bracket challenge reflected these astronomical odds — no one has ever submitted a verified perfect bracket.

Genetics

Humans have approximately 20,000 protein-coding genes. The number of ways to select a subset of genes for expression in a cell involves massive combination calculations. Research published in Nature Genetics (2023) estimates the human genome can produce over 100,000 distinct protein variants through combinatorial alternative splicing.

Calculate combinations and permutations instantly

Try the Free Combinations & Permutations Calculator →

Frequently Asked Questions

What is the difference between a combination and a permutation?

A permutation counts arrangements where order matters (ABC is different from CBA). A combination counts selections where order does not matter (ABC and CBA are the same group). For choosing 3 items from 10, permutations give 720 results while combinations give 120.

What does nCr mean?

nCr stands for “n choose r” and calculates the number of combinations — ways to select r items from n total items when order does not matter. The formula is nCr = n! / (r! × (n – r)!). For example, 10C3 = 10! / (3! × 7!) = 120.

How do you calculate permutations with repetition?

When repetition is allowed, the number of permutations is nr, where n is the number of available items and r is the number of positions. A 4-digit PIN using digits 0–9 allows repetition, so there are 10&sup4; = 10,000 possible PINs.

What is a factorial?

A factorial (written as n!) is the product of all positive integers up to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. By definition, 0! = 1. Factorials grow extremely fast — 20! is already over 2.4 quintillion (2.4 × 10¹&sup8;).

How many 5-card poker hands are possible from a 52-card deck?

Since the order of cards in a hand does not matter, this is a combination problem. 52C5 = 52! / (5! × 47!) = 2,598,960 possible 5-card hands. This is why certain poker hands are rare — a royal flush can occur only 4 ways out of 2,598,960.