Math

Combinations & Permutations Calculator

Calculate C(n,r) and P(n,r) instantly with step-by-step formulas

C(10, 3) — Combinations

Order does NOT matter

120

n! / (r! × (n−r)!)

P(10, 3) — Permutations

Order MATTERS

720

n! / (n−r)!

Relationship

P(n,r) = C(n,r) × r!720 = 120 × 3!
Probability of 1 combo0.008333
r! (arrangements each combo)3! = 6
## Combinations and Permutations Calculator Combinatorics is the branch of mathematics concerned with counting — how many ways can we arrange, select, or group objects? Two foundational operations are combinations (when order doesn't matter) and permutations (when order does). ### Key Formulas **Permutations** P(n, r) — ordered arrangements of r items from n total: $$P(n, r) = \frac{n!}{(n-r)!}$$ **Combinations** C(n, r) — unordered selections of r items from n total: $$C(n, r) = \frac{n!}{r! \cdot (n-r)!}$$ ### When to Use Which | Situation | Formula | Reason | |-----------|---------|--------| | 4-digit PIN (digits can repeat) | 10⁴ | Each position independent | | 4-digit PIN (no repeat) | P(10, 4) = 5040 | Order matters, no replacement | | 5-card poker hand | C(52, 5) = 2,598,960 | Order doesn't matter | | Olympic 3-medal podium from 8 | P(8, 3) = 336 | Gold ≠ Silver, order matters | | Team of 4 from 12 people | C(12, 4) = 495 | Team, not ranking | ### The Relationship Between nPr and nCr Every combination of r items can be arranged in r! different orders. So: $$P(n, r) = C(n, r) \times r!$$ For example: C(5, 3) = 10 combinations, each can be arranged in 3! = 6 ways, so P(5, 3) = 60. ### Pascal's Triangle Connection Row n of Pascal's Triangle gives all C(n, r) for r = 0 to n: Row 0: 1 Row 1: 1 1 Row 2: 1 2 1 Row 3: 1 3 3 1 Row 4: 1 4 6 4 1 (C(4,0) C(4,1) C(4,2) C(4,3) C(4,4)) Each entry is the sum of the two directly above it. ### Practical Examples - **Lottery**: 6 numbers from 49 → C(49, 6) = 13,983,816 possible tickets - **Password**: 6 lowercase letters, no repeats → P(26, 6) = 165,765,600 possible passwords - **Committee**: 3 officers (president, treasurer, secretary) from 20 members → P(20, 3) = 6,840 - **Team selection**: 5 starters from a 12-player roster → C(12, 5) = 792

Frequently Asked Questions

What is the difference between a combination and a permutation?
A permutation is an ordered arrangement of items — {A, B, C} and {C, B, A} are different permutations. A combination is an unordered selection — {A, B, C} and {C, B, A} count as the same combination. Use permutations when order matters (lock codes, race placements), combinations when it doesn't (lottery tickets, committees).
What are the formulas for nCr and nPr?
nCr (combinations) = n! / (r! × (n−r)!). nPr (permutations) = n! / (n−r)!. The relationship is: nPr = nCr × r!, because each combination can be arranged in r! ways.
Why is nCr always smaller than or equal to nPr?
Because permutations count every ordered arrangement, while combinations count unique groups. Every combination of r items has r! permutations. So nPr = nCr × r! — permutations are always at least as large.
What is C(n, 0) and C(n, n)?
Both equal 1. C(n, 0) = 1 because there is exactly one way to choose nothing. C(n, n) = 1 because there is exactly one way to choose all items.
How is nCr related to Pascal's Triangle?
Each entry in Pascal's Triangle is a binomial coefficient nCr, where n is the row number (starting at 0) and r is the position in that row (starting at 0). Row 5 reads: 1 5 10 10 5 1, which equals C(5,0) through C(5,5).
What is a multinomial coefficient?
A multinomial coefficient extends combinations to more than two groups. For example, the number of ways to arrange n items into groups of k₁, k₂, ..., kₘ is n! / (k₁! × k₂! × ... × kₘ!). This is used in probability when items fall into more than two categories.