Combinations vs Permutations: When Order Matters and How to Count It
A plain-English guide to combinations vs permutations, the nPr and nCr formulas, and worked lottery, password, and committee examples you can recompute yourself.
Combinations vs Permutations: When Order Matters and How to Count It
Half the counting mistakes I see come down to one missed question: does the order of my picks matter? Answer that wrong and you can be off by a factor of hundreds. A lottery jackpot computed as a permutation looks 720 times harder to win than it really is. A password space computed as a permutation looks far smaller than the attacker's real search space. So before you reach for any formula, settle the order question first.
This guide walks through the difference between combinations and permutations, the two formulas you actually need, and three concrete examples — a lottery draw, a password space, and a committee pick — that you can check yourself with the Permutation & Combination Calculator.
The one question that decides everything
A permutation counts arrangements where order matters. Gold, silver, and bronze on a podium is a permutation: Anna-then-Ben-then-Cara is a different result from Cara-then-Ben-then-Anna. The sequence of characters in a password is a permutation too — 1234 is not the same as 4321.
A combination counts selections where order does not matter. The six numbers drawn in a lottery are the same set whether you write them low-to-high or in the order the balls popped out. A committee of three people is the same committee no matter who you name first.
Here is the test I use every time: would reordering my picks produce a genuinely different outcome? If yes, it is a permutation. If no, it is a combination. That single question resolves almost every counting problem before any arithmetic happens.
There is a tidy relationship between the two. Every selection of r items can be arranged in r! different orders, so permutations always outnumber combinations by exactly that factor:
P(n, r) = C(n, r) × r!
That is why P(n, r) is always greater than or equal to C(n, r), and why the two collapse to the same value when r = 1 (a single pick has only one ordering).
The two formulas: nPr and nCr
The permutation count answers "how many ordered ways can I pick r items from n?":
nPr = P(n, r) = n! / (n − r)!
The factorial n! means n × (n − 1) × (n − 2) × … × 1. Dividing by (n − r)! cancels the tail you did not use, leaving exactly the first r factors: n × (n − 1) × … × (n − r + 1).
The combination count answers "how many unordered ways can I pick r items from n?":
nCr = C(n, r) = n! / (r!(n − r)!)
It is the permutation formula divided by r!, because each unordered selection was counted r! times — once per arrangement. C(n, r) is also written as "n choose r" and shows up everywhere from binomial expansions to probability denominators.
Two edge cases worth memorizing: C(n, 0) = 1 (there is exactly one way to pick nothing — the empty set), and C(n, n) = 1 (one way to pick everything). Both formulas require r ≤ n, since you cannot pick more distinct items than you own.
A worked example: choosing 3 from 5
Numbers make this stick faster than prose. Suppose you have 5 books and want to know two things: how many ways to line up 3 of them on a shelf, and how many distinct 3-book sets you could grab.
The shelf is ordered — left to right is a real arrangement — so it is a permutation:
P(5, 3) = 5! / (5 − 3)!
= 120 / 2
= 60
The 3-book set is unordered — grabbing the same three books in any order is the same set — so it is a combination:
C(5, 3) = 5! / (3! × (5 − 3)!)
= 120 / (6 × 2)
= 120 / 12
= 10
So 60 ordered arrangements collapse into 10 distinct sets, and 60 / 10 = 6 = 3! confirms the P = C × r! relationship exactly. If you want the full-shelf arrangement of all five books, that is just 5! = 120.
Lottery, passwords, and committees
The three classic real-world cases each land on a different formula. Knowing which is which is most of the skill.
Lottery (combination). A 6-from-49 draw asks how many unordered sets of six numbers exist. Order does not matter — the balls form a set, not a sequence — so it is C(49, 6):
C(49, 6) = 49! / (6! × 43!) = 13,983,816
Your odds of matching all six on one line are 1 in 13,983,816. The trap here is using a permutation: P(49, 6) = 10,068,347,520, which wrongly treats 1-2-3-4-5-6 as different from 6-5-4-3-2-1 and inflates the count by 6! = 720.
Passwords (permutation with repetition). A password is ordered and characters can repeat, so it is neither plain nPr nor nCr — it is n^r. An 8-character password drawn from 95 printable ASCII symbols has 95^8 ≈ 6.6 × 10^15 possibilities. A 6-digit PIN is 10^6 = 1,000,000. The common mistake is writing the PIN as P(10, 6) = 151,200, which forbids repeated digits and badly understates the real space. When each position is independent and repeats are allowed, multiply, do not permute.
Committees (combination). Picking a 3-person committee from 10 employees is unordered — there is no chair, no rank, just membership — so it is C(10, 3) = 120. But if you are filling a ranked slate — president, treasurer, secretary — order suddenly matters and it becomes P(10, 3) = 720. Same ten people, same three seats, six times the count, all because the roles are now distinguishable.
A note on precision
When I first started checking these by hand, I kept hitting a wall that had nothing to do with the formulas: ordinary calculators quietly lie about large factorials. In standard floating-point math, 21! = 51,090,942,171,709,440,000 already exceeds JavaScript's safe-integer ceiling (2^53 − 1 ≈ 9.0 × 10^15), so any tool built on plain floats starts returning subtly wrong digits from n = 21 onward. I once spent an afternoon debugging a "wrong" probability denominator that turned out to be a rounded 25!. That is why the calculator behind this guide computes every count in BigInt — 100! comes back with all 158 digits intact, and C(52, 5) is the exact 2,598,960 poker hands rather than an approximation.
If you only remember one thing, make it the order question. Decide whether reordering changes the outcome, pick nPr or nCr accordingly, switch to n^r when repeats are allowed, and let exact arithmetic handle the rest. To check any of the numbers above, drop your own n and r into the Permutation & Combination Calculator, and if you want to turn a lottery count like 1 / 13,983,816 into a clean percentage, the percentage calculator does it in one step.
Made by Toolora · Updated 2026-06-13