Permutation and Combination Calculator
Permutations count ordered arrangements; combinations count unordered selections. Choose your mode, enter the total items and the selection size, and get every relevant count with a full step-by-step breakdown.
Formula
Worked example
n = 5, r = 2: P(5,2) = 20 (without rep), C(5,2) = 10, P with rep = 5^2 = 25, C with rep = C(6,2) = 15, circular P = 20/2 = 10.
Four counting modes explained
This calculator covers four standard models. (1) Without repetition, the classic case: pick r distinct items from n, with order mattering for permutations and order not mattering for combinations. (2) Permutations with repetition: each of the r slots can hold any of the n items again, giving n^r total sequences, useful for PINs and passwords where digits can repeat. (3) Combinations with repetition (multiset): choose r items from n types, items may repeat, order irrelevant. The formula is C(n+r-1, r), sometimes called "stars and bars." Think of choosing r scoops of ice cream from n flavors when you can pick the same flavor twice. (4) Circular permutations: arrange r of n objects around a ring where two arrangements are identical if one is a rotation of the other. For a full circle (r = n) this is (n-1)!, and for a partial circle it equals P(n,r) / r.
How to use this calculator
Select the counting mode that matches your problem, then enter n (total pool size) and r (selection size). All four counts update together so you can compare modes side by side. For without-repetition modes r must be at most n; for with-repetition modes r can exceed n. The bars chart shows the relative magnitudes of the four results at a glance. The steps panel shows the arithmetic for each formula with your actual numbers substituted in. The reference table below summarises the four formulas and a real-world example for each.
Why permutations always exceed combinations
For the same n and r, P(n,r) is exactly r! times C(n,r). That factor, r!, is the number of ways to reorder the chosen r items. When you count combinations you collapse all those reorderings into a single group, so the combination count is always smaller, equal only when r is 0 or 1 (in which case r! = 1). For large r the gap becomes enormous: with r = 10, each combination corresponds to 10! = 3,628,800 permutations.
Practical examples by mode
Without repetition, ordered: a race finishing order for 3 of 8 runners = P(8,3) = 336. Without repetition, unordered: a 3-person committee from 8 candidates = C(8,3) = 56. With repetition, ordered: a 4-digit PIN from 10 digits = 10^4 = 10,000. With repetition, unordered: 3 scoops from 5 ice cream flavors (repeats allowed) = C(7,3) = 35. Circular: seating 5 people at a round table = (5-1)! = 24.
Counting formula reference
| Mode | Formula | n=5, r=2 | Real-world example |
|---|---|---|---|
| Permutation, no repeat | n! / (n-r)! | 20 | Race finishing positions |
| Combination, no repeat | n! / (r!(n-r)!) | 10 | Lottery number draw |
| Permutation, with repeat | n^r | 25 | 2-digit PIN from 5 keys |
| Combination, with repeat | C(n+r-1, r) | 15 | Ice cream scoops by flavor |
| Circular permutation | (n-1)! / (n-r)! | 10 | Seating round a table |
All four standard models for selecting r items from n. Repetition means an item can be chosen more than once.
Frequently asked questions
When should I use a permutation instead of a combination?
Use a permutation when the sequence or position of selected items matters: ranking the top three finishers in a race, assigning distinct roles to team members, or forming an ordered access code. Use a combination when only the membership of the group matters, such as selecting a committee where all members hold equal standing or choosing lottery numbers.
What is the difference between with-repetition and without-repetition?
Without repetition, each item can appear at most once in the arrangement (sampling without replacement). Without repetition is the default for most textbook problems. With repetition, each position or slot can hold any of the n items regardless of what was already chosen, so the same item can appear multiple times. A PIN or password is a classic with-repetition scenario.
What are circular permutations and when do I use them?
Circular permutations count seating or arrangement patterns around a ring where rotations of the same arrangement are not considered distinct. For n people around a table, fix one person in place and arrange the remaining (n-1), giving (n-1)! distinct seatings. For a partial circle (choosing r of n), each linear arrangement has r rotational equivalents, so the count is P(n,r) divided by r.
Is 0 a valid input for r?
Yes. When r = 0, both P(n,0) and C(n,0) equal 1 by convention because there is exactly one way to arrange or choose nothing from a set. This follows from 0! = 1. The multiset and circular results also reduce to 1 when r = 0.
Why does the P / C ratio equal r factorial?
Every combination of r items can be arranged in r! distinct orders, each of which counts as a separate permutation. So P(n,r) = r! times C(n,r). Dividing P by r! always yields C. This is why permutations grow so much faster than combinations as r increases.
What is the multiset combination formula C(n+r-1, r)?
The multiset formula counts the ways to choose r items from n types when items can be repeated and order does not matter. It is sometimes called "combinations with repetition" or derived by the stars-and-bars argument: imagine r stars (the items) and n-1 bars (dividers between n types). The number of ways to arrange them is C(n+r-1, r). Example: 3 scoops of ice cream from 5 flavors with repeats allowed = C(7,3) = 35.