Calculators King

Probability

Combination Calculator

Compute the exact combination nCr and, for a small n, show the multiply-and-divide build that produces that integer.

Worksheet

Press Calculate to see the result.

Compute the exact combination nCr and, for a small n, show the multiply-and-divide build that produces that integer.

What this calculator answers

A combination counts unordered subsets. Choosing 3 committee members from 10 people does not care who was named first, so the ordered count 10 × 9 × 8 is too large by a factor of 3 × 2 × 1. This page divides that extra order out and returns an exact integer. For a small n the steps print the multiply-and-divide build, one factor at a time, so you can see the integer appear without a calculator rounding a factorial ratio. The same integer is the binomial coefficient inside several probability formulas.

nCr is the exact combination routine. The loop multiplies (n − k + i) and divides by i, using the smaller of r and n − r. For a small problem the steps print that build. For a large problem they name the same loop and print the exact integer without every factor. Supporting counts and intermediate terms sit under the headline so a reader can see what was divided by what. When a checkbox or a tail setting changes the divisor or the rejection region, that choice appears in the steps rather than vanishing into a silent default.

The formula, written out

Combinations of n items taken r at a time uses this relationship.

nCr = n! / (r! (n − r)!) = product from i = 1 to r of (n − r + i) / i

  • n. How many distinct items are available.
  • r. How many are chosen, without regard to order.
  • n − r. The items left out.
  • nCr. The exact number of unordered subsets.

Start from the ordered count nPr and divide by r factorial, because each unordered subset has been counted once for every way to order its members. The computational build multiplies and divides one integer at a time so every intermediate value stays an integer. Using the smaller of r and n − r shortens the product without changing the result, since nCr equals nC(n − r). The algebra is the named textbook identity for this worksheet. Intermediate products and quotients appear in order so a calculator and a pencil can agree to the displayed rounding. If a neighbouring page uses a different divisor or a continuity correction, that page says so on its own ticket.

A full worked example

Example loaded in the worksheet

The form is prefilled with a small example so every arithmetic step can be checked by hand. Change one field after you finish the walkthrough and confirm the ticket moves the way the formula predicts.

n is 10 and r is 3. Order does not matter. The formula is n! / (r! (n − r)!) = 10! / (3! × 7!). nCr equals nC(n − r), so the page builds the product with the smaller index 3 rather than 3 when those differ.

The multiplicative build, using the smaller index 3, is (8/1) × (9/2) × (10/3). The exact integer from that loop is 120. The ordered count nPr would be larger by a factor of 3! whenever r is at least 2.

Choosing the 7 items left out of 10 gives the same integer as choosing 3. The result is an exact subset count. It is a probability only after it is placed over a denominator.

Figures from the worked example
nCr120
n10
r3

A second situation

The complementary count r = 7, which matches r = 3

n is 10 and r is 7. Order does not matter. The formula is n! / (r! (n − r)!) = 10! / (7! × 3!). nCr equals nC(n − r), so the page builds the product with the smaller index 3 rather than 7 when those differ.

The multiplicative build, using the smaller index 3, is (8/1) × (9/2) × (10/3). The exact integer from that loop is 120. The ordered count nPr would be larger by a factor of 7! whenever r is at least 2.

Choosing the 3 items left out of 10 gives the same integer as choosing 7. The result is an exact subset count. It is a probability only after it is placed over a denominator.

Figures from the worked example
nCr120
n10
r7

Choosing 7 out of 10 is the same integer as choosing the 3 who are left out. The page reduces the larger index and prints the shorter build, which is why the complementary count matches the original count exactly rather than approximately. The second example changes the feature that this formula is sensitive to, and the ticket shows the new figure beside the same definition. That contrast is the fastest way to see which input owns the movement.

What moves when the input moves

r moved from 3 to 2, so one fewer factor entered the combination. The headline result went from 120 to 45.

The nudged inputs

n is 10 and r is 2. Order does not matter. The formula is n! / (r! (n − r)!) = 10! / (2! × 8!). nCr equals nC(n − r), so the page builds the product with the smaller index 2 rather than 2 when those differ.

The multiplicative build, using the smaller index 2, is (9/1) × (10/2). The exact integer from that loop is 45. The ordered count nPr would be larger by a factor of 2! whenever r is at least 2.

Choosing the 8 items left out of 10 gives the same integer as choosing 2. The result is an exact subset count. It is a probability only after it is placed over a denominator.

Figures from the worked example
nCr45
n10
r2

How to read the result

Read the result as a count of subsets. It becomes a probability only after you divide by the count of subsets that count as the denominator. The printed integer is exact, including when it is later summarized with a digit count because it is huge. Say the unit, the sample size or contract terms, and the formula name in the same sentence as the figure. A number without those three pieces invites a later reader to invent a definition that this page never used.

