Combination Calculator - n Choose r and Binomial Counts

Use this combination calculator to find C(n, r) with BigInt precision, the n choose r notation, the factorial form, and the multiplication ladder for any n and r from 0 to 100.

Updated: June 16, 2026 • Free Tool

Combination Calculator

Total number of distinct items in the set, for example 12 colored balls or 52 playing cards.

Number of items to choose from the set, where r is between 0 and n inclusive. The calculator returns 0 if r is greater than n.

Switch on when the same item can be chosen more than once, for example dice rolls or pizza topping selections.

Results

C(n, r) Value
0
Formula 0
Permutation P(n, r) 0
Factorial Values 0
Number of Digits 0

What Is This n Choose r Calculator?

A combination calculator is a combinatorics tool that returns the binomial coefficient C(n, r) for any n and r. Type the total number of items and the number of items you want to choose, and the combination calculator returns the exact integer n! / (r! (n - r)!) using BigInt arithmetic so even very large counts stay precise.

  • Lottery and Prize Draw Counts: Count distinct ticket sets in a 6-from-49 lottery or Powerball draw, so you can size the odds.
  • Poker Hands and Card Games: Compute the 5-card poker hands from a 52-card deck (C(52, 5) = 2,598,960) and reuse the formula for other card games.
  • Team and Committee Selection: Count project teams, juries, or committees from a larger pool when seating order is irrelevant.
  • Sampling and Quality Inspection: Calculate samples of size r from a batch of n items for acceptance sampling, audits, or inventory checks.

The result is also called the binomial coefficient, the combination, or n choose r, and is the same number that appears as a Pascal's triangle entry and as the coefficient in a binomial expansion. Use the calculator whenever the question is how many groups of r items can be pulled from n without regard to order, and switch to a permutation formula once seating, ranking, or sequence starts to matter.

When the problem also requires the ordered arrangements, the permutation and combination calculator returns both nPr and nCr side by side so the ordered and unordered counts stay in one view.

How the n Choose r Calculator Works

The combination calculator applies the standard n choose r formula, simplifies the multiplication so large inputs stay fast, and returns the exact integer with the factorial form so the result is easy to verify by hand.

C(n, r) = n! / (r! x (n - r)!)
  • n: Total number of distinct items, an integer from 0 to 100.
  • r: Number of items chosen, an integer from 0 to n. The calculator returns 0 when r exceeds n.
  • n!, r!, (n - r)!: Factorial values; n! is 1 x 2 x ... x n, with 0! = 1.
  • C(n, r): The exact integer binomial coefficient, computed with BigInt so it stays precise for inputs as large as C(100, 50).

The formula is the one most introductory statistics and probability textbooks use, and the calculator keeps every intermediate multiplication in BigInt so the value stays exact for very large inputs such as C(100, 50), where a standard JavaScript number would round to a meaningless figure.

When the with-repetition toggle is on, the formula switches to the multiset version (r + n - 1)! / (r! x (n - 1)!) so the same item can be chosen more than once, for example the 20 ways to roll a 3-dice sum of 6 from 6 faces, the 10 ways to choose 3 pizza toppings from 4 options, or the 4 multisets that pick 2 socks from a 2-color drawer.

Worked Example: 12 Balls, Choose 5

n = 12, r = 5, with repetition = off

1. Confirm n = 12 and r = 5. 2. Apply C(n, r) = n! / (r! (n - r)!) = 12! / (5! x 7!). 3. Cancel 7! and read 12 x 11 x 10 x 9 x 8 / 5! = 792.

C(12, 5) = 792, Formula = 12! / (5! x 7!) = 792

Choosing 5 balls from 12 distinct colors gives 792 unordered sets, and the multiplication ladder 12 x 11 x 10 x 9 x 8 / 120 = 792 lets you verify the calculation by hand.

According to Wolfram MathWorld, the n choose r formula is C(n, r) = n! / (r! (n - r)!), and the same value is also called the binomial coefficient.

According to Omni Calculator - n choose r, the C(n, r) formula is n! / (r! (n - r)!), and the multiset variant is C(n, r) = (r + n - 1)! / (r! (n - 1)!) for selections with repetition.

Because the formula is built from n!, r!, and (n - r)!, the factorial calculator is the right companion when the user wants to read off each factorial value one at a time before plugging them into the ratio.

Key Concepts Explained

Four ideas make C(n, r) easier to apply, and each one maps to a real input, output, or rule the calculator exposes:

The n choose r Interpretation

Read C(n, r) as the number of ways to choose r items from n distinct items without regard to order. The same number is also called a binomial coefficient and is read as n choose r or nCr.

Unordered Groups vs Ordered Lists

Unordered groups ignore order; ordered lists respect order. P(n, r) = C(n, r) x r! bridges the two counts.

The Multiplication Ladder

Cancel the larger factorial first, so C(n, r) becomes (n - r + 1)...n / 1...r. This ladder is the fastest way to compute the count by hand.

Symmetry and Pascal's Triangle

C(n, r) = C(n, n - r) by symmetry, and the recursion C(n, r) = C(n - 1, r - 1) + C(n - 1, r) generates Pascal's triangle row by row.

These ideas prevent the most common mistakes: counting ordered lists as unordered groups, using n! / r! instead of n! / (r! (n - r)!), and forgetting that r must be at most n.

The same binomial coefficient drives the binomial probability P(X = k) = C(n, k) p^k (1 - p)^(n - k), so the binomial distribution calculator extends the n choose r result into repeated trials on the same inputs.

How to Use This Calculator

