Category

Combinations & Permutations Calculator

Formula

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.

Exact arithmetic: results use exact integer math, so large factorials stay precise with no floating-point rounding.

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.

SituationUseQuick example
Order matters — rearranging counts as newPermutation (nPr)1st, 2nd and 3rd place in a race
Order ignored — same items = same resultCombination (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.

nCr = n! / (r! (n − r)!)

Worked example — choose 3 books from 25 to take on a trip (order of the chosen books does not matter):

  1. Write the formula. 25C3 = 25! / (3! (25 − 3)!) = 25! / (3! · 22!)
  2. Cancel 22!. The 25! over 22! leaves only the top three factors: (25 · 24 · 23) / 3!
  3. Expand 3!. 3! = 3 · 2 · 1 = 6, so the expression is (25 · 24 · 23) / 6 = 13800 / 6.
  4. 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!.

nPr = n! / (n − r)!

Worked example — from an 11-player squad, pick a team captain and a goalkeeper (these are distinct roles, so order matters):

  1. Write the formula. 11P2 = 11! / (11 − 2)! = 11! / 9!
  2. Cancel 9!. The 11! over 9! leaves only the top two factors: 11 · 10.
  3. Multiply. 11 · 10 = 110. There are 110 ways to assign the two roles.
Sanity check: the matching combination 11C2 = 55, and 55 × 2! = 110 = 11P2 — the arrangement count is exactly twice the selection count.

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.

CaseFormulaWhen to useTiny example
Permutation, without repetitionn! / (n − r)!Order matters, no reuseRace podium: 5P3 = 60
Permutation, with repetitionnrOrder matters, reuse allowed4-digit PIN: 104 = 10000
Combination, without repetitionn! / (r! (n − r)!)Order ignored, no reuseLottery: 49C6 = 13,983,816
Combination, with repetition(n + r − 1)! / (r! (n − 1)!)Order ignored, reuse allowed2 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:

arrangements = n! / (a! · b! · c! · …)

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:

How to use this calculator

  1. Enter n — the total number of items you are choosing from.
  2. Enter r — the number of items you select or arrange (r must be no larger than n).
  3. Press Calculate to read both nCr and nPr at once.
  4. 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

Using binomial probabilities in AP Statistics? See binomial distribution on the TI-84 and Desmos, where the combinations formula meets the calculator commands.