Skip to content
ENExplore Calculators

Permutation and Combination Calculator

Count arrangements and selections with nPr, nCr, and repetition variants.

About Permutation and Combination Calculator

Permutations count ordered arrangements. If you choose r items from n in a specific order, the number of ways is nPr = n!/(n−r)!. Combinations count unordered selections; the order of the chosen items doesn't matter: nCr = n!/(r!(n−r)!). When repetition is allowed — the same item can be chosen more than once — permutations become nʳ and combinations become C(n+r−1, r).

Formulas

Permutation (no repetition)

nPr = n! / (n−r)!

n
Total items
r
Items chosen

Combination (no repetition)

nCr = n! / (r! × (n−r)!)

Permutation (with repetition)

Permutations with repetition = nʳ

Combination (with repetition)

Combinations with repetition = C(n+r−1, r)

Worked example

With the default values below, Permutation and Combination Calculator returns nPr — Permutations (no repetition) of 720. Change any input above and every figure here is recalculated in your browser.

Inputs used

Total items (n)accepts 0–170
10
Items chosen (r)accepts 0–170
3

Results

nPr — Permutations (no repetition)Ordered arrangements of r items chosen from n, without replacement.
720
nCr — Combinations (no repetition)Unordered selections of r items chosen from n, without replacement.
120
Permutations (with repetition)nʳ ordered arrangements when items may repeat.
1,000
Combinations (with repetition)C(n+r−1, r) unordered selections when items may repeat.
220
n!
3,628,800
r!
6
(n−r)!
5,040

Step by step

  1. 1nPr (order matters, no repetition)= 720
  2. 2nCr (order does not matter, no repetition)= 120
  3. 3Permutations with repetition (order matters)= 1,000
  4. 4Combinations with repetition (order doesn't matter)= 220

Assumptions and limits

  • The result is derived only from the 2 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to whole numbers, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

What is the difference between a permutation and a combination?

Order matters in permutations, not in combinations. Choosing the three people {Alice, Bob, Carol} for a committee is one combination but six permutations (ABC, ACB, BAC, BCA, CAB, CBA). Use permutations when sequence matters (race finishing positions, PIN codes); use combinations when it doesn't (lottery draws, team selection).

When do I use the repetition variants?

Use permutations with repetition (nʳ) when items can be reused: e.g., counting 4-digit PINs from digits 0–9 = 10⁴ = 10,000. Use combinations with repetition (C(n+r−1,r)) for unordered selections where repeats are allowed: e.g., choosing 3 ice cream scoops from 5 flavours when you can repeat flavours.

Why is n limited to 170?

171! overflows JavaScript's float64 to Infinity. For n ≤ 170 the factorial stays representable. If you need exact arithmetic for larger n you would need a big-integer library, which this platform does not include.

How is nCr computed without overflow?

The implementation uses k = min(r, n−r) and divides as it multiplies, keeping intermediate values small. This makes C(60, 30) = 118,264,581,564,861,424 computable exactly in float64, well beyond what a naive factorial ratio would handle.

Permutation and Combination Calculator | Calcrivo