Calculators
Home › Calculators › Permutations and Combinations

Permutation and Combination Calculator

Both counts at once: the fastest way to see what the order question costs.

Count permutations and combinations together

One n and r, all four counts: order on or off, repetition on or off.

Quick answer: P(12, 4) = 11,880 arrangements; C(12, 4) = 495 selections. Ratio exactly 24 = 4!. With repetition: 20,736 sequences and 1,365 multisets.

The only question: does order matter?

Permutations and combinations start from the same setup, n items, choose or arrange r of them, and diverge on one modelling question. If swapping two chosen items produces a different outcome (a podium, a password, a batting order), you are counting permutations: P(n, r) = n! ÷ (n − r)!. If the swap changes nothing (a committee, a hand of cards, a lottery ticket), divide by the r! orderings of each selection to get combinations: C(n, r) = n! ÷ (r!(n − r)!). The ratio between the two answers is always exactly r!, which the calculator shows as a consistency check.

Side by sideP(n, r) = n! ÷ (n − r)!  ·  C(n, r) = P(n, r) ÷ r!
Worked example

Twelve athletes, four places. Podium-style rankings: P(12, 4) = 12 × 11 × 10 × 9 = 11,880. A four-person squad with no internal order: C(12, 4) = 495. The ratio is 24 = 4!, the number of ways any fixed squad can be ranked. Same input numbers, a 24-fold gap in the answer: the order question is not a technicality, it is most of the problem.

When repetition enters

Allow items to be reused and both counts change character. Ordered sequences become nr (each slot refills), and unordered multisets become C(n + r − 1, r) by stars and bars. The calculator prints all four together precisely because exam questions and real counting problems mix the toggles: the first task is always classifying the problem on the two axes, order and repetition. The arithmetic after that is one line.

Watch out

Counting a lottery ticket with permutations. A lottery draw does not care about the order the balls arrive in, so combinations are correct, and the jackpot odds are r! times better than the permutation count suggests. Advertised odds always use the combination.

Frequently asked questions

How do I know if a problem wants permutations or combinations?

Ask whether reordering the result makes a different outcome. Podium places, codes and sequences: permutations. Committees, hands and selections: combinations.

Why is P(n, r) always bigger than C(n, r)?

Every combination of r items can be arranged in r! orders, and permutations count all of them: P = C x r!. The two agree only when r is 0 or 1.

What changes when repetition is allowed?

Slots refill after each pick: n^r ordered sequences, and C(n + r - 1, r) unordered multisets by the stars and bars argument.