The key difference: order matters for permutations but does not matter for combinations. Choosing a 3-digit code cares about order (permutation); choosing 3 lottery numbers does not (combination). Our combination calculator and permutation calculator handle all four scenarios — with and without repetition — in a single interface.

The Formulas

Permutation (order matters): P(n,r) = n! / (n−r)!
Combination (order doesn't matter): C(n,r) = n! / (r! × (n−r)!)

The combination calculator (nCr) counts selections where the arrangement is irrelevant — useful for lottery odds, poker hands, and committee formation. The permutation calculator (nPr) counts arrangements where position matters — essential for password analysis, race outcomes, and scheduling problems.

With Repetition

TypeFormulaExample
Permutation (no repeat)n! / (n−r)!Top 3 from 10: 720
Permutation (with repeat)nr3-digit code: 10³ = 1000
Combination (no repeat)n! / (r!(n−r)!)3 from 10: 120
Combination (with repeat)C(n+r−1, r)Choose 3 from 10 types: 220

Permutations with repetition are the simplest: nr. A 4-digit PIN with digits 0-9 has 10⁴ = 10,000 possibilities. Combinations with repetition use the "stars and bars" formula C(n+r-1, r) — for example, choosing 3 scoops of ice cream from 5 flavors (you can repeat flavors) gives C(5+3-1, 3) = C(7,3) = 35 possibilities. The repetition formulas work for any r value, even when r exceeds n.

Worked Examples

How many ways to choose 3 toppings from 10 available pizza toppings (order doesn't matter, no repetition)? C(10,3) = 10! / (3! × 7!) = 3,628,800 / (6 × 5,040) = 120 ways.

How many ways to award gold, silver, and bronze medals to 10 athletes (order matters, no repetition)? P(10,3) = 10! / 7! = 10 × 9 × 8 = 720 ways. Notice this is 6 times larger than C(10,3) = 120, because for each group of 3 athletes there are 3! = 6 ways to arrange them on the podium.

The Factorial Function

The factorial n! = n × (n−1) × ... × 2 × 1 is the building block of all combinatorial formulas. 0! is defined as 1. Factorials grow extremely fast — 10! = 3,628,800, 20! ≈ 2.43 × 10¹⁸, and 70! exceeds 10¹⁰⁰. Our factorial calculator provides step-by-step expansion for small n and handles large values up to n = 170.

Why Combinations and Permutations Matter

These counting principles are fundamental to probability theory. The binomial coefficient C(n,k) appears in the binomial distribution formula. Lottery odds are purely combinatorial calculations. Poker hand probabilities rely on combinations. In computer science, permutations are essential for algorithm analysis and cryptography.

Common Mistakes

  • Using permutation when combination is needed: If order doesn't matter (like choosing a committee), use nCr, not nPr.
  • Forgetting about repetition: A combination lock is actually a permutation with repetition — order matters and digits can repeat.
  • Applying to non-discrete problems: Combinations count discrete selections, not continuous partitions.
  • Confusing C(n,r) with C(n,n-r): Choosing r items to include is the same as choosing n-r to exclude, so C(10,3) = C(10,7) = 120.
When do I use combinations vs permutations?
Use permutations when the arrangement matters (like a race result: 1st, 2nd, 3rd). Use combinations when only the selected items matter (like lottery numbers).
What does "with repetition" mean?
You can choose the same item more than once. For example, a combination lock where 1-2-3 is different from 3-2-1 and you can repeat digits like 1-1-1.
Why does C(n,r) = C(n,n−r)?
Choosing r items to include is the same as choosing n−r items to exclude. C(10,3) = C(10,7) = 120.
What is the factorial of 0?
0! = 1 by definition. This makes combinatorial formulas work correctly (e.g., P(n,0) = n! / (n-0)! = n! / n! = 1).
Can I use r > n with repetition?
Yes. Combinations with repetition C(n+r-1, r) and permutations with repetition n^r work for any r, even when r exceeds n. The calculator handles this automatically.

Combinations and permutations are fundamental counting tools used across mathematics, computer science, and everyday life. In computer science, permutations are used in sorting algorithm analysis and cryptography. Combinations appear in probability calculations for lottery odds, poker hands, and genetic combinations.

In business, permutations calculate the number of ways to schedule tasks or arrange products on a shelf. Combinations determine the number of possible teams from a group of employees or the number of sample combinations in quality control testing.

With repetition, combinations model scenarios like choosing donuts from a shop (you can pick the same flavor multiple times). Permutations with repetition model password combinations and lock codes. Our calculator handles all four variants — nCr, nPr, with and without repetition — making it a complete toolkit for combinatorial mathematics.

Common Values

C(10,3) = 120

C(52,5) = 2,598,960

P(10,3) = 720

P(52,5) = 311,875,200