How to Calculate Permutations and Combinations

Learn nPr vs nCr, when order matters, factorial formulas, and everyday counting examples — with clear steps and a free permutations calculator.

By Generatr Team

Permutations count arrangements where order matters. Combinations count selections where order does not. Both use factorials and the same n and r inputs, but they answer different questions — “how many ways to line up 3 of 10 runners?” vs “how many ways to pick 3 of 10 runners for a team?”

This guide defines nPr and nCr, builds them from factorials, compares order vs unordered choices, and walks through passwords, committees, and race examples. When you want instant nPr and nCr with step breakdowns, open the free permutation and combination calculator.

Once the order test is automatic, combinatorics word problems stop feeling like a coin flip between two formulas.

Free tool

Use the Permutation & Combination Calculator now

Open the interactive permutation & combination calculator in your browser — free, instant, no signup.

Open Permutation & Combination Calculator

What Is the Difference Between nPr and nCr?

Permutation P(n, r) or nPr = number of ways to choose r items from n and arrange them. Order matters: ABC and ACB are different.

Combination C(n, r) or nCr (“n choose r”) = number of ways to choose r items from n with no regard to order. {A,B,C} is one set no matter how you list it.

Question typeUseExample
Rankings, codes, lineups, passwords (position matters)nPr1st/2nd/3rd place
Committees, hands of cards, pizza toppings (set only)nCrPick 3 toppings

Rule of thumb: if swapping two chosen people (or digits) creates a new outcome you care about, use permutations. If the outcome is only “who is in the group,” use combinations.

Counts feed probability later: favorable ÷ total. Event probability rules live in the free probability calculator and probability guide.

How Do Factorials Power These Formulas?

Factorial n! = n × (n−1) × … × 1, with 0! = 1 by definition.

  • 4! = 4×3×2×1 = 24
  • 5! = 120
  • 6! = 720

n! counts permutations of n distinct items when you use all of them (line up n people: n choices for first slot, n−1 for second, …).

Formulas

nPr = n! / (n − r)! = n × (n−1) × … × (n−r+1)

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

The extra ÷ r! in combinations removes the r! internal orderings of each group that permutations counted separately.

Check relationship

For n=5, r=3: 5P3 = 5×4×3 = 60. 5C3 = 60 / 3! = 60/6 = 10. Same as 5!/(3!2!) = 120/(6×2) = 10.

Constraints: 0 ≤ r ≤ n for standard non-negative integers; otherwise the usual school formulas are undefined or zero in context.

When Does Order Matter (and When Not)?

Train yourself with a one-sentence test before picking a formula.

Order matters → permutation

  • Race medals: Alice, Bob, Cara vs Cara, Bob, Alice are different podium results
  • PIN codes: 1-2-3-4 ≠ 4-3-2-1
  • Assigning roles: president vs treasurer from the same two people
  • Playlist order if sequence is the product

Order does not matter → combination

  • Choosing 4 people for a committee with equal status
  • 5-card poker hands (suits and ranks matter as a set, not draw order)
  • Selecting 3 pizza toppings from 10 when the pizza is just “has those toppings”
  • Picking 2 days off in a week if only the set of days matters

Edge phrasing

“How many ways can 3 of 10 students stand in a line?” → permutation. “How many ways can 3 of 10 students be chosen to present?” without order → combination. “How many ways can 3 of 10 be chosen for president, secretary, treasurer?” → permutation (roles order the selection).

What Are Everyday Permutation and Combination Examples?

Worked numbers you can reuse on homework and interviews.

Permutations

  • Podium: 8 runners, top 3 ordered → 8P3 = 8×7×6 = 336
  • Distinct digit codes: 4-digit codes from digits 0–9 with no repeat, order matters → 10P4 = 10×9×8×7 = 5040 (adjust if leading zero is banned)
  • Full lineup of 5: 5P5 = 5! = 120

Combinations

  • Committee: 12 people, choose 4 → 12C4 = 495
  • Cards: 52C5 = 2,598,960 five-card hands
  • Toppings: 10 choose 3 → 10C3 = 120

