Home/Statistics/Permutation & Combination

Permutation and Combination Calculator

Calculate permutations P(n,r) and combinations C(n,r) — also written nPr and nCr — with exact big-integer results, full factorial working, Pascal's triangle, and real-world examples.

Quick Answer: Permutation or Combination — Which Do I Need?

Ask one question: does the order of selection matter? If yes — arranging people in a line, awarding gold/silver/bronze, setting a PIN — use a permutation, P(n,r) = n! / (n−r)!. If no — picking a committee, choosing lottery numbers, dealing a poker hand — use a combination, C(n,r) = n! / (r! × (n−r)!). Combinations are always smaller than or equal to permutations, because C(n,r) = P(n,r) ÷ r! divides out all the ways the same r items could be reordered.

Calculate P(n,r) and C(n,r)
n (total items) ?
r (items chosen) ?

Factorial Calculator

n!
Results
C(10, 3) — Combinations
120
Ways to choose 3 from 10 (order doesn't matter)

P(10, 3) — Permutations
720
Ways to arrange 3 from 10 (order matters)
PropertyValue
Step-by-Step Working
Pascal's Triangle Calculator (first 10 rows) — C(n,r) values

Highlighted cell shows your C(n,r) result. Each value is the sum of the two above it.

Australian Lottery Odds Reference
LotteryDraw formatJackpot odds (C formula)Approx. odds
Tattslotto / Gold Lotto6 from 45C(45,6)1 in 8,145,060
Oz Lotto7 from 45C(45,7)1 in 45,379,620
Powerball (main)7 from 35 + 1 from 20C(35,7) × C(20,1)1 in 134,490,400
Set for Life8 from 37C(37,8)1 in 38,608,020

What Are Permutations and Combinations?

Permutations and combinations both count the number of ways to select r items from a larger set of n items — the difference is entirely about whether the order of selection is treated as meaningful. This single distinction is where most students, and most calculators used incorrectly, go wrong.

A permutation is an ordered arrangement. Choosing a president, vice-president and treasurer from 10 candidates is a permutation, because swapping who gets which role produces a genuinely different outcome. A combination is an unordered selection. Choosing 3 people from 10 to form a committee (with no distinct roles) is a combination, because the same three people form the same committee no matter what order you picked them in.

Combinations are also written as "n choose k" (or n choose r) — C(n,r) and "n choose k" mean exactly the same thing, just with a different choice of letter for the number of items selected. If you've searched for an "n choose k calculator," the calculator above is doing that same C(n,r) computation.

Permutation P(n,r)Combination C(n,r)
DefinitionOrdered selectionsUnordered selections
Order matters?Yes — ABC ≠ BACNo — ABC = BAC
Formulan! / (n−r)!n! / (r! × (n−r)!)
Example: 3 from {A,B,C,D}P(4,3) = 24C(4,3) = 4
Typical useRankings, passwords, seating plansCommittees, lottery numbers, card hands
💡 Did You Know? Combinations are also called "binomial coefficients," written as (n choose r) or ⁿCᵣ, and are the exact same numbers that make up Pascal's triangle — each row of the triangle is C(n,0), C(n,1), … C(n,n) for that value of n.

The Permutation and Combination Formulas

Permutation:   P(n,r) = n! / (n − r)!
Combination:   C(n,r) = n! / (r! × (n − r)!)
n = total items | r = items chosen | ! = factorial (n × (n−1) × … × 1)

The relationship between the two is straightforward: a combination is a permutation with the internal ordering "divided out."

P(n,r) = C(n,r) × r!
C(n,r) = P(n,r) / r!

Step-by-Step Calculation Examples

Example 1 — Committee of 3 from 10 people (combination)

Order does not matter, so use C(n,r): C(10,3) = 10! / (3! × 7!)
= (10 × 9 × 8) / (3 × 2 × 1) = 720 / 6 = 120
There are 120 different 3-person committees possible from 10 candidates.

Example 2 — Gold, silver, bronze from 8 athletes (permutation)

Order matters — who gets gold vs bronze is a different outcome — so use P(n,r): P(8,3) = 8! / 5!
= 8 × 7 × 6 = 336
There are 336 different ways to award the three medals among 8 athletes.

Example 3 — 5-card poker hand from a 52-card deck (combination)

A hand is the same hand regardless of the order the cards were dealt, so use C(n,r): C(52,5) = 52! / (5! × 47!)
= (52 × 51 × 50 × 49 × 48) / 120 = 2,598,960
There are nearly 2.6 million distinct 5-card hands.

Example 4 — 4-digit PIN with repetition allowed

This is neither a plain permutation nor combination, because digits can repeat: each of the 4 positions independently has 10 choices (0–9).
Total combinations with repetition = 10⁴ = 10,000
Note the everyday use of the word "combination" here is misleading — a bike lock "combination" is mathematically a permutation with repetition, because 1-2-3 and 3-2-1 open different locks.

Real-World Examples

ScenarioTypeCalculationResult
4-digit PIN from 0–9 (repeats allowed)Permutation with repetition10⁴10,000
Gold/silver/bronze from 8 athletesPermutation P(8,3)8!/(8−3)!336
5-card poker hand from 52Combination C(52,5)52!/(5!×47!)2,598,960
Australian Powerball (7 from 35)Combination C(35,7)35!/(7!×28!)6,724,520
Arranging 5 books on a shelfPermutation P(5,5)5!120
Choosing 2 toppings from 6 availableCombination C(6,2)6!/(2!×4!)15

How Many Combinations Are Possible With N Numbers?

A very common question is "how many combinations are there with 3, 5, 6 or 10 numbers?" — but the honest answer is "it depends what you mean," because this everyday phrasing can point to three different calculations. The table below uses the digits 0–9 (a pool of 10) to show all three at once, so you can see how different the answers really are.

Choosing r numbersCombinations C(10,r)
(order doesn't matter, no repeats)
Permutations P(10,r)
(order matters, no repeats)
With repetition, order matters
(like a PIN — 10ʳ)
3 numbers1207201,000
4 numbers2105,04010,000
5 numbers25230,240100,000
6 numbers210151,2001,000,000
7 numbers120604,80010,000,000
9 numbers103,628,8001,000,000,000
10 numbers13,628,80010,000,000,000

If your question is really "how many ways can I choose r numbers from a set of n, where order doesn't matter" (like a lottery), use the first column — the calculator above computes exactly this for any n and r you enter. If you mean a PIN or lock code where digits can repeat and order matters, use the third column (10ʳ, or nʳ for a pool of n symbols).

Common Mistakes

MistakeWhy it goes wrongHow to avoid it
Using C(n,r) when order actually mattersUndercounts the true number of outcomes by a factor of r!Ask "would swapping two selections create a different result?" — if yes, use P(n,r)
Calling everyday "combinations" mathematical combinationsA bike lock code is really an ordered permutation, since order mattersCheck whether repetition and order are involved before choosing a formula
Forgetting that 0! = 1Breaks the formula when r = n or r = 0Remember 0! is defined as 1, not 0, by convention
Losing precision on large factorialsOrdinary floating-point numbers only hold about 15–17 significant digitsUse exact integer arithmetic — this calculator computes big integers exactly
Applying permutations/combinations to selections with repetitionThe plain formulas assume every item is chosen at most onceUse nʳ for permutations with repetition, or the "stars and bars" formula for combinations with repetition
⚠️ Common Mistake: Assuming C(n,r) and C(n,n−r) are different. They are always equal — choosing 3 people to include is the same as choosing the other n−3 to exclude. C(10,3) = C(10,7) = 120.

Practical Applications

Probability calculations

Combinations are the backbone of classical probability. The chance of exactly k successes in n independent trials uses C(n,k) directly — for example, the probability of exactly 3 heads in 5 fair coin flips is C(5,3) × 0.5³ × 0.5² = 10 × 0.125 × 0.25 = 31.25%.

Lotteries and gambling odds

Every fixed-draw lottery's jackpot odds are a combination calculation, because the order the numbers are drawn in does not affect whether you win. Australian games like Tattslotto, Oz Lotto and Powerball are shown in the reference table above.

Cryptography and password strength

Password and PIN strength calculations use permutations with repetition, since each character position is chosen independently and order always matters — a 4-digit PIN space of 10,000 possibilities is exactly why banks require longer PINs or additional authentication factors.

Scheduling, rostering and team selection

Rostering staff into ordered shifts is a permutation problem; selecting an unordered squad or panel from a pool of candidates is a combination problem. Getting this distinction right is essential for correctly sizing "how many ways could this roster look" questions in operations and workforce planning.

Permutation & Combination Cheat Sheet

Quick Reference

Factorial: n! = n × (n−1) × … × 2 × 1, 0! = 1
Permutation: P(n,r) = n! / (n−r)!
Combination: C(n,r) = n! / (r! × (n−r)!)
Relationship: P(n,r) = C(n,r) × r!
Symmetry: C(n,r) = C(n, n−r)
Permutations with repetition:
All arrangements of n distinct items: P(n,n) = n!
Excel: =PERMUT(n,r), =COMBIN(n,r), =FACT(n)

Practice Questions

Beginner (with answers)

  1. Calculate 6!
  2. How many ways can you arrange 4 different books on a shelf?
  3. How many ways can you choose 2 people from a group of 5 for a two-person team (no distinct roles)?
  4. Is choosing a captain and vice-captain from a squad a permutation or a combination?
  5. What is C(7,7)?
Show answers

1) 6! = 720   2) P(4,4) = 4! = 24   3) C(5,2) = 10   4) Permutation — the two roles are different   5) C(7,7) = 1 (only one way to choose everyone)

