Permutation and Combination Calculator (nPr and nCr, With or Without Repeats)

Answer two questions, does the order matter and can items repeat, and the calculator picks the right formula, shows the working and gives the exact count even for huge numbers. It can also list every outcome for small cases and count the arrangements of the letters in a word.

Permutation and Combination Calculator

Enter n and r, choose whether order matters and whether repeats are allowed. All four counts are shown side by side so you can see the difference.

Permutation or Combination? Ask One Question

Does swapping two chosen items give a different outcome? If yes, the order matters and you need a permutation. If no, you need a combination. A podium (gold, silver, bronze) is a permutation, because Ana-Ben-Cy is different from Ben-Ana-Cy. A three-person committee is a combination, because the same three people are the same committee. The “combination lock” is really a permutation lock, since 3-1-4 and 4-1-3 open different locks.

SituationOrder matters?Repeats?Use
Top 3 finishers from 10 runnersYesNonPr = 720
Choose 4 toppings from 10NoNonCr = 210
4-digit PINYesYesnʳ = 10,000
3 scoops from 5 flavours (repeats allowed)NoYesC(n+r−1, r) = 35

The Four Formulas in One Table

Repeats not allowedRepeats allowed
Order matters (permutation)n! ÷ (n − r)!nʳ
Order does not matter (combination)n! ÷ [r! (n − r)!](n + r − 1)! ÷ [r! (n − 1)!]

The calculator shows all four for your n and r. The one matching your two answers is highlighted. Remember the link nPr = r! × nCr: a permutation is a combination whose members are then arranged in r! ways.

nPr Worked Example

How many ways can a president, secretary and treasurer be chosen from 10 members? n = 10, r = 3, order matters, no repeats: 10 × 9 × 8 = 720. You never need to compute the full factorials: multiply r numbers, starting at n and going down.

nCr Worked Example and Pascal’s Triangle

How many 4-topping pizzas from 10 toppings? 10P4 = 5,040 ordered picks, divided by 4! = 24 orderings of each pizza: 210. nCr is also the binomial coefficient: the numbers in Pascal’s triangle, where each entry is the sum of the two above it, and the coefficients when you expand (a + b)ⁿ. Symmetry helps: C(n, r) = C(n, n − r), so 50C48 is just 50C2 = 1,225.

Counting With Repetition

With repeats and order, each of the r slots has n choices: n × n × … = nʳ. A four-digit PIN has 10⁴ = 10,000 possibilities. With repeats but no order (“multichoose”), imagine r identical scoops sorted into n flavours. The count is C(n + r − 1, r), so 3 scoops from 5 flavours gives C(7, 3) = 35. The standard trick behind that formula is called “stars and bars”.

Arrangements of Letters (Repeated Items)

When some items are identical you divide out their swaps. MISSISSIPPI has 11 letters: four I, four S, two P, one M. The distinct arrangements are 11! ÷ (4! × 4! × 2!) = 34,650, against 39,916,800 if all letters were different. Use the “Letters in a word” tab for any word.

Real Numbers: Lottery, Poker and Passwords

QuestionCountChance of one exact guess
6 numbers from 49 (lottery)13,983,8161 in 13,983,816
5-card poker hand from 522,598,9601 in 2,598,960
8-character password, 62 symbols (a–z, A–Z, 0–9)218,340,105,584,896 (≈2.2×10¹⁴)1 in 2.2×10¹⁴
Arrange 8 books on a shelf40,3201 in 40,320

Our view: the best way to feel how large these numbers are is to compare combinations with permutations. A lottery that required the six numbers in drawn order would have 10,068,347,520 outcomes, about 720 times worse. See how to turn counts into chances in the probability calculator.

Special Cases: 0!, Circular Arrangements and Large n

0! = 1 because there is exactly one way to arrange nothing, and it keeps the formulas consistent (nC0 = nCn = 1). Around a round table, rotations count as the same seating, so n people can sit in (n − 1)! ways. The calculator uses exact big-integer arithmetic, so 100C50 = 100,891,344,545,564,193,334,812,497,256 is exact rather than rounded to a scientific-notation approximation.