Write the result with its unit, the inputs that produced it, and the name of the formula. Write the result with its unit, the inputs that produced it, and the name of the formula. If the ticket shows a decision sentence, quote the alpha and the tail with it. If the ticket shows a money or dose figure, quote the rate and the schedule that produced it.

Assumptions that have to stay true

  • The items are distinct.
  • Order inside the subset does not matter.
  • There is no repetition.
  • r is a whole number from 0 through n.

If an assumption above is false, do not average the discomfort away. Change the worksheet or change the question. A correct arithmetic step on the wrong model is still the wrong answer for the decision you are trying to make.

Mistakes that change the answer

  • Reporting nPr and calling it a combination. The missing division is r factorial.
  • Cancelling factorials in floating point. Use the multiply-and-divide integer loop instead.
  • Forgetting that nCr equals nC(n − r) and computing the long product by hand.
  • Using a combination when the seats are labeled. Labeled seats are permutations.

Where a different calculator is the honest choice

Use the permutation calculator when order matters. Use the factorial calculator when you need a single factorial rather than a ratio. Use the hypergeometric calculator when this coefficient is the numerator of a without-replacement probability. Related links under the essay open pages that keep their own formulas instead of hiding a mode switch inside this ticket.

When the job changes, move to a page built for that job: Permutation Calculator, Factorial Calculator, Hypergeometric Distribution Calculator.

Check yourself

How many unordered ways can 3 items be chosen from 10?

The build is (8/1) × (9/2) × (10/3) = 120. So 10C3 = 120.

Using the result in a sentence

Committees, lottery draws, and the binomial coefficient inside a probability mass are the usual combination questions. Keep the count, the unit, and the assumption list beside any copy of the number that leaves this browser tab.

Multisets, identical items, and selections with restricted positions need other counts. A huge coefficient should be kept exact or moved to log space before it is used in a probability. An ordinary spreadsheet number will round it. Pair the headline with the steps before you staff a route, set a grade boundary, or compare two contracts from a single number.

Questions people ask next

01What definition does the Combination Calculator commit to?

This page uses Combinations of n items taken r at a time: nCr = n! / (r! (n − r)!) = product from i = 1 to r of (n − r + i) / i. Start from the ordered count nPr and divide by r factorial, because each unordered subset has been counted once for every way to order its members. The computational build multiplies and divides one integer at a time so every intermediate value stays an integer. Using the smaller of r and n − r shortens the product without changing the result, since nCr equals nC(n − r). If a textbook uses a different divisor, a different continuity correction, or a different rounding rule, the last digits can move, so the definition is printed above the result. The worksheet asks for n items, r chosen, and it refuses a blank that the formula cannot interpret. Keep that printed definition in the sentence you write next to the figure so a later reader can rebuild the arithmetic without guessing which convention you chose.

02How should the worked example be read out loud?

In the loaded example the ncr is 120. Read the result as a count of subsets. It becomes a probability only after you divide by the count of subsets that count as the denominator. The printed integer is exact, including when it is later summarized with a digit count because it is huge. Say the unit and the count before you say whether the number is large or small. Read the steps in order rather than jumping to the headline, because the intermediate terms are where a swapped percent and proportion usually hide. If the ticket shows both a primary figure and a comparison figure, name which one you are quoting.

03What is the fastest way to get a misleading result?

Reporting nPr and calling it a combination. The missing division is r factorial. Multisets, identical items, and selections with restricted positions need other counts. A huge coefficient should be kept exact or moved to log space before it is used in a probability. An ordinary spreadsheet number will round it. A second common failure is leaving a checkbox or tail setting in the wrong state and then treating the number as if the default had matched your plan. Reset the example, change one input, and confirm the ticket moves in the direction the formula predicts before you trust a live run.

04When should I leave this page for a different calculator?

Use the permutation calculator when order matters. Use the factorial calculator when you need a single factorial rather than a ratio. Use the hypergeometric calculator when this coefficient is the numerator of a without-replacement probability. The related links under the essay go to those worksheets, which keep their own formulas instead of hiding them in a mode switch. If the question changed from a summary to a test, from a payment to a refinance, or from a raw score to a percentile, switch pages rather than forcing this ticket to answer a job it was not built for.

05What belongs in the sentence next to the number?

The build is (8/1) × (9/2) × (10/3) = 120. So 10C3 = 120. Name the formula, the sample size or the inputs, and the unit before you compare the figure with someone else's. A bare number without those three pieces cannot be audited when a score, a rate, or a lab value is challenged later. Store the inputs beside the result whenever the figure will travel into a report.