How to use the permutation and combination calculator
- Enter the total number of items (n) and how many are chosen (r).
- Pick the type: does order matter, and can items repeat? Each option shows its notation.
- Optionally type your items, like names or letters, to see every arrangement listed.
- Click Calculate. The answer comes with all four counts side by side, so you can see how the choice changes the result.
- Follow the slot diagram and steps to see where the formula comes from.
Permutation and combination formulas
nPr = n!(n − r)! , nCr = n!r! (n − r)!
With repetition allowed:
permutations = nr , combinations = (n + r − 1)!r! (n − 1)!
- n
- The total number of items to choose from
- r
- The number of items chosen or arranged
- n!
- “n factorial”: n × (n − 1) × … × 2 × 1, with 0! = 1
- nPr
- Permutations: ordered arrangements, no repeats
- nCr
- Combinations: unordered selections, no repeats. Also written C(n, r) or “n choose r”
Worked example
A club of 5 members picks a president, vice president and secretary. Then, separately, it picks a 3-person committee. How many ways can each be done?
-
Officers: order matters (president ≠ secretary), so it's a permutation. 5 choices, then 4, then 3
5P3 = 5 × 4 × 3 = 60
-
Committee: order doesn't matter. Each group of 3 was counted 3! = 6 times above, once for each order
5C3 = 603! = 606 = 10
What it means: there are 60 ways to fill the three officer roles but only 10 different committees, because the committee {Anna, Ben, Cara} is the same however you order the names. Dividing by r! to remove the order is the whole difference between permutations and combinations.
How to decide which one you need
- Rankings, positions, codes, passwords, seating: order matters, so use permutations.
- Teams, committees, hands of cards, lottery numbers, pizza toppings: order doesn't matter, so use combinations.
- Can the same item be used again? Digits in a PIN and letters in a password can repeat; people on a committee can't.
- Probability: divide the number of favorable outcomes by the total. For example, the chance of winning a lottery that draws 6 numbers from 49 is 1 / ₄₉C₆ = 1 in 13,983,816.
Counting is the first step in many probability problems. For the probability of a number of successes in repeated trials, use the binomial distribution calculator, which uses nCr in its formula.