Combinations & Permutations Calculator
Enter your values
Enter your values and press Calculate — your answer, visual and step-by-step solution appear here.
What this calculator does
This combinations and permutations calculator computes both nCr (the number of combinations) and nPr (the number of permutations) from the two values you enter — n, the size of the group you choose from, and r, the number of items you select. It shows the full factorial working, not just the final number, so you can see exactly how the answer is built.
- Computes nCr — how many ways to choose r items from n when order does not matter.
- Computes nPr — how many ways to arrange r items from n when order matters.
- Shows full working — the factorial expansion and cancellation behind each result, step by step.
Permutation or combination? Does order matter?
One question decides everything: does rearranging the same items create a new outcome? If yes, you want a permutation. If no, you want a combination. Combinations always count fewer outcomes than permutations from the same n and r, because every group is counted once instead of once per arrangement.
- If order matters (ranks, positions, sequences) → use a permutation (nPr).
- If order is irrelevant (a set, a group, a hand) → use a combination (nCr).
| Situation | Use | Quick example |
|---|---|---|
| Order matters — rearranging counts as new | Permutation (nPr) | 1st, 2nd and 3rd place in a race |
| Order ignored — same items = same result | Combination (nCr) | A 5-card hand or a pizza topping set |
A useful tie-breaker for the nPr vs nCr decision: if you can describe each outcome with the word "ranked," "ordered," or "in a row," it is a permutation. If you describe it with "chosen," "selected," or "a group of," it is a combination.
Combination formula (nCr)
A combination counts how many distinct groups of r items you can pull from n items when order is irrelevant. The combination formula divides the permutation count by r! to remove the duplicate orderings. This value is also the binomial coefficient used in the binomial theorem.
Worked example — choose 3 books from 25 to take on a trip (order of the chosen books does not matter):
- Write the formula. 25C3 = 25! / (3! (25 − 3)!) = 25! / (3! · 22!)
- Cancel 22!. The 25! over 22! leaves only the top three factors: (25 · 24 · 23) / 3!
- Expand 3!. 3! = 3 · 2 · 1 = 6, so the expression is (25 · 24 · 23) / 6 = 13800 / 6.
- Divide. 13800 / 6 = 2300. There are 2300 ways to choose 3 books from 25.
Permutation formula (nPr)
A permutation counts how many ordered arrangements of r items you can make from n items. Because order matters, you do not divide by r!, which is why nPr is always at least as large as nCr. Notice that nPr = nCr × r!.
Worked example — from an 11-player squad, pick a team captain and a goalkeeper (these are distinct roles, so order matters):
- Write the formula. 11P2 = 11! / (11 − 2)! = 11! / 9!
- Cancel 9!. The 11! over 9! leaves only the top two factors: 11 · 10.
- Multiply. 11 · 10 = 110. There are 110 ways to assign the two roles.
With or without repetition — the four cases
The standard nCr and nPr formulas above assume without repetition (no item is reused). As a concept, counting also has with repetition (replacement) versions, where an item can be picked more than once. Putting all four cases side by side makes it easy to match a problem to the right formula. This calculator computes the two "without repetition" cases (nPr and nCr); the with-repetition formulas are shown so you can recognise and apply them by hand.
| Case | Formula | When to use | Tiny example |
|---|---|---|---|
| Permutation, without repetition | n! / (n − r)! | Order matters, no reuse | Race podium: 5P3 = 60 |
| Permutation, with repetition | nr | Order matters, reuse allowed | 4-digit PIN: 104 = 10000 |
| Combination, without repetition | n! / (r! (n − r)!) | Order ignored, no reuse | Lottery: 49C6 = 13,983,816 |
| Combination, with repetition | (n + r − 1)! / (r! (n − 1)!) | Order ignored, reuse allowed | 2 scoops from 3 flavors = 6 |
Worked example with repetition — a 4-digit PIN drawn from the 10 digits 0–9, where digits may repeat and order matters. Each of the 4 positions independently has 10 choices, so the count is 10 × 10 × 10 × 10 = 104 = 10,000 possible PINs. This is the "permutation with repetition" case.
Word permutations (repeated letters / multiset)
When you arrange a word whose letters repeat, dividing n! by the factorial of each repeated letter's count removes the arrangements that look identical. For a multiset with counts a, b, c, … the formula is:
Worked example — the distinct arrangements of MISSISSIPPI (11 letters: one M, four I, four S, two P): 11! / (1! · 4! · 4! · 2!) = 39,916,800 / (1 · 24 · 24 · 2) = 39,916,800 / 1152 = 34,650 distinct arrangements.
Worked examples and real-world uses
Working through varied scenarios with this combinations and permutations calculator makes the order-matters decision automatic:
- Lottery odds (combination). Choosing 6 numbers from 49 ignores order, so 49C6 = 13,983,816 — your odds of one ticket matching are 1 in 13,983,816.
- "Combination lock" (really a permutation). A 3-number lock dialed from 0–39 needs the digits in the correct order and allows repeats, so it has 403 = 64,000 settings. Despite the name, the math is a permutation with repetition.
- Committee selection (combination). Picking 4 members from 10 volunteers, all equal roles, gives 10C4 = 210 possible committees.
- Seating arrangement (permutation). Seating 3 of 5 guests in a front row of distinct chairs gives 5P3 = 60 orderings. Combinatorics like this also feeds into probability and statistics tools such as the standard deviation calculator.
How to use this calculator
- Enter n — the total number of items you are choosing from.
- Enter r — the number of items you select or arrange (r must be no larger than n).
- Press Calculate to read both nCr and nPr at once.
- Open the Steps tab to see the full factorial working behind each result.
Using the combinations and permutations calculator this way lets you check homework and confirm the formula matches the problem before you commit to it by hand. For sequence-based counting you can pair it with the sequence and series calculator.
Studying for AP Statistics? Counting techniques underpin the probability rules in Unit 2.
Frequently asked questions
-
What is the difference between a permutation and a combination?
A permutation counts arrangements where order matters, so rearranging the same items gives a new outcome. A combination counts selections where order is ignored, so the same items always count once. That is why nPr is always at least as large as nCr.
-
What does nCr mean?
nCr is the number of combinations — how many ways to choose r items from n when order does not matter. It equals n! / (r!(n − r)!) and is also called the binomial coefficient. This permutation and combination calculator returns nCr for any valid n and r.
-
What does nPr mean?
nPr is the number of permutations — how many ordered arrangements of r items you can make from n. It equals n! / (n − r)!. Because order matters, nPr counts more outcomes than nCr; in fact nPr = nCr × r!.
-
When do I use permutations with repetition?
Use permutations with repetition when order matters and an item can be reused, such as digits in a PIN or characters in a password. The count is n^r — n choices for each of the r positions, independently — rather than n! / (n − r)!.
-
Is a combination lock a permutation or a combination?
Mathematically it is a permutation. The numbers must be entered in the correct order and may repeat, so a 3-number lock dialed from 40 values has 40^3 settings. The everyday name "combination lock" is misleading because order genuinely matters.
-
Can n be smaller than r?
Not for standard nCr or nPr without repetition — you cannot choose or arrange more distinct items than you have, so r must be no larger than n. If r exceeds n, both nCr and nPr are zero. Repetition is the only setting where selecting more than n picks makes sense.
Using binomial probabilities in AP Statistics? See binomial distribution on the TI-84 and Desmos, where the combinations formula meets the calculator commands.