ThisCalculator

Everyday

NCR Calculator: Formula & How to Use It

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

The NCR calculator computes the number of ways to choose r items from a set of n distinct items, ignoring order. You enter the total number of items (n) and the number to choose (r), and it returns the combination count using the formula nCr = n! / (r! × (n−r)!). This value is widely used in probability, statistics, and combinatorics to count possible selections without regard to arrangement.

Formula

The standard formula for combinations (often called “n choose r”) is:

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

Where:

  • n = total number of distinct items (a non-negative integer)
  • r = number of items to choose (a non-negative integer, r ≤ n)
  • ! = factorial, meaning the product of all positive integers up to that number (e.g., 5! = 5 × 4 × 3 × 2 × 1 = 120)

The result is the number of distinct subsets of size r that can be formed from n items. Order does not matter; for example, choosing {A, B} is the same as choosing {B, A}.

Worked Example

Using the default values from the calculator above (n = 10, r = 3):

  1. Compute 10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 3,628,800
  2. Compute 3! = 3 × 2 × 1 = 6
  3. Compute (10 − 3)! = 7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5,040
  4. Apply the formula: 10C3 = 3,628,800 / (6 × 5,040) = 3,628,800 / 30,240 = 120

The calculator returns 120, which matches. This means there are 120 different ways to choose 3 items from a set of 10 distinct items.

When to Use NCR

Use the combination formula whenever you need to count selections where the order of the chosen items does not matter. Common scenarios include:

  • Choosing a committee of 3 people from a group of 10 (who gets selected, not the order of selection)
  • Selecting 5 cards from a 52-card deck (a poker hand, where the order of cards is irrelevant)
  • Picking 2 toppings from a list of 8 for a pizza
  • Calculating the number of possible lottery combinations (e.g., choosing 6 numbers from 49)
  • Determining the number of ways to form a team of r players from a squad of n players

If order matters, you need the permutation formula (nPr = n! / (n − r)!) instead. For example, choosing a president, vice-president, and treasurer from 10 people is a permutation because each office is distinct; choosing 3 committee members with equal roles is a combination.

How to Read the Result

The result is always a non-negative integer. It tells you the total number of distinct subsets of size r that exist within your set of n items. For instance, 10C3 = 120 means you can form 120 different groups of 3 from 10 items.

Some useful properties to keep in mind:

  • nC0 = 1 (there is exactly one way to choose nothing)
  • nCn = 1 (there is exactly one way to choose everything)
  • nC1 = n (choosing one item from n gives n possibilities)
  • nCr = nC(n−r) (choosing r to include is the same as choosing n−r to exclude)

Common Mistakes and Misconceptions

One frequent error is confusing combinations with permutations. Always ask: does the order of selection matter? If yes, use nPr; if no, use nCr.

Another mistake is entering r larger than n. The formula is undefined for r > n because you cannot choose more items than you have. Most calculators will return an error or 0; the correct interpretation is that there are 0 ways to choose more items than exist.

Rounding errors can occur if you try to compute factorials manually for large n. For example, 50! is a 65-digit number, and intermediate results can overflow standard calculators. The NCR formula is best computed using a dedicated function or by simplifying before multiplying: nCr = (n × (n−1) × … × (n−r+1)) / r!. This avoids huge numbers.

Also, note that n and r must be non-negative integers. The formula does not apply to fractional or negative values.

Limits of the Formula

The standard NCR formula assumes all n items are distinct. If some items are identical, the count changes. For example, the number of ways to arrange the letters in “MISSISSIPPI” is not a simple combination; it requires dividing by the factorials of repeated letters.

For very large n (e.g., n > 1000), the result becomes astronomically large and may exceed the precision of standard floating-point arithmetic. In such cases, you may need arbitrary-precision libraries or logarithmic approximations.

The formula also assumes sampling without replacement. If you allow the same item to be chosen more than once, the number of combinations with repetition is given by (n+r−1)Cr, which is a different formula.

Alternatives and Related Formulas

If order matters, use the permutation formula:

nPr = n! / (n − r)!

For example, 10P3 = 10! / 7! = 10 × 9 × 8 = 720. This counts arrangements, not just selections.

If you need to count subsets that include or exclude specific items, you can use the binomial coefficient in the binomial theorem: (x + y)^n = Σ (nCr) x^(n−r) y^r. The coefficients nCr are exactly the combination values.

Frequently Asked Questions

What is the difference between nCr and nPr?

nCr counts combinations (order does not matter), while nPr counts permutations (order matters). For the same n and r, nPr is always larger because each combination of r items can be arranged in r! different orders, so nPr = nCr × r!.

Can nCr be used for probability?

Yes. Many probability problems involve counting favorable outcomes divided by total outcomes. For example, the probability of drawing exactly 2 aces in a 5-card hand from a 52-card deck is (4C2 × 48C3) / 52C5. The NCR calculator gives you the count for each part.

What happens if r is 0 or n?

If r = 0, there is exactly one way to choose nothing, so nC0 = 1. If r = n, there is exactly one way to choose all items, so nCn = 1. These are consistent with the formula: n! / (0! × n!) = 1, since 0! is defined as 1.

How do I calculate nCr on a scientific calculator?

Most scientific calculators have a dedicated nCr button, often labeled as “nCr” or “C”. You enter n, press the nCr button, enter r, and press equals. If your calculator lacks this function, you can compute it manually using the formula or use an online NCR calculator.

Why does the calculator sometimes return an error for large n?

For very large n (e.g., n = 1000), the factorial values become enormous and exceed the maximum number a calculator can handle. The result may overflow to infinity or produce an error. In such cases, use a calculator that supports arbitrary precision or use the logarithmic form: ln(nCr) = ln(n!) − ln(r!) − ln((n−r)!).

Is there a shortcut for nCr when r is small?

Yes. When r is small (like 2 or 3), you can compute nCr as: nC2 = n × (n−1) / 2, nC3 = n × (n−1) × (n−2) / 6. This avoids computing full factorials and reduces the chance of overflow.

Related

Formula used
in n | Total items (n) | - | 10 | 0
in r | Items chosen (r) | - | 3 | 0
out ncr | Combinations (nCr) | - | ncr(n,r) | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.