How many ways can you choose or arrange items from a set? Enter n and r to get combinations C(n,r), permutations P(n,r), and variations with repetition instantly.
Combinations & Permutations Calculator - C(n,r), P(n,r)
How many ways can you choose or arrange items from a set? Enter n and r to get combinations C(n,r), permutations P(n,r), and variations with repetition instantly.
Parameters
Enter data for calculations
💡 Fill in all required fields to unlock the calculate button
What does this calculator compute?
Enter two numbers - n (the total elements in a set) and r (the number you want to choose) - and this calculator returns three results at once. Combinations C(n,r) tells you how many ways you can select r items when order does not matter. Permutations P(n,r) tells you how many ways you can arrange r items when order counts. Variations with repetition (n^r) tells you how many sequences are possible if the same element can appear more than once. All three formulas use the same inputs but answer fundamentally different counting questions.
Combinations: 495 (how many different groups of 4 can be formed)
Permutations: 11,880 (how many ordered arrangements of 4 from 12)
Variations with repetition: 20,736 (if the same person could fill multiple slots)
The three formulas explained
| Type | Formula | Order matters? | Repetition? | Example |
|---|---|---|---|---|
| Combinations C(n,r) | n! / (r!(n-r)!) | No | No | Lottery picks, team selection |
| Permutations P(n,r) | n! / (n-r)! | Yes | No | Race results, officer election |
| Variations with rep. | n^r | Yes | Yes | PIN codes, passwords, dice |
The relationship between them is simple: permutations = combinations x r!. When order does not matter, you divide by the number of ways to rearrange the selected elements (which is r!). When repetition is allowed, every position has n independent choices, giving n^r total sequences.
Reference table - common values
| Scenario | n | r | C(n,r) | P(n,r) | n^r |
|---|---|---|---|---|---|
| Lottery 6 from 49 | 49 | 6 | 13,983,816 | 10,068,347,520 | 13,841,287,201 |
| Poker hand (5 from 52) | 52 | 5 | 2,598,960 | 311,875,200 | 380,204,032 |
| Team of 3 from 10 | 10 | 3 | 120 | 720 | 1,000 |
| Committee of 4 from 20 | 20 | 4 | 4,845 | 116,280 | 160,000 |
| Ice cream 2 scoops from 8 flavours | 8 | 2 | 28 | 56 | 64 |
| PIN code 4 digits from 10 | 10 | 4 | 210 | 5,040 | 10,000 |
Practical examples
A national lottery draws 6 numbers from 49. Since only which numbers are drawn matters (not the order they come out), this is a combinations problem. C(49, 6) = 49! / (6! x 43!) = 13,983,816. Your chance of winning the jackpot with one ticket is roughly 1 in 14 million. Enter n = 49, r = 6 to verify.
A club with 15 members needs to elect a president, vice-president, and treasurer. The roles are distinct so order matters: P(15, 3) = 15 x 14 x 13 = 2,730. If the three positions were interchangeable (just "pick any three for the board"), the answer would be C(15, 3) = 455. The permutation count is exactly 3! = 6 times larger.
A pizza menu has 12 toppings. You choose 3. Since the order in which you add toppings does not change the pizza, this is a combination: C(12, 3) = 220 possible three-topping pizzas. If each topping slot were ordered (first, second, third), permutations would give P(12, 3) = 1,320 - but pizza toppings do not have positions.
A standard deck has 52 cards. A poker hand is 5 cards where the order of dealing does not matter. C(52, 5) = 2,598,960 distinct hands. This is the base number used to calculate poker hand probabilities: there are 4 royal flushes out of 2,598,960 possible hands, giving a probability of about 0.000154%.
A classroom has 30 students and 30 desks. The number of seating arrangements is P(30, 30) = 30! = 2.65 x 10^32 - an astronomical number. If you only seat 5 students in a row of 5 desks, P(30, 5) = 30 x 29 x 28 x 27 x 26 = 17,100,720. Each position is distinct (desk 1 vs desk 2), so permutations apply.
An ice cream shop has 8 flavours and you pick 2 scoops. If you cannot repeat the same flavour: C(8, 2) = 28 combinations. If you can order two scoops of the same flavour (repetition allowed) and order matters (first scoop vs second scoop): 8^2 = 64 variations. The ratio 64/28 = 2.29x shows how repetition and ordering expand the count. Enter n = 8, r = 2 to see all three values.
When to use which formula
Choosing the right formula comes down to two questions:
- Does order matter? If {A, B, C} and {C, B, A} are different, use permutations. If they are the same, use combinations.
- Can elements repeat? If the same item can appear twice, you need the repetition formula (n^r). If each item can appear at most once, use the non-repetition versions.
- Combinations: lottery draws, team selection, pizza toppings, committee formation, card hands.
- Permutations: race finishing orders, password characters without reuse, ranked lists, officer elections.
- Variations with repetition: PIN codes, passwords with character reuse, dice rolls, multiple-choice test answers.
The relationship between C(n,r) and P(n,r)
Permutations count every ordered arrangement. Combinations ignore order. Since r selected items can be rearranged in r! ways, dividing the number of permutations by r! gives the number of combinations: C(n,r) = P(n,r) / r!. Equivalently, P(n,r) = C(n,r) x r!. For n = 10 and r = 3: P(10, 3) = 720, C(10, 3) = 120, and 720 / 6 = 120. This ratio (r! = 3! = 6) holds for all valid n and r.
When r = n (choosing all elements), the formula simplifies: C(n, n) = 1 (there is only one way to choose all items) and P(n, n) = n! (the number of ways to arrange all n items in a line).
FAQ
Related tools
Variations with Repetition Calculator
Dedicated calculator for n^k with brute-force time estimate and security classification - Open calculator
Probability Calculator
Calculate event probability as fraction, percentage and odds in four modes - Open calculator
Factorial Calculator
Compute n! for any non-negative integer - the building block of all combinatorics formulas - Open calculator
Percentage Calculator
Calculate X% of a number, find what percent X is of Y, or compute percentage change - Open calculator
Powers & Roots Calculator
Compute any base raised to any exponent or extract any root - the core of n^r - Open calculator
Ready-made calculations
The most searched variants of this calculator. Each link opens it with the value already filled in, ready to calculate.
- How many ways can you choose 3 from 5
- How many ways can you choose 3 from 6
- How many ways can you choose 3 from 7
- How many ways can you choose 3 from 8
- How many ways can you choose 3 from 9
- How many ways can you choose 3 from 10
- How many ways can you choose 3 from 11
- How many ways can you choose 3 from 12
- How many ways can you choose 3 from 15
- How many ways can you choose 3 from 20