Permutation and Combination Calculator

Enter the total number of items (n) and how many you choose (r) to compute permutations (nPr) and combinations (nCr).

โ€”

Permutations count arrangements where order matters; combinations count selections where it does not. nPr = n! รท (nโˆ’r)! and nCr = n! รท (r!(nโˆ’r)!). Choosing 2 from 5 gives 5P2 = 20 ordered arrangements and 5C2 = 10 unordered selections โ€” permutations are always greater than or equal to combinations.

Advertisement

How to Use This Calculator

Enter two whole numbers: n, the total number of distinct items you have, and r, the number you select or arrange. The calculator returns both the permutation count (nPr) and the combination count (nCr). The key question that decides which one you need is simple: does order matter?

If rearranging the same items counts as a different outcome โ€” like the order of finishers in a race, or the digits in a passcode โ€” you want permutations. If only the group matters and the order within it does not โ€” like choosing a committee, or picking lottery numbers โ€” you want combinations.

How the Calculation Works

A permutation counts ordered arrangements: for the first pick you have n choices, then nโˆ’1, and so on for r picks, giving nPr = n ร— (nโˆ’1) ร— โ€ฆ down r terms, which equals n! รท (nโˆ’r)!. A combination counts unordered selections, so it divides the permutation count by r! โ€” the number of ways to order the r chosen items, since those orderings are all considered the same selection. That gives nCr = n! รท (r!(nโˆ’r)!). This calculator uses the multiplicative forms to stay accurate even for larger n.

Worked Example

How many ways can you pick 2 items from 5? Permutations: 5P2 = 5! รท 3! = (5 ร— 4) = 20 โ€” there are 20 ordered arrangements (AB and BA count separately). Combinations: 5C2 = 5! รท (2! ร— 3!) = 20 รท 2 = 10 โ€” there are 10 unordered selections (AB and BA are the same pair). Notice nCr is exactly nPr divided by r! = 20 รท 2 = 10.

What the Result Means

nPr is always greater than or equal to nCr, because every unordered selection can be arranged in r! ordered ways. Combinations show up in probability constantly โ€” the number of 5-card poker hands is 52C5 = 2,598,960, and lottery odds are one over an nCr value. Permutations answer questions about sequences, rankings, seatings and passcodes. Getting the choice right is usually the hardest part of a counting problem; the arithmetic is the easy part this tool handles.

Assumptions and Limitations

Both formulas assume the n items are distinct and that each is chosen at most once (selection without replacement). They do not cover cases with repeated or identical items, selection with replacement, or circular permutations, which need modified formulas. For very large n and r the exact counts can exceed the range that can be shown precisely, so extreme values may be rounded. Enter whole numbers with r no larger than n.

Who Uses a Permutation and Combination Calculator

Students use this to compute nPr and nCr โ€” counting arrangements where order matters and selections where it does not. Run it for probability and counting problems, from lottery odds to poker hands to committee choices. Enter n and r to get both counts with the difference explained.

Frequently Asked Questions

What is the difference between a permutation and a combination?

A permutation counts arrangements where order matters (ABC differs from CBA). A combination counts selections where order does not matter (ABC is the same group as CBA). Permutations are always greater than or equal to combinations.

When do I use nPr versus nCr?

Use nPr when order matters โ€” races, rankings, passcodes, seat arrangements. Use nCr when only the group matters โ€” committees, lottery numbers, poker hands. Ask yourself whether reordering creates a new outcome.

How are nPr and nCr related?

nCr equals nPr divided by r!, because each unordered selection can be arranged in r! ordered ways. So combinations are permutations with the redundant orderings removed.

What does the ! (factorial) mean?

n! (n factorial) is the product of all whole numbers from 1 to n. For example 5! = 5 ร— 4 ร— 3 ร— 2 ร— 1 = 120. By definition 0! = 1.

How many 5-card hands are there in poker?

It is 52C5 = 2,598,960, since the order the cards are dealt does not matter. That is a combination, not a permutation.

Can r be larger than n?

No, not for selection without replacement โ€” you cannot choose more distinct items than exist. If r exceeds n, the count is zero, and this calculator asks you to fix the input.

Looking for a different calculator?

CalculatorPlus has free tools across finance, construction, math, health and more โ€” each one showing the formula and a worked example.