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.
Highlighted cell shows your C(n,r) result. Each value is the sum of the two above it.
Australian Lottery Odds Reference
Lottery
Draw format
Jackpot odds (C formula)
Approx. odds
Tattslotto / Gold Lotto
6 from 45
C(45,6)
1 in 8,145,060
Oz Lotto
7 from 45
C(45,7)
1 in 45,379,620
Powerball (main)
7 from 35 + 1 from 20
C(35,7) × C(20,1)
1 in 134,490,400
Set for Life
8 from 37
C(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)
Definition
Ordered selections
Unordered selections
Order matters?
Yes — ABC ≠ BAC
No — ABC = BAC
Formula
n! / (n−r)!
n! / (r! × (n−r)!)
Example: 3 from {A,B,C,D}
P(4,3) = 24
C(4,3) = 4
Typical use
Rankings, passwords, seating plans
Committees, 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 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
Scenario
Type
Calculation
Result
4-digit PIN from 0–9 (repeats allowed)
Permutation with repetition
10⁴
10,000
Gold/silver/bronze from 8 athletes
Permutation P(8,3)
8!/(8−3)!
336
5-card poker hand from 52
Combination 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 shelf
Permutation P(5,5)
5!
120
Choosing 2 toppings from 6 available
Combination 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 numbers
Combinations 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 numbers
120
720
1,000
4 numbers
210
5,040
10,000
5 numbers
252
30,240
100,000
6 numbers
210
151,200
1,000,000
7 numbers
120
604,800
10,000,000
9 numbers
10
3,628,800
1,000,000,000
10 numbers
1
3,628,800
10,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
Mistake
Why it goes wrong
How to avoid it
Using C(n,r) when order actually matters
Undercounts 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)
A bike lock code is really an ordered permutation, since order matters
Check whether repetition and order are involved before choosing a formula
Forgetting that 0! = 1
Breaks the formula when r = n or r = 0
Remember 0! is defined as 1, not 0, by convention
Losing precision on large factorials
Ordinary floating-point numbers only hold about 15–17 significant digits
Use exact integer arithmetic — this calculator computes big integers exactly
Applying permutations/combinations to selections with repetition
The plain formulas assume every item is chosen at most once
Use 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: 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
Permutations count ordered arrangements — {A,B,C} and {C,A,B} are different permutations. Combinations count unordered selections — {A,B,C} and {C,A,B} are the same combination. The key question is whether order matters: for passwords and race placings, yes (permutation); for lottery numbers and team selection, no (combination).
Permutation: P(n,r) = n! / (n−r)!. Combination: C(n,r) = n! / (r! × (n−r)!). Here n is the total number of items, r is how many are chosen, and ! denotes a factorial. The combination formula is the permutation formula divided by r!, because it removes the internal orderings that permutations count separately.
n! (n factorial) = n × (n−1) × (n−2) × … × 2 × 1. For example, 5! = 5×4×3×2×1 = 120. By convention, 0! = 1. Factorials grow extremely fast — 10! = 3,628,800 and 20! is already over 2.4 quintillion — which is why this calculator uses exact big-integer arithmetic rather than ordinary floating-point numbers, which lose precision beyond about 15–17 significant digits.
Ask whether swapping the order of two selected items would create a genuinely different outcome. If yes — for example, first place versus second place — use nPr. If no — for example, two people chosen for an unordered committee — use nCr. When in doubt, calculate both: nCr will always be smaller than or equal to nPr for the same n and r.
Combinations are essential for probability calculations. The probability of exactly k successes in n independent trials uses C(n,k): 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 = 0.3125, or 31.25%. Lottery and card-game odds are also combination probabilities.
nCr, also written C(n,r) or "n choose r," is the number of unordered ways to choose r items from n. nPr, also written P(n,r), is the number of ordered ways to arrange r items chosen from n. They are related by nPr = nCr × r!, so nCr is always the smaller (or equal) value.
By mathematical convention, 0! = 1 because there is exactly one way to arrange zero items — doing nothing. This convention also makes the permutation and combination formulas work correctly at the edges, such as C(n,0) = 1 and C(n,n) = 1, which both make intuitive sense: there is only one way to choose nothing, and only one way to choose everything.
Pascal's triangle is a triangular array of numbers where each row n lists the combination values C(n,0), C(n,1), … C(n,n), and each number is the sum of the two numbers above it. It provides a quick way to read off combination values for small n without calculating factorials directly, and it also appears in binomial expansion coefficients.
The standard nPr and nCr formulas assume each item can be selected at most once. When repetition is allowed — such as a PIN where digits can repeat — the count of ordered outcomes is simply nʳ (n choices for each of r positions). Combinations with repetition use a different formula, C(n+r−1, r), sometimes called "stars and bars."
Yes. The calculator uses JavaScript's native BigInt type to compute factorials, permutations and combinations with exact integer precision — not floating-point approximation — so results remain exact even for very large values of n and r, well beyond the point where ordinary calculators start rounding. Extremely large results are displayed in a shortened scientific-notation form with the exact digit count noted, since the full number can run to hundreds of digits.
"n choose k" is just another way of saying C(n,k) or C(n,r) — the number of unordered ways to choose k items from a set of n. It's read aloud as "n choose k" and written in textbooks as a column of two numbers in large parentheses. The calculator on this page computes n choose k directly: enter n and r (used here in place of k) and the "Combinations" result is your answer.
It depends what you mean by "combination." If you're choosing r numbers from a pool of 10 digits (0–9) where order doesn't matter and nothing repeats, C(10,3) = 120, C(10,5) = 252, C(10,6) = 210, and C(10,10) = 1. If you mean a PIN-style code where digits can repeat and order matters, the count is much larger: 10³ = 1,000 for 3 digits, up to 10¹⁰ = 10 billion for 10 digits. See the reference table above for the full comparison, or enter your own n and r into the calculator.
Most scientific calculators have a dedicated x! button, usually accessed via a "shift" or "2nd function" key — enter the number, then press x!. On this page, use the factorial calculator above: enter n and press "Calculate n!" to get the exact result, computed with full integer precision rather than the rounded floating-point result many physical calculators give for large values of n.
Last updated: August 2026
Reviewed by Mohsin Iqbal using standard combinatorics definitions, with every worked example independently verified. This page is for educational purposes.