Same n, r — different answers

10 people, pick 3: 10P3 = 720 ordered triples; 10C3 = 120 groups. Factor of 3! = 6 between them, as expected.

When you summarize many trial outcomes (mean score, mean payout), averages use a different toolkit — see the average calculator guide.

How Do You Calculate nPr and nCr Step by Step?

Prefer the product form so you never expand full n! for large n.

nPr steps

  1. Confirm order matters and 0 ≤ r ≤ n.
  2. Write r factors: start at n, multiply downward.
  3. Example: 7P3 = 7×6×5 = 210

nCr steps

  1. Confirm order does not matter.
  2. Compute nPr, then divide by r!, or use nCr = n! / (r!(n−r)!).
  3. Cancel factors early: 7C3 = (7×6×5)/(3×2×1) = 210/6 = 35

Calculator workflow

  1. Open the free permutation and combination calculator.
  2. Enter n (total) and r (chosen).
  3. Read both nPr and nCr to compare.
  4. Match the formula to the word problem’s order test.
  5. State units in words (“ways,” “committees,” “codes”).

For “what percent of hands include an ace?” style follow-ups, convert counts to percents with the free percentage calculator.

What Restrictions and Mistakes Should You Watch For?

Real problems add constraints; formulas assume distinct items and simple choose-r rules unless stated.

  • Repetition allowed — PINs with repeated digits use nʳ, not nPr
  • Identical objects — divide by factorials of repeats (multiset permutations)
  • Circular arrangements — often (n−1)! for n distinct seats around a table
  • r > n — standard nPr/nCr without replacement are 0 / undefined for school formulas
  • Using nCr when roles differ — undercounts if positions are labeled
  • Using nPr when only the set matters — overcounts by r!

Sanity checks: nCn = 1, nC0 = 1, nC1 = n, nPn = n!, nP1 = n, nP0 = 1. 5C2 should equal 5C3 (symmetry: C(n,r)=C(n,n−r)).

Practice three word problems you rephrase in one sentence: “order matters?” If you hesitate, list a tiny case (n=3,r=2) and count by hand before using the formula.

Step-by-Step Instructions

  1. 1Open the free permutation and combination calculator on Generatr.
  2. 2Identify n (size of the pool) and r (how many you take).
  3. 3Decide whether order matters using a one-sentence test.
  4. 4If order matters, compute nPr = n×(n−1)×…×(n−r+1).
  5. 5If order does not matter, compute nCr = nPr / r! (or full factorial form).
  6. 6Cancel factors early to keep intermediate numbers small.
  7. 7Compare both outputs when the wording is ambiguous, then pick the matching interpretation.
  8. 8Label the answer as ways, codes, committees, or hands so the unit matches the story.

Frequently Asked Questions

What is the difference between a permutation and a combination?+

Permutations count ordered arrangements (ABC ≠ ACB). Combinations count unordered sets ({A,B,C} is one group). Use nPr when order matters and nCr when it does not.

What is the formula for nPr?+

nPr = n! / (n−r)! = n×(n−1)×…×(n−r+1). Example: 8P3 = 8×7×6 = 336.

What is the formula for nCr?+

nCr = n! / (r!(n−r)!) = nPr / r!. Example: 7C3 = (7×6×5)/(3×2×1) = 35.

When should I use permutations vs combinations?+

Use permutations for rankings, passwords, and assigned roles. Use combinations for committees, hands of cards, and any selection where only membership matters.

Why do you divide by r! for combinations?+

Each unordered group of r items corresponds to r! different orders. Permutations count all of those orders; dividing by r! collapses them into one combination.

Is Generatr’s permutation and combination calculator free?+

Yes. It runs in your browser for nPr, nCr, factorial breakdowns, and comparisons without signup.

Ready to try it yourself?

Use the free Permutation & Combination Calculator — no download, no account.

Launch Permutation & Combination Calculator