complete.tools

Permutation Calculator

Count the ways to arrange r items out of n when order matters (nPr), with the matching combination count (nCr) for comparison.

What this tool does

Count the ways to arrange r items out of n when order matters (nPr), with the matching combination count (nCr) for comparison. You fill in these fields: Total items (n) and Items chosen (r). It shows permutations (nPr), where order matters and combinations (nCr), where order does not matter.

Inputs

  • Total items (n): A whole number. Accepts 0 to 170. The number of different items to choose from. Whole number from 0 to 170.
  • Items chosen (r): A whole number. Accepts 0 to 170. How many of those items you pick. Whole number from 0 up to n.

How to use

  1. Enter the total items (n).
  2. Enter the items chosen (r).
  3. Read the result: permutations (nPr), where order matters and combinations (nCr), where order does not matter. It appears once every required field has a valid value.

Worked examples

Example 1. Inputs:

  • Total items (n): 5
  • Items chosen (r): 2

Results:

  • Permutations (nPr), where order matters: 20
  • Combinations (nCr), where order does not matter: 10

How this is worked out: nPr = 5!/(5-2)! = 5 x 4 = 20 (5 choices for the first pick, 4 for the second). nCr = 20 / 2! = 20 / 2 = 10, because each pair appears twice in the ordered count (AB and BA).

Example 2. Inputs:

  • Total items (n): 10
  • Items chosen (r): 3

Results:

  • Permutations (nPr), where order matters: 720
  • Combinations (nCr), where order does not matter: 120

How this is worked out: nPr = 10 x 9 x 8 = 720. nCr = 720 / 3! = 720 / (3 x 2 x 1) = 720 / 6 = 120. P(10, 3) = 10 x 9 x 8 = 720. C(10, 3) = P / 3! = 720 / 6 = 120.

Example 3. Inputs:

  • Total items (n): 6
  • Items chosen (r): 0

Results:

  • Permutations (nPr), where order matters: 1
  • Combinations (nCr), where order does not matter: 1

How this is worked out: Edge case, r = 0. nPr = 6!/6! = 1 and nCr = 6!/(0! x 6!) = 1 because 0! = 1. There is exactly one way to pick nothing.

Example 4. Inputs:

  • Total items (n): 52
  • Items chosen (r): 5

Results:

  • Permutations (nPr), where order matters: 311,875,200
  • Combinations (nCr), where order does not matter: 2,598,960

How this is worked out: nPr = 52 x 51 x 50 x 49 x 48: 52 x 51 = 2652, x 50 = 132600, x 49 = 6497400, x 48 = 311875200. nCr = 311875200 / 5! = 311875200 / 120 = 2598960, the number of five-card poker hands.

Where this comes from

Permutations and combinations of r items from n. The number of ordered arrangements of r items out of n is n! / (n - r)!. The number of unordered groups is that divided by r!. Every item is different and is used at most once. Source: Combinatorics: the number of permutations of r items from n is n! / (n - r)!, and the number of combinations is n! / (r! (n - r)!).

Limitations

  • Counts arrangements and groups of distinct items only. Repeats, such as the same letter twice in a password, are not counted.
  • Only whole numbers from 0 to 170 are accepted for n and r.
  • Gives the number of arrangements and groups, not a list of them.
  • Very large results are shown rounded, so their last digits may not match an exact count.

FAQs

Q: What is the difference between a permutation and a combination?
A: A permutation counts arrangements where order matters, so picking A then B is different from picking B then A. A combination counts groups where order does not matter, so A and B count once. The permutation count is the combination count multiplied by r factorial.
Q: What do n and r mean?
A: n is the total number of different items you can choose from. r is how many of them you pick. An r that is larger than n is refused.
Q: Can r be 0?
A: Yes. Picking 0 items gives 1 result in both cases, because there is only one way to pick nothing.
Q: Why do the numbers stop at 170?
A: Factorials above 170! are too large to store as a normal number, so both n and r are limited to whole numbers from 0 to 170.
Q: Are repeated items counted?
A: No. Every item is taken to be different and each one can be used only once, so an arrangement cannot repeat an item.

Explore Similar Tools

Explore more tools like this one:

Compare