Permutation and Combination Calculator

Introduction: choosing between permutations and combinations

Permutation and combination counts answer a specific kind of question: how many selections can be made from distinct items when order either does or does not create a new outcome?

  • Permutation (nPr): counts ordered selections (order matters). Example: awarding 1st/2nd/3rd place, creating a PIN where each position is distinct, arranging speakers.
  • Combination (nCr): counts unordered selections (order doesn’t matter). Example: choosing a committee, selecting lottery numbers, picking toppings where order is irrelevant.

This calculator computes nPr, nCr, or both from your inputs n (total distinct items) and r (items selected).

Ask one practical question before entering values: would swapping two chosen items produce a different outcome? A first-place and second-place assignment changes when the people are swapped, so it is ordered and requires a permutation. A committee containing the same people does not change when its members are named in a different order, so it is unordered and requires a combination. This distinction matters more than the subject of the problem: teams, codes, rankings, schedules, and samples can all be either ordered or unordered depending on what is being counted.

Permutation and combination key definitions

Total items (n) and selected items (r) in a counting problem

For a permutation or combination calculation, n is the number of distinct available items and r is the number selected. These counts use whole numbers with 0 ≤ r ≤ n.

“Distinct” means that the available items are treated as individually identifiable for the count. For example, two different applicants are distinct even if they have similar qualifications. The formulas on this page also assume that an item cannot be selected twice. Enter the size of the available pool for n, not the number of positions, and enter only the number of positions or members actually selected for r.

Factorial (n!) for nPr and nCr

The factorial used in permutation and combination formulas for a non-negative integer n is the product of every integer from 1 through n:

n! = n × (n − 1) × … × 2 × 1, and by definition 0! = 1.

Factorials grow very fast (e.g., 20! is already about 2.43×1018), which is why results can become extremely large even for moderate inputs.

Permutation and combination formulas used

This calculator applies the standard formulas for selecting distinct items without repetition.

Permutation (order matters): nPr

The number of ordered ways to pick r items from n distinct items is:

P(n,r) = n! (nr)!

In an nPr count, there are n choices for the first position, n−1 for the next, and so on through r positions.

Combination (order doesn’t matter): nCr

The number of unordered ways to pick r items from n distinct items is:

C(n,r) = n! r!(nr)!

Each group of r selected items has r! possible orders, so the combination count removes those duplicate orders:

C(n, r) = P(n, r) / r!

Interpreting nPr and nCr results

Use the reported count according to whether rearranging the same selected items creates a different outcome in your problem.

  • If nPr is large, it means there are many distinct ordered outcomes (rankings, sequences, arrangements).
  • If nCr is large, it means there are many distinct groups you can form (teams, sets, selections) regardless of order.
  • If you choose Both, you can compare how much “order” increases the count. Often nPr = nCr × r!, so order multiplies the number of outcomes by r!.

A count is not a probability by itself. To turn a combination or permutation count into a probability, a problem must also specify the possible outcomes and which outcomes are favorable. The calculator is useful for the counting step in such problems, but it does not decide what outcomes are equally likely or whether a random process is involved.

Worked example: 10 candidates and 3 selections

Problem: You have n = 10 candidates and want to choose r = 3 people.

  • Combination (committee of 3): order does not matter.
    C(10, 3) = 10! / (3! · 7!) = (10·9·8) / (3·2·1) = 120
  • Permutation (gold/silver/bronze): order matters.
    P(10, 3) = 10! / 7! = 10·9·8 = 720

Interpretation: there are 120 possible groups of 3, but 720 possible podium outcomes because each group of 3 can be arranged into ranks in 3! = 6 ways.

Common permutation and combination scenarios

These examples show how the order question determines whether to enter a permutation or a combination calculation.

Scenario Does order matter? Use Expression
Choose 5 players from 12 for a team No Combination C(12, 5)
Award 1st, 2nd, 3rd place among 12 finalists Yes Permutation P(12, 3)
Create a 4-character code from distinct symbols (no repeats) Yes Permutation P(n, 4)
Select 6 books from 20 to pack (order irrelevant) No Combination C(20, 6)

For a seating question, be precise about whether every position is distinguished. Assigning people to numbered seats is ordered, while merely choosing who will attend is not. Likewise, a password example belongs here only when characters cannot repeat; allowing repeated digits or symbols changes the counting model. Careful wording prevents an apparently reasonable nPr or nCr result from answering a different question than the one intended.

Permutation and combination assumptions and limitations

Before relying on an nPr or nCr result, confirm that the choices are distinct and that your selection does not allow repetition.

  • Integers expected: n and r must be whole numbers; the calculator rejects decimal entries.
  • Typical domain: this page is for counting without repetition and uses 0 ≤ r ≤ n.
  • If r > n: for “without repetition” problems, the count is 0 (you can’t pick more distinct items than you have).
  • Very large values: factorial-based results become enormous quickly. Large n (even a few hundred) can exceed standard number sizes; the page may display scientific notation, big integers, or overflow depending on how results are implemented.
  • Repetition allowed? Not in nPr/nCr as defined here. If your problem allows repeats (e.g., PIN digits can repeat), you need different formulas (such as nr for ordered selections with repetition).

Use the displayed result as a count of idealized possibilities, not as a guarantee that every possibility is practical or permitted. Eligibility rules, duplicate-looking objects, restricted pairings, and other conditions can remove outcomes from a real-world selection. If restrictions matter, identify them before using the unrestricted formulas on this page.

Helpful permutation and combination properties

These identities provide quick checks on a permutation or combination result when the inputs are small enough to verify by hand.

  • Symmetry: C(n, r) = C(n, n − r). Choosing r items is the same as excluding n−r items.
  • Edge cases: C(n, 0) = 1 and P(n, 0) = 1 (there is exactly one way to choose “nothing”).

Another useful check is that the permutation result cannot be smaller than the corresponding combination result for the same valid inputs. They are equal when zero or one item is selected, because there is only one possible ordering in those cases. As r increases, the r! ordering factor explains why the gap between the two counts can grow quickly.

How to use this permutation and combination calculator

  1. Choose whether you need a Combination (nCr), a Permutation (nPr), or both counts.
  2. Enter Total Items (n), the number of distinct items available.
  3. Enter Items Selected (r), the number of distinct items to choose or arrange.
  4. Click Calculate, then check that your choice of ordered or unordered selection matches the situation you are counting.
Counting Problem

Arcade Mini-Game: Permutation and Combination Calculator Calibration Run

Use this quick arcade run to practice separating useful scenario inputs from common planning mistakes before you rely on the calculator output.

Score: 0 Timer: 30s Best: 0

Start the game, then use your pointer or arrow keys to catch useful inputs and avoid bad assumptions.

Embed this calculator

Copy and paste the HTML below to add the nPr & nCr Permutation and Combination Calculator | AgentCalc to your website.