Combinations & Permutations Calculator
Calculate combinations (nCr) and permutations (nPr) for any n and r. Learn factorial formulas and combinatorics.
Calculator inputs
Combinatorics Inputs
The total number of items to choose from.
The number of items being selected or arranged.
Your results
Sources & methodology
- Formula:
- Combinations (order does not matter)
- Reference:
- Wolfram MathWorld
- Content last updated:
- Scheduled re-verification:
- September 2027
Calculation type: Exact calculation. Figures are taken from Wolfram MathWorld — see sources below.
How to Use This Calculator
- Enter n and r
n = total items, r = how many you're selecting.
- See Results
Both combinations and permutations are computed instantly with formulas shown.
Example: C(10,3) and P(10,3)
Choosing 3 items from 10.
- n (Total Items)
- 10
- r (Items to Choose)
- 3
- Combinations (nCr)
- 120
- Permutations (nPr)
- 720
Understanding Your Results
- Combinations (nCr)Order DOESN'T matter. C(n,r) = n! / (r! × (n−r)!). Example: choosing 3 toppings from 10: C(10,3) = 120 ways. ABC = ACB = BAC — all count as one combination.
- Permutations (nPr)Order DOES matter. P(n,r) = n! / (n−r)!. Example: arranging 3 books from 10 on a shelf: P(10,3) = 720 ways. ABC ≠ ACB — different orders count separately.
Key Tips
- Combinations are always less than or equal to permutations for the same n and r.
- n must be ≥ r. If r > n, the result is 0.
- C(n,r) = C(n, n−r). Choosing 3 from 10 is the same as choosing 7 from 10.
Combinatorics Fundamentals
Combinations vs Permutations
The key difference is whether order matters. Combinations are for selection (picking a committee, lottery numbers, card hands). Permutations are for arrangement (seating order, race rankings, lock combinations where order matters). Mathematically, P(n,r) = C(n,r) × r! — permutations equal combinations multiplied by factorial of r, since each combination can be arranged in r! different orders.
Worked examples
A lottery that draws 6 numbers from 49 where order does not matter has C(49,6) = 13,983,816 possible tickets. A race with 8 runners where gold, silver and bronze are awarded has P(8,3) = 8 × 7 × 6 = 336 possible podiums, because order matters. A four-digit PIN with no repeated digit is P(10,4) = 5,040, while a PIN that allows repeats is not covered by these formulas at all, because it is 10⁴ = 10,000 with replacement.
Common mistakes
The most frequent error is using permutations when the question asks for a group, which overstates the answer by a factor of r!. The second is applying these formulas when items can repeat: choosing with replacement needs different formulas (nʳ for ordered selections, C(n+r−1, r) for unordered). Finally, remember that the items must be distinct; arranging the letters of a word with repeated letters needs the count divided by the factorials of the repeats.
Formula & methodology
Formula used
Combinations (order does not matter)
C(n, r) = n! ÷ (r! × (n − r)!)How many ways r items can be chosen from n when the order of the selection is irrelevant.
Permutations (order matters)
P(n, r) = n! ÷ (n − r)!How many ways r items can be arranged from n when the order matters.
Relationship
P(n, r) = C(n, r) × r!Every combination can itself be arranged in r! orders, which is what separates the two counts.
Variable definitions
| Symbol | Meaning | Unit |
|---|---|---|
| n | Total items. the size of the set to choose from | count |
| r | Items chosen. how many are selected or arranged; cannot exceed n | count |
Step-by-step calculation
- 1. Enter n and rBoth must be non-negative whole numbers with r no greater than n.
- 2. Read both resultsThe calculator shows combinations and permutations together so the distinction is visible.
Limitations
- Both counts assume the items are distinct and that nothing is selected twice — these are the without-replacement formulas.
- Results are exact only while they stay within JavaScript's safe integer range; very large n and r lose precision.
- Combinations are computed multiplicatively rather than by evaluating n! directly, which keeps moderate inputs accurate.
This page is educational. It applies the formula described above to the figures you enter and shows the arithmetic behind the result. The output is only as good as the inputs and the assumptions listed here, and it is general information rather than advice about your particular situation.
Sources & references
- Combinatorics — combinations and permutations formulas — Wolfram MathWorld
Frequently Asked Questions
What's the difference between combinations and permutations?
Combinations: order doesn't matter (picking a team). Permutations: order matters (arranging a sequence). C(n,r) = n!/(r!(n−r)!), P(n,r) = n!/(n−r)!.
What is 10 choose 3?
C(10,3) = 120. There are 120 ways to choose 3 items from 10 when order doesn't matter.
What happens if r is greater than n?
Both combinations and permutations are 0 — you can't choose or arrange more items than exist in the set. The calculator enforces n ≥ r.
Why is C(n,r) always equal to C(n, n−r)?
Choosing r items to include is the same as choosing n−r items to leave out, so both selections describe the same set of outcomes. Example: C(10,3) = C(10,7) = 120.
Is there a limit on how large n can be?
This calculator supports n up to 170, since 171! exceeds the largest number JavaScript can represent precisely. For larger values, use logarithmic (log-factorial) methods instead.
Need more help? Contact support or email globalcalqulate@gmail.com. We typically reply within 24–48 hours.