Combinations (nCr) Calculator

Find how many different groups you can pick from a larger set, where order doesn't matter.

How it is calculated

The number of ways to pick r items from n distinct items, ignoring order, is C(n, r) = n! ÷ (r! × (n − r)!). The tool avoids the huge factorials: it multiplies step by step, result = result × (n − i) ÷ (i + 1) for i from 0 to k − 1, where k is the smaller of r and n − r, because C(n, r) = C(n, n − r). While the value fits in a 64-bit integer (up to about 9.2 × 1018) the answer is an exact whole number with thousands separators. Beyond that it is shown in scientific notation with 5 significant digits, for example 1.0089e+29 for C(100, 50).

Both n and r must be whole numbers with 0 ≤ r ≤ n, and n can be at most 170. A decimal, a negative number, r larger than n or n above 170 shows no result.

Worked example

For a lottery where you pick 6 numbers out of 49, n = 49 and r = 6. The product is 49 × 48 × 47 × 46 × 45 × 44 ÷ (6 × 5 × 4 × 3 × 2 × 1), which is 10,068,347,520 ÷ 720. That equals 13,983,816, so there are 13,983,816 different tickets, and a single ticket has a 1 in 13,983,816 chance of matching all six numbers.

Try this example →

Common mistakes

  • Using nCr when order matters. Choosing a president, a secretary and a treasurer from 10 people is a permutation (720 ways), not C(10, 3) = 120.
  • Swapping n and r. n is the size of the whole set and r the number you pick; with r larger than n the tool shows nothing, since you cannot pick more items than exist.
  • Entering a probability or percentage instead of a count. n and r must be whole numbers of items.
  • Forgetting that repeats are not allowed. nCr assumes each item can be picked once, which is not the case for drawing with replacement.
  • Reading a result like 1.0089e+29 as a rounded-off whole number. It means 1.0089 × 1029; only the first five digits are shown.

About this calculator

nCr, read n choose r, counts the number of distinct ways to select r items from a set of n distinct items when the order of selection doesn't matter, computed as n! ÷ (r! × (n−r)!). It differs from permutations, which count arrangements where order does matter, by dividing out the r! ways any chosen subset could itself be ordered.

Combinations are the backbone of probability calculations wherever outcomes are unordered groups: computing lottery odds, such as choosing 6 numbers from 49, evaluating poker hand probabilities where a 5-card hand is a combination of 5 from 52, sampling statistics in quality control and clinical trial design, and counting the number of possible committees, teams, or subsets that can be formed from a larger group.

Enter n and r and this calculator returns nCr, the exact number of possible combinations.

Was this helpful?

You can pick up to 3 reactions.

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators