Combinations & Permutations Calculator
Enter values for n (total items) and r (items chosen/arranged). Choose whether order matters and whether repetition is allowed.
What this calculator does
This calculator helps you quickly solve counting problems using combinations and permutations. These ideas appear in probability, statistics, coding interviews, games, scheduling, and real-life planning. If you've ever asked “How many possible ways?”, this is the right tool.
Combinations vs. permutations (the key difference)
Permutation: order matters
Use a permutation when different orders count as different outcomes. For example, gold-silver-bronze medals are ordered, so ABC and BAC are different results.
- Without repetition: P(n, r) = n! / (n-r)!
- With repetition: nr
Combination: order does not matter
Use a combination when you only care which items are chosen, not their order. If you are selecting a committee, ABC is the same as BAC.
- Without repetition: C(n, r) = n! / (r!(n-r)!)
- With repetition: C(n+r-1, r)
How to use this tool
- Enter n, the number of available distinct items.
- Enter r, the number chosen or arranged.
- Choose Combination or Permutation.
- Check Allow repetition if items can be reused.
- Click Calculate to get the exact integer result.
Quick examples
1) Committee selection
From 10 people, how many 3-person committees can be formed?
Order does not matter, no repetition: C(10, 3) = 120.
2) Podium outcomes
From 10 runners, how many ways can 1st, 2nd, and 3rd place be assigned?
Order matters, no repetition: P(10, 3) = 720.
3) PIN code possibilities
How many 4-digit codes can be made from digits 0–9 if repeats are allowed?
Order matters, with repetition: 104 = 10,000.
Common mistakes to avoid
- Using combinations when order actually matters.
- Forgetting whether repetition is allowed.
- Trying to use non-integers or negative values for n and r.
- Using r > n in non-repetition mode (not valid).
Where these formulas are useful
- Probability and statistics problems
- Lottery and game analysis
- Password and lock-code counting
- Classroom seating or team assignments
- Data science feature-set counting
Final tip
If you’re unsure which formula to use, ask one question first: “Would swapping the order create a new outcome?” If yes, use permutations. If no, use combinations.