unspurious.calculators

Probability · Counting

Combination and Permutation Calculator

How many ways can you choose or arrange r things from n? It hangs on two questions: does the order matter, and may you repeat an item? Those two yes/no choices give four different counts — permutations and combinations, each with and without repetition — and mixing them up is one of the most common slips in all of probability. This works out all four at once and shows, in plain words, which question each one answers.

A combination ignores order (a handful of toppings); a permutation counts order (a podium, a PIN). All four appear in the grid below — the chip just headlines one and walks through its example.

Result

In plain English

Counting “how many ways” comes down to two switches. Order: is gold-silver-bronze different from bronze-silver-gold? If yes, it’s a permutation; if the result is just an unordered handful, it’s a combination. Repetition: once you’ve used an item, can it come up again? Flip those two switches and you get the four formulas below — and naming your problem correctly is the whole battle.

permutation (order matters)
An arrangement where sequence counts. Without repetition there are nPr = n! ∕ (n − r)! of them — n choices for the first slot, n − 1 for the next, and so on.
combination (order ignored)
A selection where sequence is irrelevant. nCr = n! ∕ [r!(n − r)!] — the permutation count divided by r!, because each unordered group can be arranged in r! ways that you do not want to count separately.
the r! bridge
Permutations = combinations × r!. Order multiplies the count by the number of ways to arrange the chosen r. That single factor is the entire difference between the two.
with repetition
If items can repeat, ordered counts become nʳ (each of r slots has all n options), and unordered counts become C(n + r − 1, r) — the “stars and bars” formula.
factorial (n!)
n × (n − 1) × … × 1, the number of ways to arrange n distinct items in a row. It grows ferociously: 10! is already 3.6 million.
n choose r
Another name for nCr, written C(n, r) or the stacked-bracket symbol. These are the binomial coefficients — the same numbers that sit in Pascal’s triangle and the binomial distribution.

Frequently asked

What is the difference between a permutation and a combination?

Order. A permutation is an arrangement in which the sequence matters — the podium finishes 1st-2nd-3rd and 3rd-2nd-1st are different permutations. A combination is a selection in which the sequence is irrelevant — the same three people on a committee are one combination however you list them. Because each unordered combination can be ordered in r! ways, there are always more permutations than combinations: nPr = nCr × r!.

How do you calculate nCr and nPr?

nPr = n! ∕ (n − r)!, the number of ordered arrangements of r items chosen from n. nCr = n! ∕ [r!(n − r)!], the number of unordered selections — the same thing divided by r! to remove the orderings you do not want to count. For example with n = 5 and r = 3: nPr = 5! ∕ 2! = 60, and nCr = 5! ∕ (3! · 2!) = 10. The calculator shows the factorial working for whichever you feature.

What changes when repetition is allowed?

If an item can be reused, ordered counts become simply nʳ — each of the r positions independently has all n choices (a 3-digit PIN from 10 digits is 10³ = 1000). Unordered counts with repetition use the “stars and bars” formula C(n + r − 1, r) — for instance 3 scoops chosen from 5 flavours with repeats allowed is C(7, 3) = 35. Note that with repetition r is allowed to exceed n, whereas without repetition you cannot choose more items than exist.

Is the lottery a combination or a permutation?

A combination — the balls are drawn without replacement and the order does not matter, so a 6-from-49 lottery has C(49, 6) = 13,983,816 equally likely tickets. Treating it as a permutation (counting orders) would massively overstate the number of outcomes and understate your chance. The reverse mistake — using a combination where order does matter, like a lock “combination,” which is really a permutation — is just as common. Always ask whether re-ordering gives a genuinely different result.