Combination Calculator (nCr)

Find how many unordered selections of r distinct items can be made from n distinct items without repetition. Results use exact integer arithmetic.

A nonnegative whole number up to 10,000.
Must satisfy 0 ≤ r ≤ n.
Optional result display
Changes presentation only, never the exact value.
Compact mode keeps the result grid readable when an integer has hundreds of digits.

Your Combination Results

Orderings per combination 0 r!
Ordered selections 0 nPr = nCr × r!
Symmetry check 0 C(n,r) = C(n,n−r)
Number of Combinations 0 n choose r
Enter n and r to calculate the number of combinations.

Calculation breakdown

Given values0
Combination formula0
Reduced calculation0
Exact nCr0
Digit count0

Transparent formula

Combination: C(n,r) = n! / [r!(n−r)!], valid for whole numbers n ≥ r ≥ 0.

Because order does not matter, each selected group would otherwise be counted r! times. Dividing the ordered count nPr by r! gives nCr.

The calculator uses the symmetry C(n,r) = C(n,n−r) and a multiplicative exact-integer method to avoid computing unnecessary giant factorials.

A combination counts selections where the chosen members matter but their order does not. Choosing Alice, Ben, and Cara for the same three-person committee is one combination, not six different answers based on the order in which their names were chosen. The nCr formula captures exactly that idea.

How to use the Combination Calculator

Enter n, the total number of distinct available items, and r, the number selected. Both values must be whole numbers, n must be nonnegative, and r must lie from 0 through n. Then select Calculate nCr.

The blue result gives the exact number of combinations. Supporting cards show r!, the number of possible orderings of each chosen r-item group; nPr, the corresponding number of ordered selections; and the symmetry identity C(n,r) = C(n,n−r). The breakdown keeps the exact nCr integer visible even when the result is too long for a compact card.

Use this calculator when items are distinct, repetition is not allowed, and order does not create a new selection. Examples include forming a committee, choosing lottery numbers when draw order is irrelevant to the ticket, selecting a subset of menu options, or counting card hands.

What does nCr mean?

The notation nCr, C(n,r), and the binomial coefficient “n choose r” all refer to the same count: how many r-element subsets can be selected from n distinct elements when selection order is ignored.

nCr = C(n,r) = “n choose r”

For example, C(5,2) counts two-item groups from five distinct items. The pair {A,B} is the same combination whether A is named first or B is named first. There are 10 such pairs.

The distinction between a selection and an arrangement is the central decision. If roles, positions, ranking, or sequence changes the outcome, the problem is not a plain combination problem.

The combination formula

For integers n ≥ r ≥ 0, the standard formula is:

C(n,r) = n! / [r!(n−r)!]

The factorial n! means n × (n−1) × ... × 2 × 1, with 0! defined as 1. The factor (n−r)! cancels arrangements involving items that were not selected. The additional division by r! removes the different orderings of the r selected items.

A direct factorial formula is clear for teaching, but software does not need to calculate three huge factorials independently. SonoCalculator instead uses an equivalent multiplicative form with k = min(r,n−r):

C(n,r) = ∏ from i=1 to k of (n−k+i)/i

Each stage can be performed using exact integer arithmetic. This reduces unnecessary intermediate size and uses the symmetry of the binomial coefficient.

Why combinations divide by r!

Suppose you select 3 people from 6. If order mattered, each group of three could appear in 3! = 6 orders. The people Alice, Ben, and Cara could be listed ABC, ACB, BAC, BCA, CAB, or CBA. For an equal-role committee, those are not six committees—they are six orderings of one committee.

The permutation count nPr counts every one of those orders. Dividing by r! collapses those duplicate arrangements:

C(n,r) = P(n,r) / r!

That relationship is why the calculator displays both r! and nPr as supporting results. They make the “order does not matter” idea visible numerically instead of presenting nCr as an isolated formula.

Why C(n,r) = C(n,n−r)

Every choice of r selected items automatically determines the n−r items left out. Therefore, counting the ways to choose the selected group must give the same answer as counting the ways to choose its complement.

C(n,r) = C(n,n−r)

For example, C(10,3) = C(10,7) = 120. Choosing 3 people to join a team is equivalent, from a counting perspective, to choosing the 7 people who do not join.

This symmetry is also computationally useful. If r is close to n, using n−r requires fewer multiplication steps. For C(10,9), the calculator can calculate C(10,1) instead.

Combination vs permutation

A combination ignores order; a permutation counts order. Ask whether changing positions produces a genuinely different result.

Combination examples: choose 4 equal-role committee members, select 5 lottery numbers where order on the ticket does not matter, or choose 2 pizza toppings from a list.

Permutation examples: assign president, vice president, and treasurer; determine first, second, and third place; or form a sequence where ABC differs from BAC.

P(n,r) = n!/(n−r)!    and    C(n,r) = P(n,r)/r!

If r is 0 or 1, permutation and combination counts happen to match because r! = 1. For larger r, the ordered count is generally greater.

Combinations with and without replacement

The ordinary nCr formula assumes no repetition: once an item is selected, that same distinct item cannot appear a second time in the chosen subset. This matches card hands drawn without replacement and committees of distinct people.

