Calculate nPr permutations and nCr combinations with or without repetition. Includes factorial values, Pascal's triangle row, and real-world examples like lottery odds and password combinations.
The fundamental difference between permutations and combinations is whether order matters. In a permutation, the order of selection matters β ABC is different from BAC. In a combination, only the selection matters β {A,B,C} and {B,A,C} are the same group.
Memory trick: Think of a combination lock β it should really be called a "permutation lock" because the order of digits matters! {3,5,7} is not the same as {7,5,3}.
The factorial of a non-negative integer n (written n!) is the product of all positive integers up to n: n! = n Γ (nβ1) Γ (nβ2) Γ ... Γ 2 Γ 1. By convention, 0! = 1.
Example 1: Race finish order. In a race of 8 runners, how many ways can the top 3 finish? This is P(8,3) = 8! / (8β3)! = 8 Γ 7 Γ 6 = 336 ordered outcomes.
Example 2: Password. A PIN uses 4 digits from 0β9, no repeats. nP4 from 10 = 10 Γ 9 Γ 8 Γ 7 = 5,040 possible PINs.
Example 1: Lottery. The UK National Lottery requires choosing 6 numbers from 59. C(59,6) = 59! / (6! Γ 53!) = 45,057,474. Your odds of winning the jackpot are approximately 1 in 45 million.
The US Powerball lottery draws 5 white balls from 69 and 1 red ball from 26: C(69,5) Γ C(26,1) = 11,238,513 Γ 26 = 292,201,338. Odds: about 1 in 292 million.
Example 2: Team selection. From 15 players, how many ways can a manager select a squad of 11? C(15,11) = C(15,4) = 1,365 different squads.
| Hand | Combinations | Probability |
|---|---|---|
| Royal Flush | 4 | 1 in 649,740 |
| Straight Flush | 36 | 1 in 72,193 |
| Four of a Kind | 624 | 1 in 4,165 |
| Full House | 3,744 | 1 in 694 |
| Flush | 5,108 | 1 in 509 |
| Two Pair | 123,552 | 1 in 21 |
| Any 5-card hand | C(52,5) = 2,598,960 | β |
Permutation with repetition: n^r. If you have 26 letters and want 4-letter passwords with repeats allowed: 26β΄ = 456,976.
Combination with repetition: C(n+rβ1, r) = (n+rβ1)! / (r! Γ (nβ1)!). For example, choosing 3 flavours of ice cream from 5 options with repeats allowed: C(5+3β1, 3) = C(7,3) = 35.
Pascal's triangle is a triangular array where each element equals the sum of the two directly above it. The n-th row gives all values of C(n, r) for r = 0 to n. Row 4: 1, 4, 6, 4, 1 β these are C(4,0), C(4,1), C(4,2), C(4,3), C(4,4). The sum of the n-th row equals 2^n.
Pascal's triangle appears in the binomial theorem: (a + b)^n = Ξ£ C(n,k) Γ a^(n-k) Γ b^k. This is why combinations are called "binomial coefficients."
Permutations and combinations appear in the UK A-level Mathematics and Further Mathematics specifications under Statistics and Discrete Mathematics modules. Students are expected to use factorial notation and apply nPr and nCr in probability problems.
The AQA, Edexcel, and OCR A-level syllabi all include combinatorics, with probability questions often involving selections without replacement (combinations) or arrangements (permutations).
In the United States, combinatorics is taught in Precalculus and AP Statistics. The AP Statistics exam includes probability questions requiring knowledge of counting techniques, while AP Calculus BC sometimes uses binomial coefficients in Taylor series. The Common Core Standards also reference combinations and permutations in high school statistics units.
In a permutation, order matters: ABC β BAC. In a combination, order does not matter: {A,B,C} = {B,A,C}. Use permutations for arrangements (race results, passwords); use combinations for selections (team members, lottery numbers).
nPr (also written P(n,r)) is the number of ways to arrange r items chosen from n distinct items, where order matters. Formula: nPr = n! / (nβr)!. For P(5,2) = 5!/3! = 20.
nCr (also written C(n,r) or "n choose r") is the number of ways to choose r items from n, where order does not matter. Formula: nCr = n! / (r! Γ (nβr)!). C(5,2) = 10.
The UK Lotto requires matching 6 from 59 numbers: C(59,6) = 45,057,474. The probability of winning the jackpot is approximately 1 in 45,057,474 (about 1 in 45 million).
Without repetition, once an item is chosen it cannot be chosen again. With repetition, items can be reused. Permutation with repetition = n^r; Combination with repetition = C(n+r-1, r).
Pascal's triangle is a number triangle where each entry is the sum of the two above it. The n-th row (starting from row 0) contains the values C(n,0), C(n,1), ..., C(n,n). The total of row n equals 2^n.
By convention and mathematical consistency. There is exactly one way to arrange zero items (do nothing), which is 1. It also makes formulas like nCn = n!/(n!Γ0!) = 1 work correctly, representing the one way to choose all items.
The calculator handles n up to 170 due to JavaScript's 64-bit floating-point limit (170! β 7.26 Γ 10^306). For larger values, specialised arbitrary-precision software is needed. Results beyond about n=20 are shown in scientific notation for clarity.
Results are for educational purposes. Large values (n > 100) may show floating-point rounding. This calculator uses standard combinatorial formulas and JavaScript number precision.