How to use this calculator
- 1 Choose the kind of count: permutations or combinations, with or without repetition.
- 2 Enter n, the total number of items, as a whole number.
- 3 Enter r, the number of items you choose, as a whole number. Without repetition, r cannot be larger than n.
- 4 Read the number of ways, and the formula with its working below it.
Permutations or combinations?
The key question is whether order matters. A permutation counts ordered arrangements. A combination counts groups, where the order is ignored. For example, the same three friends sitting in a different order is a new permutation, but the same group of three is one combination.
Take a race with 10 runners. The gold, silver and bronze positions depend on order, so there are 10 × 9 × 8 = 720 ways to fill the podium. A committee of 3 chosen from the same 10 people has no order, so there are only 120 committees.
Permutations are always at least as large as combinations for the same n and r. Each group of r items can be arranged in r! ways, so the permutation count is the combination count times r!.
What “with repetition” means
Without repetition, each item can be picked only once. Once a runner has a medal, that runner cannot take another. With repetition, the same item can be picked again, as in a multi-digit PIN where a digit like 7 can appear twice.
For permutations with repetition, each of the r positions has n choices, so the count is nʳ. For example, a four-digit PIN made from the digits 0 to 9 has 10⁴ = 10,000 options.
For combinations with repetition, the calculator uses the formula C(n + r − 1, r). It counts ways to pick r items from n types when the same type can be taken more than once and the order is ignored.
| Type | Formula | Result |
|---|---|---|
| Permutations (order matters, no repeats) | 10 × 9 × 8 | 720 |
| Combinations (order ignored, no repeats) | 10 × 9 × 8 ÷ 3! | 120 |
| Permutations with repetition | 10³ | 1,000 |
| Combinations with repetition | C(12, 3) | 220 |
Why the numbers grow so fast
Counts climb quickly, because each extra item multiplies the total. Choosing 20 items from 40 in order gives a number with more than 20 digits. For very large results, the big number calculator keeps every digit accurate.
This is why lottery odds and password strengths can look huge. Each extra character or ball multiplies the number of possible outcomes. To turn a count into a probability, divide the favourable outcomes by the total, using the probability calculator.
For very large counts, the result is shown in scientific notation, so the leading digits stay easy to read. The exponent calculator can help with the powers used by repetition counts.
Tips for counting correctly
Most mistakes come from using the wrong formula for the question. These checks help:
- Ask if the order matters. Seating, rankings and codes depend on order. Teams and committees usually do not.
- Ask if items can repeat. Locks and PINs often allow repeats. Draws from a bag without replacement do not.
- Check that r is not larger than n. Without repetition, you cannot pick more items than exist.
- Use the working line. It shows the formula, so you can rebuild the count by hand.
- Check small cases by listing them. For n = 3 and r = 2, list the ordered pairs to confirm the rule.
The formula
Permutations (nPr)
nPr = n! ÷ (n − r)!
- n
- total number of items
- r
- number of items chosen, in order
- !
- factorial, the product of all whole numbers up to that number, so 4! = 4 × 3 × 2 × 1 = 24
Combinations (nCr)
nCr = n! ÷ (r! × (n − r)!)
- nCr
- the number of groups of r items from n, with order ignored
Permutations with repetition
nʳ
- nʳ
- n multiplied by itself r times
Combinations with repetition
C(n + r − 1, r) = (n + r − 1)! ÷ (r! × (n − 1)!)
Worked example
Choosing 3 from 10 items, order matters and order does not
- 1.Permutations: 10P3 = 10! ÷ 7! = 10 × 9 × 8 = 720.
- 2.Combinations: 10C3 = 10! ÷ (3! × 7!) = 720 ÷ 6 = 120.
- 3.Check: each group of 3 can be arranged in 3! = 6 ways, so 120 × 6 = 720.
There are 720 ordered podiums and 120 unordered committees of 3 from 10 people.
Frequently asked questions
What is the difference between a permutation and a combination?
A permutation counts ordered arrangements, so ABC and BAC are different. A combination counts groups, so ABC and BAC are the same. The permutation count is always the combination count times r!.
How do I calculate nCr?
Divide n! by r! times (n − r)!. For 10C3, that is 10! ÷ (3! × 7!) = 120. The calculator also shows the working, so you can check each step.
What is 0 factorial?
By definition, 0! equals 1. This keeps the formulas working when r equals 0 or when r equals n.
Why can r not be larger than n without repetition?
You cannot choose more distinct items than exist. Once every item is used, there is nothing left to pick, so the count is zero for that case.
What is the largest count this calculator can show?
Inputs go up to 1,000. Results with more than 15 digits are shown in scientific notation, so the leading digits remain clear.
Sources
Last reviewed by the GridCalculators team.