Permutation & Combination Calculator

Calculate nPr and nCr, with and without repetition, as exact whole numbers even when the answer has thousands of digits.

Runs in your browser. Nothing is uploaded.

How many things you choose from.

How many you pick each time.

Combinations nCr

–

Order doesn’t matter, no repeats

Permutations nPr

–

Order matters, no repeats

How to use the Permutation & Combination Calculator

  1. Enter n, the total number of items to choose from.
  2. Enter r, how many you choose.
  3. Read nCr (order doesn't matter) and nPr (order matters).
  4. Below them are the counts when items can be repeated.

Count the ways

How many ways can a committee be chosen, a race finish, or a lottery draw come out? Questions like these are about counting arrangements. Enter how many items there are (n) and how many you pick (r) to get the four standard counts at once.

The four counts

  • Combinations, nCr = n! ÷ (r!(n − r)!): choose r items when order doesn’t matter and nothing repeats. Example: the number of 5-card poker hands from 52 cards is 52C5 = 2,598,960.
  • Permutations, nPr = n! ÷ (n − r)!: arrange r items in order with no repeats. Example: gold, silver and bronze among 10 runners can go 10P3 = 720 ways.
  • Permutations with repetition, nʳ: order matters and items can repeat. Example: 4-digit PINs, 10⁴ = 10,000.
  • Combinations with repetition, (n + r − 1)Cr: order doesn’t matter and items can repeat. Example: picking 3 scoops from 5 flavours, allowing doubles, gives 35 options.

Choosing the right one

Ask two questions. Does the order matter? If swapping two choices gives a different result, it’s a permutation; if not, it’s a combination. Can an item be chosen twice? If yes, use the repetition version.

Exact, however large

Factorials grow incredibly fast. 100C50 already has 30 digits. The calculator uses exact whole-number arithmetic, so every digit is correct. Long results are shown in scientific notation with the number of digits.

Private

Everything is calculated in your browser.

Frequently asked questions

What is the difference between a permutation and a combination?

In a permutation the order matters: first, second and third place are different outcomes. In a combination only the group matters: a hand of cards is the same whatever order you were dealt it.

When do I use the repetition versions?

When the same item can be picked more than once. A 4-digit PIN allows repeated digits, so there are 10⁴ = 10,000 of them. Choosing 3 scoops from 5 ice-cream flavours where repeats are allowed gives (5 + 3 − 1)C3 = 35 combinations.

How big can the numbers be?

n and r can go up to 100,000. Results are exact whole numbers; very long ones are shown in scientific notation with their digit count.

What if r is larger than n?

Without repetition there is no way to choose more items than you have, so nPr and nCr are 0. With repetition it's still possible, and those counts are shown.

Is anything uploaded?

No. All the counting happens in your browser.

Tutorials