Permutations & Combinations Calculator
Count permutations (nPr) and combinations (nCr) exactly: precise to the last digit, however large.
Details
A whole number up to 5,000.
Cannot be more than the total.
Number of combinations
2,598,960
Ways to pick 5 from 52 when order does not matter
This counts how many ways you can select items from a group, either where the order matters or where it does not.
Enter the total number of items and how many you are picking, and it returns the count along with the working.
Permutations and combinations
Both answer the same shape of question: how many ways can I pick some items from a larger group? The difference is one thing only — does the order matter?
Combinations are for when it does not. Picking 6 lottery numbers is a combination, because drawing 1-2-3 is the same ticket as 3-2-1.
Permutations are for when it does. First, second and third place in a race is a permutation, because a different order is a genuinely different outcome. Permutations are always the larger number.
Permutations are six times larger here, because any group of 3 can be arranged in 3 × 2 × 1 = 6 different orders, and each counts separately.
What to enter
- Does the order matter?
- Combinations if not, permutations if so. This one choice decides everything else.
- How many items in total (n)
- The size of the group you are picking from.
- How many you pick (r)
- How many you are choosing. It cannot exceed n when items are not replaced.
Which one applies
- Lottery numbers
- Combination. The order they are drawn in changes nothing.
- Race positions
- Permutation. Gold, silver and bronze are distinct outcomes.
- A committee of 3
- Combination. The same three people are the same committee.
- President, secretary, treasurer
- Permutation. Which person holds which role matters.
- A PIN or passcode
- Permutation, and with repeats allowed, since digits can repeat.
What this assumes
Items are distinct and not replaced once picked, which is the standard case.
For selections where repeats are allowed, such as PINs, the count is simply n raised to the power r.
How to calculate permutations and combinations
Both formulas use factorials. A factorial, written 5!, means multiplying every whole number down to 1.
- n!
- n factorial: n × (n−1) × ... × 1
- r!
- The extra divisor in combinations, removing the duplicate orderings
Decide whether order matters. Ask whether swapping two of your picks around gives a genuinely different result. If yes, it is a permutation.
For permutations, count the choices. Picking 3 from 10: 10 options, then 9, then 8. Multiply: 10 × 9 × 8 = 720.
For combinations, divide out the orders. Divide that 720 by the number of ways 3 things can be arranged, which is 3! = 6. That gives 120.
Sanity check the size. The combination count is always smaller. If yours is larger, the two have been swapped.
See a worked example: why the lottery is so hard to win
- Numbers available
- 49
- You pick
- 6
Order does not matter on a lottery ticket, so this is a combination.
C(49,6) = 49! ÷ (6! × 43!).
That works out to 13,983,816.
So a single ticket has roughly a 1 in 14 million chance. Buying ten tickets makes it 1 in 1.4 million, which is still vanishingly small.
13,983,816 possible tickets
Frequently asked questions
Ask whether rearranging your picks changes the answer. If ABC and CBA count as different results, it is a permutation. If they are the same, it is a combination.
A quick test: does each chosen item get a distinct role or position? Gold, silver and bronze do. Members of a committee do not.
nCr is combinations: n items, choose r, order ignored. nPr is permutations, where order counts.
On most scientific calculators you enter the total, press the function, then enter how many you are picking: 10 nCr 3 gives 120.
Multiplying every whole number from your number down to 1. 5! = 5 × 4 × 3 × 2 × 1 = 120.
They grow astonishingly fast: 10! is over 3.6 million and 20! exceeds 2 billion billion. That is why these counts explode with only modest inputs.
There is exactly one way to arrange nothing: the empty arrangement. Defining 0! as 1 makes the formulas work at their edges.
It also falls out of the pattern. Since n! = n × (n−1)!, then 1! = 1 × 0!, and 1! is 1, so 0! must be 1.
Then it is simpler: nʳ. A 4-digit PIN has 10 options for each position, so 10⁴ = 10,000 possibilities.
The factorial formulas assume each item is used at most once, which is why they do not apply to PINs or passwords.
Problems people actually run into
Using permutations for a lottery
Treating a 6-from-49 draw as a permutation gives about 10 billion instead of 14 million, overstating the difficulty by a factor of 720.
The check is whether the order of your numbers is printed on the ticket as significant. It is not, so every one of those 720 orderings is the same ticket and must be divided out.
Confusing which number is n and which is r
n is the total pool and r is how many you take. Entering them the wrong way round gives a nonsensical answer, and often an error, since r cannot exceed n.
Read it as 'r from n'. Choosing 3 from 10 means n is 10 and r is 3, not the reverse.
Results are estimates for general information only and are not professional financial, medical, or legal advice. Read our full disclaimer.
Last updated: September 4, 2026