Connect via MCP →

Enter Calculation

Constraint: n ≥ r ≥ 0. Both must be non-negative integers.

Formula

Advertisement

Results

Number of combinations (nCr)
6
ways to choose 2 from 4 (order ignored)
n (total items) 4
r (chosen) 2
Notation C(4, 2)

What is the Combinations (nCr) Calculator?

This calculator finds the number of combinations — written nCr, C(n, r), or "n choose r" — which is the number of ways to select r items from a set of n distinct items when the order of selection does not matter. Picking {A, B} is the same combination as picking {B, A}. This is the binomial coefficient, a cornerstone of combinatorics, probability, and statistics.

Selecting a subset of items from a larger group regardless of order
Combinations count the ways to choose r items from n distinct items when order does not matter.

How to use it

Enter the total number of items n and the number you want to choose r, then read off the result. Both values must be non-negative integers, and r cannot exceed n (the page enforces n ≥ r ≥ 0). The calculator uses exact big-integer arithmetic, so even very large results stay precise without rounding.

The formula explained

The classic definition is $$C(n, r) = \frac{n!}{r!\,(n - r)!}$$ To avoid computing huge factorials, this tool uses the stable multiplicative form with the symmetry rule \(C(n, r) = C(n, n - r)\): set \(k = \min(r, n - r)\), start with 1, and repeatedly multiply by \((n - k + i)\) and divide by \(i\) for \(i = 1..k\). Each division is exact, so the running value is always a whole number.

Advertisement
Breakdown of the n choose r formula into factorial parts
The formula divides n! by r! and (n-r)! to remove ordering of both the chosen and unchosen items.

Worked example

How many 2-card hands can you draw from 4 cards? $$C(4, 2) = \frac{4!}{2!\cdot 2!} = \frac{24}{4} = 6$$ A lottery example: choosing 6 numbers from 49 gives \(C(49, 6) = 13{,}983{,}816\) distinct tickets — which is why the jackpot odds are so steep.

Advertisement
Tree comparing ordered arrangements collapsing into unordered combinations
Several ordered arrangements (permutations) collapse into a single combination since order is ignored.

FAQ

What is the difference between combinations and permutations? Combinations ignore order; permutations count it. \(nPr = nCr \cdot r!\), so permutations are always larger (or equal) for the same n and r.

What is \(C(n, 0)\) or \(C(n, n)\)? Both equal 1: there is exactly one way to choose nothing, and one way to choose everything.

Can r be larger than n? No. You cannot choose more items than exist, so \(C(n, r) = 0\) when \(r > n\); this calculator treats that case as invalid and returns 0.

Last updated: