Combination Calculator (nCr)

Calculate combinations — selection of items (order doesn't matter)

What Is the Combination Calculator (nCr)?

A combination counts the number of ways to select r items from a set of n items, where the order of selection does not matter.

The binomial coefficients that combinations produce were studied independently in several ancient mathematical traditions — Indian mathematician Pingala referenced them in relation to Sanskrit prosody around the 2nd century BCE, and Chinese mathematicians documented what's now called Pascal's triangle (a table of these same values) centuries before Blaise Pascal's name became attached to it in the West. Pascal's own systematic treatment, in his 1654 Traité du triangle arithmétique, grew directly out of correspondence with Pierre de Fermat about how to fairly divide the stakes in an interrupted game of chance — one of the founding problems of probability theory.

Combination is built directly on the Factorial Calculator's function, and is closely related to — but meaningfully different from — the Permutation Calculator, which counts arrangements where order does matter.

Combination Calculator (nCr) Formula

nCr = n! / (r! × (n − r)!)

How Is the Combination Calculator (nCr) Calculated?

Combination starts from the permutation formula (n! / (n−r)!) and divides by r! to remove the duplicate orderings of the r selected items, since order doesn't distinguish one selection from another here.

For example, selecting items A, B, and C in any of their 3! = 6 possible orders (ABC, ACB, BAC, BCA, CAB, CBA) all count as exactly the same combination, since only the group {A, B, C} matters — dividing by r! collapses all of those equivalent orderings down to the single group they represent.

Combination Calculator (nCr) Example

5C2 = 5! / (2! × 3!) = 120 / (2 × 6) = 10 ways to choose 2 items from 5.

6C3 = 6! / (3! × 3!) = 720 / (6 × 6) = 20 ways to choose 3 items from 6.

4C0 = 4! / (0! × 4!) = 24 / (1 × 24) = 1 — there's exactly one way to choose nothing at all.

How to Use the Combination Calculator (nCr)

Step 1

Enter the total number of items (n).

Step 2

Enter the number of items being selected (r).

Step 3

Click Calculate nCr to see the number of possible selections.

Step 4

Compare the result to the Permutation Calculator's nPr for the same n and r to see how much order inflates the count.

Step 5

Try nCr and nC(n−r) with the same n to confirm the two always match.

Benefits

  • Turns a tedious factorial-based hand calculation into a single instant result.
  • Instantly computes exact selection counts without manual factorial arithmetic.
  • Shows the formula substitution step for learning purposes.
  • Validates inputs to prevent invalid r > n calculations.
  • Handles edge cases like r = 0 or r = n correctly and automatically.

Common Combination Calculator (nCr) Scenarios

Scenario 1

Choosing a committee or team from a larger group of candidates.

Scenario 2

Lottery and card game probability calculations.

Scenario 3

Counting subsets of a given size from a larger set.

Scenario 4

Working out odds in card games like poker, where hand combinations matter.

Scenario 5

Planning menu or product bundle options where selection order is irrelevant.

Understanding Your Result

The result is the exact number of distinct groups of r items possible from a set of n, where the order within each group does not matter — choosing {A, B} is the same as choosing {B, A}.

Combination counts are always equal to or smaller than the corresponding permutation count for the same n and r, since combinations collapse every reordering of a selected group into a single count — the larger r! is, the bigger that gap becomes.

Tips

  • Use combination when only the group matters, not the arrangement (unlike permutation).
  • nCr is always equal to nC(n−r) — choosing r items is equivalent to choosing which (n−r) items to leave out.
  • nC0 and nCn are always 1, since there is exactly one way to choose nothing or everything.
  • If your problem mentions assigning roles, ranks, or positions to the selected items, you likely need permutation instead of combination.
  • Use Pascal's triangle as a quick mental cross-check for small values of n and r.

Common Mistakes

  • Using combination when the problem actually requires ordering (that's a permutation).
  • Entering r greater than n, which describes an impossible selection.
  • Forgetting that swapping items within a chosen group does not create a new combination.
  • Miscounting r as the number of items left over rather than the number actually being selected.
  • Assuming nCr grows linearly with n, when it actually grows combinatorially and can become enormous very quickly.

Frequently Asked Questions

How is combination different from permutation?

Combination counts selections where order doesn't matter (like choosing a committee), while permutation counts arrangements where order does matter (like assigning positions).

What does nCr mean?

nCr reads as "n choose r" — the number of ways to select r items from a total of n distinct items without regard to order.

What is nCr when r = 0 or r = n?

nC0 always equals 1 (there is exactly one way to choose nothing), and nCn also equals 1 (there is exactly one way to choose everything).

Is nCr the same as nC(n-r)?

Yes, choosing r items to include is mathematically equivalent to choosing (n−r) items to exclude, so nCr always equals nC(n−r).

Where are combinations used in real life?

Combinations are used in lottery odds, card game probabilities, team/committee selection, and any scenario counting groups rather than sequences.

What does 'order doesn't matter' actually mean in practice?

It means selecting items A, B, C is considered the same combination as selecting C, B, A — only which items are chosen matters, not the sequence they're picked in.

Can n or r be zero?

Yes — nC0 always equals 1 (there's exactly one way to choose nothing), and 0Cr for r > 0 equals 0 (you can't choose more items than exist).

What's a real-world example of a combination?

Choosing 3 lottery numbers from a pool of 49, or picking a 5-person committee from a group of 20, are both combinations since the selection order doesn't matter.

Can r be larger than n?

No — you can't select more items than exist in the set, so combinations are undefined (or zero) when r exceeds n.

Can I share my combination result as an image?

Yes — tap Share and, on supported devices, your result is shared as a branded image card, not just a text link.

What's the relationship between Pascal's triangle and nCr?

Each entry in Pascal's triangle is a binomial coefficient — the number in row n, position r is exactly nCr, making the triangle a visual lookup table for combinations without computing any factorials directly.

How many combinations are there if n and r are equal?

Exactly 1 — nCn always equals 1, since there's only one way to select every item in the set.

Why is 170 the upper limit for n on this calculator?

The calculation relies on factorials, and 171! exceeds the precision limit of JavaScript's floating-point numbers, so results above that would silently lose accuracy.

How fast does nCr grow as n increases?

Very fast for r near n/2 — for example, 10C5 is 252, but 20C10 is already 184,756, since the number of possible groupings grows combinatorially with the pool size.

Is nCr ever equal to nPr?

Only when r equals 0 or r equals 1, since in both cases there's exactly one way to order the selected item(s). For any r greater than 1, nPr is always larger than nCr, because it counts every ordering of the same selection separately.

Can nCr be computed without factorials, for large numbers?

Yes — an iterative multiplicative formula that multiplies and divides one term at a time (avoiding the need to compute huge factorials directly) is commonly used in software for large n, though this calculator computes via factorials directly within its 170-item limit.

References

Important Information

Results are exact for n up to 170, limited by JavaScript number precision.

Last updated: July 25, 2026