nCr and nPr in Excel, TI-84 and Python

ToolnPrnCr
Excel / Sheets=PERMUT(n,r)=COMBIN(n,r)
With repeats=PERMUTATIONA(n,r)=COMBINA(n,r)
TI-84n MATH → PRB → nPr rn MATH → PRB → nCr r
Pythonmath.perm(n, r)math.comb(n, r)

Common Mistakes

  • Using nPr when the question really asks for a group (and vice versa).
  • Computing n! and (n − r)! separately and overflowing a calculator; multiply r terms instead.
  • Forgetting to divide by repeated-item factorials in word problems.
  • Using the no-repeat formulas for PINs, dice or passwords.

Why Students Get Stuck on Permutations and Combinations, and What a Good Calculator Should Do

Searching for help with permutations and combinations usually starts late at night with one problem that will not work out. The key question is whether order matters, and that is not always obvious. A good calculator fixes that by showing each step, checking its own answer and explaining the idea in plain words. This section covers what students struggle with, what they want, and how this page responds.

In short: students need to decide whether order matters, then count, not just see a final number, and a calculator earns trust only when its steps can be checked.

Understand the frustrations and desires

What they feel, and what they want

Each frustration points to a wish: a clearer step, a built-in check, an explanation in plain words.

  • Wants the order question asked first
  • Wants nPr and nCr side by side
  • Wants the factorials cancelled step by step

Build the page around their intent

Each intent has a place on this page

The page follows intent, not features, so each need has a clear starting point.

  • I need an answer now: type the problem into the calculator at the top of this page.10 choose 3
  • I need to understand: the sections below explain the idea in plain words and list the common mistakes.
  • I need to check my work: every step is shown, so the first line that differs from yours is the one to study.
  • I need practice: open the solver, tap + and choose Create Practice Test.
  • I need it explained aloud: in the solver, tap + and choose Create Video.

Our View: What Is Overrated, Underrated and Wrong About Permutations and Combinations

Overrated. Memorising nPr and nCr as two unrelated formulas. Both come from the same idea: choose in order, then divide out the repeats if order does not matter.

Underrated. One question before any formula: does order matter? Choosing a captain, a vice-captain and a treasurer from 10 people is 10 × 9 × 8 = 720. Choosing a committee of 3 from the same 10 is 720 ÷ 6 = 120.

Plain wrong. “A selection always means combinations.” If the places or roles are different, order matters and the answer is a permutation. When unsure, list a tiny case first, such as 2 places from 3 people, and count it by hand.

Test it: with n = 10 and r = 3 the permutation count should be 720 and the combination count 120.

Permutation and Combination: Questions People Ask

What is the difference between a permutation and a combination?

In a permutation the order matters (ABC differs from CBA). In a combination it does not (ABC and CBA are the same group).

What is the formula for nCr and nPr?

nPr = n! ÷ (n − r)! and nCr = n! ÷ [r! (n − r)!]. Also nPr = r! × nCr.

How many combinations of 4 numbers are there?

It depends on the rules. Choosing 4 from 10 digits with no repeats and no order is 210. A 4-digit code where order matters and digits can repeat has 10,000.

What does nCr mean on a calculator?

nCr (“n choose r”) is the number of ways to choose r items from n when order does not matter. On a TI-84 it is under MATH → PRB.

How do you know when order matters?

Ask whether swapping two chosen items gives a different outcome. If it does (ranks, codes, seating), use permutations; if not (teams, hands, toppings), use combinations.

What is 0! and why does it equal 1?

0! = 1 because there is exactly one way to arrange zero items, and defining it that way keeps formulas such as nC0 = 1 true.

How do I count combinations with repetition?

Use C(n + r − 1, r). For 3 scoops from 5 flavours that is C(7, 3) = 35.

How many ways can the letters of MISSISSIPPI be arranged?

11! ÷ (4! × 4! × 2!) = 34,650 distinct arrangements.

↑