StringMash.com

Combination calculator

How many ways to choose r things from n, when order doesn't matter.

5 characters
Updates as you type
Combinations120
FormulanCr = n! / (r! (n − r)!) = 10! / (3! × 7!)
Permutations720
Exact, with the working below

Show the steps
  1. Order doesn't matter, so use nCr = n! / (r! (n − r)!).
  2. Cancel 7! from the top and bottom: (10 × 9 × 8) / 3! = 720 / 6 = 120.
  3. Each group of 3 can be put in order 6 ways, which is why there are 3! times fewer combinations than permutations.

Using the calculator

Type n, the number of things to choose from, then r, how many you pick, such as 10, 3. You can also type 10 choose 3. The count appears as you type.

Set Repeats to Allowed when the same item can be picked more than once, such as scoops of ice cream from a set of flavours. Set Order to Matters to count permutations instead.

The nCr formula

nCr = n! / (r! (n − r)!). Choosing 3 from 10 gives 10! / (3! × 7!) = 120.

Cancel before you multiply and it's quicker: (10 × 9 × 8) / (3 × 2 × 1) = 720 / 6 = 120. The 720 is the number of ordered picks, and dividing by 3! removes the 6 orders of each group.

Some well-known counts

A five-card poker hand from a 52-card deck is 52 choose 5, which is 2,598,960 hands. Picking 6 numbers from 49 in a lottery is 49 choose 6, which is 13,983,816, so one ticket has about a 1 in 14 million chance.

With repeats allowed the count grows. Three scoops from 10 flavours, where two scoops can be the same flavour, gives 220 choices instead of 120.

Questions

What's the difference between a combination and a permutation?

In a combination the order doesn't matter, so ABC and CBA are the same pick. In a permutation they count separately. Use the [permutation calculator](/permutation-calculator) when order matters.

What is n choose 0?

1. There's one way to choose nothing.

Is a combination lock really a combination?

No. The order of the numbers matters, so mathematically it's a permutation, with repeats allowed.

Sources

Added and reviewed . What's new