What this calculator does
Counting arrangements divides into two questions: does order matter, and can items repeat? Those two choices give four formulas, and choosing the wrong one is the most common error in probability problems.
Permutations count ordered arrangements: first, second and third place in a race are different outcomes. Combinations count unordered selections: a committee of three is the same committee whichever order you name them in. Combinations are always the smaller number, by exactly a factor of r factorial.
The formula
Permutations count the choices at each step: n options for the first, n−1 for the second, and so on. Combinations divide that by r factorial to remove the duplicate counting of the same selection in different orders. Allowing repetition changes the counting to nʳ for ordered selections.
| Term | Meaning |
|---|---|
| C(n,r) | Combinations: order does not matter. |
| P(n,r) | Permutations: order matters. |
| n! | Factorial: n × (n−1) × … × 1. |
| With repetition | Items may be chosen more than once. |
The inputs explained
| Field | What to enter |
|---|---|
| Total items (n) | The total number of items available to choose from. |
| Chosen (r) | How many you are choosing. Must not exceed n for the without-repetition cases. |
When to use it
Calculating lottery odds
Choosing 6 numbers from 45 without order is a combination: 8,145,060 possibilities. One ticket therefore has that chance of matching, which is the arithmetic behind the whole enterprise.
Counting committees or teams
Selecting 3 people from 10 for a committee is C(10,3) = 120. Assigning them to distinct roles instead makes it P(10,3) = 720, six times as many because the three can be ordered six ways.
Working out password space
Characters can repeat and order matters, so the count is nʳ. That is why length affects security far more sharply than character variety.
Setting up a probability problem
Most discrete probability reduces to dividing favourable arrangements by total arrangements. Getting the counting method right is nearly the whole task.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
Choosing 3 from different pool sizes
Selecting three items from a growing pool.
| Pool size (n) | Combinations C(n,r) | Permutations P(n,r) | Permutations with repetition |
|---|---|---|---|
| 5 | 10 | 60 | 125 |
| 10 | 120 | 720 | 1,000 |
| 20 | 1,140 | 6,840 | 8,000 |
| 45 | 14,190 | 85,140 | 91,125 |
| 52 | 22,100 | 132,600 | 140,608 |
| 100 | 161,700 | 970,200 | 1,000,000 |
Choosing more from a fixed pool of 10
Taking increasingly many items from ten.
| Choosing (r) | Combinations C(n,r) | Permutations P(n,r) | Combinations with repetition |
|---|---|---|---|
| 1 | 10 | 10 | 10 |
| 2 | 45 | 90 | 55 |
| 3 | 120 | 720 | 220 |
| 5 | 252 | 30,240 | 2,002 |
| 7 | 120 | 604,800 | 11,440 |
| 10 | 1 | 3,628,800 | 92,378 |
Questions
What is the difference between a permutation and a combination?
Permutations count ordered arrangements; combinations count unordered selections. A podium finish is a permutation, a committee is a combination. Permutations are always larger, by a factor of r factorial.
When does repetition apply?
When an item can be chosen more than once: dice rolls, password characters, or drawing with replacement. Lottery balls and committee members cannot repeat, so the standard formulas apply.
What is a factorial?
The product of all whole numbers from 1 up to n. 5! is 120. Factorials grow extremely fast, 20! already exceeds 2 × 10¹⁸, which is why this calculator reports large factorials in scientific notation.
Why is C(n,r) the same as C(n, n−r)?
Because choosing which r items to include is the same as choosing which n−r to exclude. That symmetry is why the values rise to a peak in the middle and mirror on either side.
What is 0! and why is it 1?
There is exactly one way to arrange nothing: the empty arrangement. Defining 0! as 1 also keeps the combination formula working correctly at its boundaries.
For the probability that follows from these counts, see the probability calculator or binomial probability.