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

If order did matter311,875,200

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.

Picking 3 from 10
C(10,3) = 120combinations: order ignored
vs
P(10,3) = 720permutations: order counts

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.

C(n,r) = n! ÷ (r! × (n−r)!) P(n,r) = n! ÷ (n−r)!
n!
n factorial: n × (n−1) × ... × 1
r!
The extra divisor in combinations, removing the duplicate orderings
  1. Decide whether order matters. Ask whether swapping two of your picks around gives a genuinely different result. If yes, it is a permutation.

  2. For permutations, count the choices. Picking 3 from 10: 10 options, then 9, then 8. Multiply: 10 × 9 × 8 = 720.

  3. 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.

  4. 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

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