Advertisement

Combination Calculator (nCr)

Count combinations C(n, r) exactly, with or without repetition, and see the matching permutations, the odds of one pick and a Pascal row.

A combination counts the different groups of r items you can pick from n when order does not matter: poker hands, lottery tickets, committees, pizza toppings. Enter n and r to get C(n, r) exactly, even when it runs to hundreds of digits, together with the matching permutation count, the odds of one particular pick and a full row of Pascal’s triangle for n up to 60.

How to use this tool

  1. Enter n, the number of items to choose from.
  2. Enter r, how many you pick.
  3. Tick “repetition allowed” if the same item can be chosen more than once, like scoops of ice cream.
  4. Read C(n, r), the permutation count and the odds.

Formula

C(n, r) = n! / (r! × (n − r)!) · with repetition: C(n + r − 1, r)

n! (n factorial) is n × (n − 1) × … × 1, and 0! = 1. Dividing by r! removes the r! orderings of each group, which is why combinations never exceed permutations P(n, r) = n! / (n − r)!. With repetition, the “stars and bars” argument turns the problem into choosing r positions from n + r − 1.

Example

A 5-card poker hand comes from a 52-card deck: C(52, 5) = (52 × 51 × 50 × 49 × 48) / (5 × 4 × 3 × 2 × 1) = 311,875,200 / 120 = 2,598,960 hands. If order mattered there would be 311,875,200 ordered deals, and the chance of being dealt one particular hand is 1 in 2,598,960.

Frequently asked questions

What is the difference between a combination and a permutation?

Order. Choosing Ana, Ben and Cal for a committee is one combination, but naming them president, secretary and treasurer gives 3! = 6 permutations. Use permutations when positions or order matter.

What are the odds of winning a 6/49 lottery?

There are C(49, 6) = 13,983,816 possible tickets, so one ticket has a 1 in 13,983,816 chance of matching all six numbers.

Why is C(n, r) the same as C(n, n − r)?

Choosing the r items to keep is the same as choosing the n − r items to leave out, so both counts match. For example, C(10, 3) = C(10, 7) = 120.

What does repetition allowed mean?

Items can be chosen more than once and order still does not matter. Picking 3 scoops from 5 flavours with repeats allowed gives C(7, 3) = 35 options.

Last updated: 2026-10-30

Advertisement