Permutation and Combination Calculator

Count arrangements and selections: nPr and nCr, with or without repetition, as exact whole numbers with the formula worked out.

Runs in your browserNo sign-upWorks offline

The tool is loading…

What the Permutation and Combination Calculator does

Permutations and combinations count the ways to choose r items from n. In a permutation the order matters, as with medal positions or PIN codes; in a combination it does not, as with a team or a lottery ticket. The Permutation and Combination Calculator gives both, with or without repetition, as exact whole numbers however large, with the formula worked out for your numbers.

How to use it

  1. Enter n, the number of items to choose from.
  2. Enter r, the number you choose.
  3. Tick “Items can be repeated” if the same item can be chosen more than once.
  4. Read nCr and nPr.

Example

Choosing 3 of 10 people gives 10C3 = 120 possible groups, but 10P3 = 720 ordered line-ups, since each group can be ordered in 3! = 6 ways. A 5-card hand from a 52-card deck can be any of 52C5 = 2,598,960 combinations.

The formulas

nPr = n! ÷ (n − r)! and nCr = n! ÷ (r! × (n − r)!). With repetition allowed, there are nʳ ordered arrangements, as with a 4-digit PIN, 10⁴ = 10,000, and C(n + r − 1, r) unordered selections, such as choosing 3 scoops from 5 ice-cream flavours, which gives 35.

A quick test for which one you need: if swapping two chosen items gives a different result, as with first and second place, it is a permutation. If it gives the same result, as with two people on a committee, it is a combination.

Worked examples

QuestionFormulaAnswer
Pick 3 people from 10 for a team10C3120
Award gold, silver and bronze among 1010P3720
Choose 2 from 55C210
Arrange 5 books on a shelf5!120
A 4-digit PIN, digits can repeat10⁴10,000
Lottery: 6 numbers from 4949C613,983,816
5-card poker hands52C52,598,960

Ask whether order matters. If swapping two chosen items gives a different result, as with medals, use nPr. If not, as with a team, use nCr. For a single factorial, or very large ones, use the Factorial Calculator, and for the chance of an outcome, the Probability Calculator.

Questions people ask

Is anything I enter sent anywhere?

No. The calculator works entirely in your browser, so your numbers stay on your device.

Is a combination lock a combination?

No, despite the name. The order of the numbers matters, so it is really a permutation with repetition.

What is 0! and why is nC0 equal to 1?

0! is defined as 1, so there is exactly one way to choose nothing: n! ÷ (0! × n!) = 1.

How many ways can I arrange the letters of a word?

For n different letters, n!: 5 letters give 120 arrangements. With repeated letters, divide by the factorial of each repeat: BOOK gives 4! ÷ 2! = 12.

What do nPr and nCr mean?

n is how many items there are and r how many you take. nPr counts ordered arrangements, nCr counts selections where order does not matter.

Related tools