Advanced (with answers)

  1. Find P(9,4).
  2. Find C(12,5).
  3. How many distinct 3-letter arrangements can be made from the letters A–J (no repeats)?
  4. A pizza shop offers 8 toppings. How many different 3-topping pizzas are possible?
  5. Verify that C(15,4) = C(15,11).
Show answers

1) P(9,4) = 9×8×7×6 = 3,024   2) C(12,5) = 792   3) P(10,3) = 10×9×8 = 720   4) C(8,3) = 56   5) Both equal 1,365, confirming the symmetry rule C(n,r) = C(n, n−r)

🔑 Key Takeaways

  • Permutation: order matters. Combination: order does not matter.
  • P(n,r) = n! / (n−r)! — selecting r items from n where order matters.
  • C(n,r) = n! / (r! × (n−r)!) — selecting r items from n where order does not matter.
  • C(n,r) = P(n,r) / r! — combinations divide out the r! internal arrangements.
  • C(n,r) always equals C(n, n−r), and C(n,r) values form Pascal's triangle.
  • Applications: passwords and rankings use permutations; lotteries and team selection use combinations.

Frequently Asked Questions

References

Last updated: August 2026
Reviewed by Mohsin Iqbal using standard combinatorics definitions, with every worked example independently verified. This page is for educational purposes.