Combination Calculator (nCr)

Enter how many items you have and how many you pick. Order does not matter, so ABC and CBA count as the same choice.

Updated

Embed this calculator

Paste this code into your page. The calculator runs inside the frame and links back to the full version.

Keep the credit link in place. Do not resell the calculator.

Formula

nCr = n! ÷ (r! × (n - r)!) = nPr ÷ r!

Worked example

Choose 5 cards from 52: 52C5 = (52 × 51 × 50 × 49 × 48) ÷ 5! = 311,875,200 ÷ 120 = 2,598,960.

A larger case: 56C23 = 3,167,295,784,216,200. Results above 9,007,199,254,740,991 are shown as 7 significant digits plus the exact digit count, for example 170C85 = 9.144842 × 10^49 (50 digits).

Frequently asked questions

What is the combination formula?

nCr = n! ÷ (r! × (n - r)!). For 5C2 that is 120 ÷ (2 × 6) = 10.

How many lottery combinations are there for 6 numbers out of 49?

49C6 = 13,983,816, so one ticket has a 1 in 13,983,816 chance of matching all six numbers.

Why is nCr the same as nC(n - r)?

Choosing r items to take is the same as choosing n - r to leave behind. So 20C17 = 20C3 = 1,140.

Why is n limited to 170?

170! is about 7.26 × 10^306, the largest factorial a standard double-precision number can hold, so larger n is rejected. Answers are computed exactly with integer arithmetic. Up to 9,007,199,254,740,991 they are shown in full; larger ones are shown as 7 significant digits, such as 170C85 = 9.144842 × 10^49, together with the exact number of digits, so no digit is invented.