nCr Calculator

Enter your total number of items (n) and the number to choose (r) to calculate C(n,r) — the number of possible combinations. The nCr Calculator applies the formula C(n,r) = n! / (r! × (n−r)!) and returns the combination count, along with the corresponding permutation count (nPr) for comparison. Order does not matter in combinations, making this ideal for lottery odds, team selections, and probability problems.

The total number of items in the set.

The number of items to select from the set.

Results

Combinations C(n,r)

--

Permutations P(n,r)

--

n! (n Factorial)

--

r! (r Factorial)

--

(n−r)! Factorial

--

Combinations vs Permutations

Frequently Asked Questions

What is a combination in mathematics?

A combination is a selection of r items from a set of n distinct items where the order of selection does not matter. For example, choosing 2 fruits from {Apple, Banana, Cherry} gives the same combination regardless of which fruit you pick first. This differs from permutations, where order is significant.

What is the nCr formula?

The formula is C(n,r) = n! / (r! × (n−r)!), where n is the total number of items and r is the number being chosen. The '!' symbol denotes factorial — the product of all positive integers up to that number. For example, C(5,2) = 120 / (2 × 6) = 10.

What is the difference between combinations and permutations?

Combinations count selections where order does not matter, while permutations count arrangements where order does matter. For the same n and r, nPr ≥ nCr, since each combination of r items can be arranged in r! different orders. Use combinations for selections (lottery, committees) and permutations for sequences (passwords, rankings).

How do I calculate 5C3?

Using the formula: C(5,3) = 5! / (3! × (5−3)!) = 120 / (6 × 2) = 120 / 12 = 10. This means there are 10 different ways to choose 3 items from a group of 5, without regard to order.

What is a combination with replacement?

In combinations without replacement (the standard case), each item can only be chosen once. In combinations with replacement, items can be selected more than once. This calculator handles the standard case — without replacement and without regard to order.

Can r be greater than n in nCr?

No. If r is greater than n, the combination is mathematically undefined (or equal to 0), since you cannot choose more items than are available in the set without repetition. The calculator returns 0 in such cases.

What is the handshake problem and how does nCr solve it?

The handshake problem asks: if n people each shake hands with every other person exactly once, how many handshakes occur? Since order doesn't matter (A shaking B's hand is the same as B shaking A's), the answer is C(n,2) = n(n−1)/2. For 10 people, that's C(10,2) = 45 handshakes.

How is nCr used in probability?

nCr is fundamental to probability calculations involving equally likely outcomes. For instance, the probability of winning a lottery where you pick 6 numbers from 49 is 1/C(49,6) ≈ 1 in 13,983,816. Any time you need to count favorable vs total outcome groups, nCr provides the count.

More Statistics Tools