Combination Calculator

Enter n (total number of items) and r (items to choose) to calculate C(n,r) — the number of possible combinations when order doesn't matter. You'll see the exact combination count along with the full factorial breakdown and a comparison between combinations and permutations.

The total number of items in the set

The number of items to select from the set

Results

C(n,r) — Combinations

--

P(n,r) — Permutations

--

n! (n Factorial)

--

r! (r Factorial)

--

(n-r)! Factorial

--

Combinations vs Permutations

Frequently Asked Questions

What is a combination?

A combination is a selection of r items from a set of n items where the order of selection does not matter. For example, choosing 2 fruits from {apple, banana, cherry} gives 3 combinations: {apple, banana}, {apple, cherry}, and {banana, cherry} — regardless of the order they were picked.

What is the combination formula?

The standard combination formula is C(n,r) = n! / (r! × (n−r)!), where n is the total number of items, r is the number of items chosen, and ! denotes factorial. This counts the number of distinct subsets of size r that can be formed from a set of n items.

What is the difference between a combination and a permutation?

In a combination, order does not matter — {A, B} is the same as {B, A}. In a permutation, order matters — AB and BA are counted as different. As a result, permutations P(n,r) are always greater than or equal to combinations C(n,r) for the same n and r.

How do I calculate permutations from combinations?

To convert combinations to permutations, multiply by r!: P(n,r) = C(n,r) × r!. This accounts for all the different orderings of the r selected items that combinations ignore.

Can r be greater than n in combinations?

No. The value of r must be between 0 and n (inclusive). If r > n, it is mathematically impossible to choose more items than exist in the set, and the formula is undefined. This calculator will return an error for invalid inputs.

What does C(n,0) equal and why?

C(n,0) always equals 1, because there is exactly one way to choose zero items from any set — the empty selection. Similarly, C(n,n) = 1 because there is only one way to choose all items.

What is the handshake problem and how do combinations solve it?

The handshake problem asks: if n people are in a room and everyone shakes hands with everyone else exactly once, how many handshakes occur? Since the order of a handshake doesn't matter, the answer is C(n,2) = n(n−1)/2. For example, 5 people produce C(5,2) = 10 handshakes.

Are repetitions allowed in this combination calculator?

This calculator computes standard combinations without repetition, meaning each item can only be selected once. For combinations with repetition (also called multiset coefficients), the formula is C(n+r−1, r), which is a different calculation.

More Statistics Tools