Permutation and Combination Calculator

nPr · nCr · Repetition

Choose the number of objects n and the number selected r, indicate whether order matters and whether repetition is allowed, and get the exact count of permutations or combinations, with a full factorial breakdown and interpretation.

permutations (order matters) combinations (order doesn’t matter) with & without repetition exam & probability problems

Count permutations and combinations for n objects

Non-negative integer; typically n ≥ 1.

Non-negative integer; r = 0 is allowed (empty selection).

Scenario
Repetition
nPr nCr nr C(n + r − 1, r)

Permutations vs combinations – the core idea

In counting problems, we often need to answer questions like “How many ways can I arrange or choose items?”. The two main tools are:

  • Permutations: count arrangements (order matters).
  • Combinations: count selections (order does not matter).

For the same n and r, the number of permutations is always at least the number of combinations, because each unordered selection can be arranged in r! different ordered ways.

Core formulas

Permutations without repetition (n distinct objects, taking r): \[ {}_nP_r = P(n,r) = \frac{n!}{(n-r)!}, \] defined for integers 0 ≤ r ≤ n.

Combinations without repetition: \[ {}_nC_r = C(n,r) = \binom{n}{r} = \frac{n!}{r!(n-r)!}. \]

Permutations with repetition: \[ P_{\text{rep}}(n,r) = n^r, \] since each of the r positions can be filled with any of the n objects.

Combinations with repetition (or “multicombinations”): \[ C_{\text{rep}}(n,r) = \binom{n + r - 1}{r}, \] counting multisets of size r from n types.

How this calculator selects the right formula

Based on your choices of “Permutation/Combination” and “Repetition: yes/no”, the tool applies:

  • Permutation, no repetition → \(P(n,r) = \dfrac{n!}{(n-r)!}\)
  • Combination, no repetition → \(\binom{n}{r} = \dfrac{n!}{r!(n-r)!}\)
  • Permutation, repetition → \(n^r\)
  • Combination, repetition → \(\binom{n+r-1}{r}\)

Internally, the calculator uses efficient multiplicative formulas (instead of raw factorials) to avoid overflow and to keep results exact, even for quite large n and r.

Worked examples

Scenario Type n r Formula Count
Seat 3 of 10 students in a row Permutation, no repetition 10 3 10P3 = 10 · 9 · 8 720
Pick 3 students for a committee Combination, no repetition 10 3 10C3 = 10! / (3! 7!) 120
3-digit PIN from 10 digits (0–9) Permutation, repetition 10 3 103 1,000
Choose 3 scoops from 5 flavours (repetition allowed) Combination, repetition 5 3 C(5 + 3 − 1, 3) = C(7, 3) 35

Common mistakes and how to avoid them

  • Using permutations when order does not matter – this overcounts by a factor of r!.
  • Forgetting that, without replacement, r cannot exceed n.
  • Ignoring repetition when modelling PIN codes, rolling dice, or sampling with replacement.
  • Dropping constraints from the story – always translate the wording into “order?” and “repetition?”.

How this helps in probability and statistics

Once you know the number of possible outcomes and favourable outcomes, you can compute probabilities:

\[ \text{Probability} = \frac{\text{number of favourable outcomes}}{\text{total number of outcomes}}. \]

For example, when drawing 5 cards from 52 without replacement, the total number of possible hands is \(\binom{52}{5}\). If you want the probability of a specific pattern (say, a flush), the numerator will be another combination count, and the calculator can help you check both values.

Related combinatorics & algebra tools