Follow these five steps to compute C(n, r) for any n and r with the combination calculator:

  1. 1 Enter the Total Number of Items: Type the total number of distinct items, for example 12 colored balls, 52 playing cards, or 49 lottery numbers. The calculator accepts n from 0 to 100.
  2. 2 Enter the Number of Items to Choose: Type r, the items to choose, for example 5 balls, 5 cards, or 6 lottery numbers. The calculator returns 0 if r is greater than n.
  3. 3 Toggle Repetition if Needed: Switch on Allow Repetition when the same item can be chosen more than once, for example dice rolls or pizza topping selections.
  4. 4 Read the C(n, r) Value: Check the n choose r value in the result panel. Results up to 15 digits use thousands separators; larger counts switch to scientific notation.
  5. 5 Verify With the Formula and Ladder: Use the factorial form, the multiplication ladder, and the permutation count P(n, r) = C(n, r) x r! to confirm the result.

For example, with n = 12, r = 5, and repetition off, the calculator shows C(12, 5) = 792, formula = 12! / (5! x 7!) = 792, and permutation count = 95,040, matching the bag-of-balls case where 12 distinct colors and a 5-ball draw give 792 unordered sets.

Once the C(n, r) value is known, the probability calculator divides the favorable groups by the total groups to return the matching event probability on the same sample space.

Benefits of Using This Calculator

Using a dedicated n choose r combination calculator has several practical advantages over computing C(n, r) by hand:

  • Exact BigInt Binomial Coefficient: The calculator uses BigInt arithmetic so the binomial coefficient is the exact integer, not a rounded floating-point approximation, even for inputs like C(100, 50).
  • Readable Factorial Form: The formula field shows the multiplication in factorial form, for example 12! / (5! x 7!) = 792, so the user can verify the calculation step by step.
  • Multiplication Ladder for Hand Checking: The simplified product (n - r + 1)...n / 1...r matches the multiplication ladder most textbooks use.
  • Permutation Count for Cross-Checking: The P(n, r) field returns C(n, r) x r!, which makes it easy to confirm the relation P(n, r) = C(n, r) x r! on the same inputs.
  • Standard and Repetition Modes: The same calculator covers both the standard n choose r problem and the multiset form (r + n - 1)! / (r! (n - 1)!).
  • Reset for the Next Problem: Press Reset to restore the default n = 12 and r = 5, useful for tutors and students working through several n choose r problems in a row.

Most introductory C(n, r) problems in a statistics or probability unit are answered in seconds once the user stops simplifying the factorial ratio by hand. The same combination count feeds straight into lottery, poker, and committee decisions.

When the experiment has more than one independent stage and each stage is its own n choose r problem, the fundamental counting principle calculator multiplies the per-stage binomial counts to size the full sample space.

Factors That Affect Your Results

A few real-world factors change how the C(n, r) formula applies and what the calculator returns:

Order Matters vs. Order Does Not Matter

Unordered groups ignore order; ordered lists respect order. When order matters, use P(n, r) = n! / (n - r)! and the calculator's P(n, r) field shows the equivalent ordered count.

Repetition Allowed or Not

Standard C(n, r) counts assume each item is used at most once. With repetition allowed, the formula becomes (r + n - 1)! / (r! (n - 1)!), so 4 pizza toppings from 3 options gives 20 multisets.

Symmetry Property C(n, r) = C(n, n - r)

The calculator uses the symmetry to pick the smaller of r and n - r for the multiplication ladder, so C(100, 50) runs roughly 50 multiplication steps instead of 100.

Binomial Theorem and Pascal's Triangle

The n choose r values are the coefficients in the expansion of (x + y)^n, and the same C(n, r) value appears in the binomial distribution.

  • The calculator counts distinct items; if some items are identical, divide by the duplicate factorials to remove overcounted permutations, which the calculator does not do automatically.
  • It does not handle dependent or restricted selections, such as a team where two members refuse to work together; restrict the option counts at the start or split the experiment into cases.

The same n! / (r! (n - r)!) value appears in the binomial probability P(X = k) = C(n, k) p^k (1 - p)^(n - k), which is why the same C(n, r) result drives both this calculator and probability problems.

According to Wikipedia - Combination, the n choose r rule is C(n, r) = n! / (r! (n - r)!), and a 5-card poker hand drawn from a 52-card deck gives C(52, 5) = 2,598,960 distinct hands.

Combination calculator featured image showing C(n, r) inputs, the n choose r result, the binomial coefficient, the factorial form, and the multiplication ladder
Combination calculator featured image showing C(n, r) inputs, the n choose r result, the binomial coefficient, the factorial form, and the multiplication ladder

Frequently Asked Questions

Q: What is C(n, r) in math?

A: C(n, r) is the number of ways to choose r items from n distinct items when order does not matter. The formula is C(n, r) = n! / (r! x (n - r)!).

Q: How do I calculate C(n, r)?

A: Compute n!, divide by r! and (n - r)!, and read the result. For large n, use the multiplication ladder (n - r + 1)...n / 1...r instead.

Q: What is the difference between permutation and n choose r?

A: Permutation counts ordered arrangements, so 1, 2, 3 and 3, 2, 1 are different. C(n, r) counts unordered groups, so those two lists are the same. The bridge is P(n, r) = C(n, r) x r!.

Q: How many tickets exist in a 6-number lottery?

A: A 6-from-49 lottery has C(49, 6) = 13,983,816 distinct ticket sets. The calculator returns 13,983,816 for n = 49, r = 6.

Q: What is the formula for n choose r with repetition?

A: When the same item can be chosen more than once, the multiset formula is C(n, r) = (r + n - 1)! / (r! x (n - 1)!). For example, 3 pizza toppings from 4 options with repetition gives 20 multisets.

Q: What does n choose r mean?

A: n choose r is shorthand for the binomial coefficient C(n, r) = n! / (r! (n - r)!), which counts the number of ways to choose r items from n distinct items when order does not matter.