Skip to content
Statistics

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.

Your details

Without repetition: each item used at most once. With repetition: items can repeat. Circular: arrangements around a ring where rotations are identical.
The size of the full set you are choosing from.
How many items you pick or arrange. Must be a non-negative integer.
Permutations P(n, r)
20

Ordered arrangements (order matters, no repetition)

Combinations C(n, r)10
Permutations with repetition (n^r)25
Combinations with repetition C(n+r-1, r)15
Circular permutations (n-1)!/(n-r)! or (n-1)!10
P / C ratio (= r!)2
P(n,r) no repeat20
C(n,r) no repeat10
P with repetition25
C with repetition15

P(5, 2) = 20 ordered arrangements; C(5, 2) = 10 unordered selections.

  • There are 2 times as many permutations as combinations (that factor is r!).
  • Allowing repetition gives 25 ordered and 15 unordered arrangements.
  • Around a circle, 10 distinct arrangements exist (rotations are considered identical).

Next stepIf items can repeat (e.g. a PIN with repeated digits or a buffet plate with repeated food), switch to a with-repetition mode above.

Formula

P(n,r)=n!(nr)!,C(n,r)=n!r!(nr)!,Prep=nr,Crep=(n+r1r),Pcirc=(n1)!(nr)!P(n,r)=\dfrac{n!}{(n-r)!},\quad C(n,r)=\dfrac{n!}{r!(n-r)!},\quad P_{\text{rep}}=n^r,\quad C_{\text{rep}}=\binom{n+r-1}{r},\quad P_{\text{circ}}=\dfrac{(n-1)!}{(n-r)!}

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

ModeFormulan=5, r=2Real-world example
Permutation, no repeatn! / (n-r)!20Race finishing positions
Combination, no repeatn! / (r!(n-r)!)10Lottery number draw
Permutation, with repeatn^r252-digit PIN from 5 keys
Combination, with repeatC(n+r-1, r)15Ice cream scoops by flavor
Circular permutation(n-1)! / (n-r)!10Seating 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.

Sources

Written by Dr. Hannah Brandt, PhD Statistician · Munich, Germany

Applied statistician translating rigorous probability theory into clear, accurate tools for researchers and practitioners.

Search 3,500+ calculators

Loading search…