A different counting model applies when repetition is allowed and order still does not matter. That is often called “combinations with repetition” or a multiset coefficient, and for n item types and r selections its common formula is C(n+r−1,r).

Do not substitute that formula into an ordinary nCr problem. The two models answer different questions. This calculator intentionally keeps its primary nCr workflow unambiguous: distinct items, unordered selection, no replacement.

Why C(n,0) and C(n,n) both equal 1

There is exactly one way to choose none of the available items: select the empty set. Therefore C(n,0) = 1. There is also exactly one way to choose all n items: take the entire set, so C(n,n) = 1.

These results agree with the factorial formula because 0! = 1. They are not special exceptions added just to make the formula work; they match the actual counting interpretation.

Another useful case is C(n,1) = n because choosing one item from n available items gives n possible single-item subsets.

Exact arithmetic and very large nCr values

Combination counts grow quickly. Ordinary floating-point numbers eventually lose integer precision, so a calculator that evaluates large factorials using standard decimal-number arithmetic can display rounded values even though nCr itself is an exact integer.

SonoCalculator uses JavaScript BigInt for the combinatorial calculation. That allows exact integer results throughout the supported input range. It also avoids computing n!, r!, and (n−r)! separately for the primary result; the multiplicative algorithm uses only the smaller side k = min(r,n−r).

When a result contains hundreds or thousands of digits, the default compact-card setting summarizes the card to preserve the page layout while the Calculation breakdown still contains the exact integer. You can switch to full-card output if you specifically want the entire integer inside the result cards.

The current input limit of n = 10,000 is a practical browser safeguard rather than a mathematical boundary on combinations.

Worked combination examples

Example 1: choose 3 from 8

For n = 8 and r = 3:

C(8,3) = 8!/[3!5!] = (8×7×6)/(3×2×1) = 56

There are 56 unordered three-item subsets.

Example 2: a five-person committee from 12 people

No committee roles are distinguished, so order does not matter:

C(12,5) = 792

If those five people instead had five distinct offices, that would be a permutation problem.

Example 3: two-card hands

A standard 52-card deck has C(52,2) distinct unordered two-card hands:

C(52,2) = 1,326

Drawing the ace of clubs then king of hearts gives the same final two-card hand as drawing those same two cards in the reverse order.

Example 4: symmetry

C(20,18) would be tedious to expand directly, but symmetry gives C(20,18) = C(20,2):

C(20,18) = C(20,2) = 190

Example 5: selecting nothing

C(15,0) = 1. The one valid selection is the empty subset.

How combinations appear in probability

Combinations are often used to count equally likely unordered outcomes before forming a probability ratio. In a card problem, for example, the denominator might be C(52,5), the number of five-card hands, while the numerator counts hands satisfying a condition.

The combination count alone is not automatically a probability. A probability requires a suitable model and, when using favorable divided by total outcomes, the outcomes being counted must be equally likely. Counting formulas tell you how many structures exist; probability tells you how likelihood is distributed over them.

Binomial probabilities also contain C(n,r) because the coefficient counts which r of n trial positions contain successes. The probability weights are then supplied separately by powers of p and 1−p.

Common nCr mistakes

Using nCr when order matters. If selected items receive distinct roles or positions, use a permutation model instead.

Allowing r to exceed n. Under the ordinary choose-r-from-n interpretation without replacement, you cannot select more distinct items than are available.

Using non-integer n or r. This calculator is for finite-set counting with whole-number item counts.

Forgetting whether repetition is allowed. Standard nCr assumes no replacement. Combinations with repetition use a different formula.

Counting identical objects as distinct. The standard formula assumes the n available objects are distinguishable for selection purposes.

Confusing C(n,r) with C(r,n). Symmetry is C(n,r) = C(n,n−r), not C(r,n).

Calculating giant factorials with ordinary floating point. Large factorial values can overflow or lose exact integer precision. An exact multiplicative method is safer for nCr.

Frequently asked questions

What does nCr stand for?

It denotes the number of combinations of n distinct objects taken r at a time, with order ignored and repetition not allowed.

What is the nCr formula?

C(n,r) = n!/[r!(n−r)!] for integers n ≥ r ≥ 0.

Why does order not matter in a combination?

Because the result is a subset or group rather than a sequence. Rearranging the same selected members does not create a new subset.

Why are C(n,r) and C(n,n−r) equal?

Choosing the r items included uniquely determines the n−r items excluded, so the two counts correspond one-to-one.

What is C(n,0)?

It is 1, representing the single empty selection.

Can r be larger than n?

Not in this calculator's standard without-replacement model. The input is rejected because there are not enough distinct items available.

Can n or r be decimal values?

Not for this finite counting interpretation. Both represent counts of items and must be whole numbers.

Is nCr the same as a permutation?

No. A permutation treats different orders as different outcomes; a combination does not. Their relationship is P(n,r) = C(n,r)r!.

Important note

This calculator uses the standard finite combination model: n distinct available items, r distinct items selected, no repetition, and no significance attached to selection order. If your problem allows repeated selections, includes indistinguishable objects, or assigns roles/order to the selected items, use the counting model appropriate to those assumptions rather than applying nCr mechanically.