ThisCalculator

Statistics

Binomial Coefficient Calculator: nCr Formula & Use

Updated · Standard formula, shown below

n choose k 120
Factorial form
120
Result
Total items (n)
10
You entered
Items chosen (k)
3
You entered

Binomial Coefficient Calculator: nCr Formula & Use

This binomial coefficient calculator computes the value of n choose k (written as C(n,k) or nCr), which is the number of ways to choose k items from a set of n distinct items where order does not matter. You enter the total number of items (n) and the number of items to choose (k), and you get the exact integer result, along with the factorial-based formula used to calculate it. The calculator also shows the equivalent value from Pascal’s triangle, which is useful for checking your work in combinatorics and probability.

Formula

The binomial coefficient is defined by the formula:

C(n,k) = n! / (k! × (n−k)!)

Here, n! (n factorial) is the product of all positive integers from 1 to n, for example 5! = 5 × 4 × 3 × 2 × 1 = 120. The variables are:

  • n – total number of distinct items (a non-negative integer).
  • k – number of items to choose (a non-negative integer, 0 ≤ k ≤ n).
  • C(n,k) – the number of combinations, read as “n choose k”.

For example, C(10,3) = 10! / (3! × 7!) = 120. The calculator uses the ncr function directly, which is mathematically identical to the factorial expression but avoids very large intermediate numbers.

Worked Example

Using the default values from the calculator: n = 10, k = 3.

  1. Write the factorial form: C(10,3) = 10! / (3! × 7!)
  2. Expand the factorials: 10! = 10 × 9 × 8 × 7! (we stop at 7! because it cancels)
  3. Cancel the 7! in numerator and denominator: C(10,3) = (10 × 9 × 8) / (3 × 2 × 1)
  4. Compute the numerator: 10 × 9 × 8 = 720
  5. Compute the denominator: 3 × 2 × 1 = 6
  6. Divide: 720 / 6 = 120

The calculator returns 120, matching the result above. The factorial form output also gives 120, confirming the equivalence.

When to Use the Binomial Coefficient

The binomial coefficient appears whenever you need to count selections without regard to order. Common applications include:

  • Probability: Calculating the number of favorable outcomes in games of chance, like drawing cards or rolling dice.
  • Combinations: Choosing a committee of 3 people from a group of 10.
  • Binomial theorem: The coefficients in the expansion of (x + y)^n are exactly C(n,k).
  • Lottery odds: The number of possible ticket combinations is C(total numbers, numbers drawn).

If order matters, you need permutations (nPr) instead. For example, choosing a president, vice-president, and treasurer from 10 people gives 10 × 9 × 8 = 720 permutations, but choosing a 3-person committee gives 120 combinations.

How to Read the Result

The result is a whole number that tells you how many distinct subsets of size k exist in a set of n elements. For instance, C(10,3) = 120 means there are 120 different ways to pick 3 items from 10. The number grows quickly: C(50,25) is about 1.26 × 10^14, which is why calculators are essential for large n.

Note that C(n,k) = C(n, n−k). For example, C(10,3) = C(10,7) = 120. This symmetry is useful when k is close to n, as the calculation is easier with the smaller of the two.

Common Mistakes and Misconceptions

  • Swapping n and k: C(n,k) is not the same as C(k,n) unless n = k. Always identify which number is the total set size.
  • Forgetting that order doesn’t matter: If you use permutations instead of combinations, you’ll get a larger number. Use combinations when the arrangement is irrelevant.
  • Using negative or non-integer inputs: The binomial coefficient is defined only for non-negative integers with k ≤ n. Some calculators return 0 for invalid inputs, but this is not mathematically meaningful.
  • Rounding errors: The result is always an integer, so if your calculator shows a decimal, you likely entered something wrong.

Limits and Practical Tips

For large n (say, above 1000), the exact integer can have hundreds of digits. Most handheld calculators and spreadsheets will overflow or switch to scientific notation. This online calculator uses arbitrary-precision arithmetic, so it can handle n up to about 100,000, though the result may be astronomically large. If you only need an approximate value, you can use the natural logarithm: ln(C(n,k)) ≈ n ln(n) − k ln(k) − (n−k) ln(n−k), then exponentiate. This is useful in statistics and information theory.

Also, remember that C(n,0) = 1 and C(n,n) = 1 for any n, because there is exactly one way to choose nothing or everything.

Frequently Asked Questions

What is the difference between nCr and nPr?

nCr (combinations) counts selections where order does not matter, while nPr (permutations) counts arrangements where order does matter. For example, choosing 2 letters from {A,B,C}: combinations give {AB, AC, BC} (3), while permutations give AB, BA, AC, CA, BC, CB (6). The formula for permutations is n! / (n−k)!, which is k! times larger than combinations.

Can I use the binomial coefficient for negative numbers?

The standard binomial coefficient is defined for non-negative integers. However, the generalized binomial coefficient extends to negative n using the formula C(n,k) = n(n−1)…(n−k+1) / k!, which can yield negative or fractional values. This appears in the binomial series for negative exponents. This calculator only handles non-negative integers.

How do I calculate binomial coefficients without a calculator?

You can use Pascal’s triangle, where each number is the sum of the two above it. The row number is n (starting from 0), and the position in the row is k. For example, row 5 is 1, 5, 10, 10, 5, 1, so C(5,2)=10. Alternatively, use the factorial formula with cancellation, as shown in the worked example.

What is the binomial coefficient used for in real life?

It is used in probability (e.g., calculating poker hand odds), genetics (predicting trait combinations), quality control (sampling), and computer science (algorithm analysis). For instance, the number of ways to get exactly 3 heads in 5 coin flips is C(5,3)=10, which is essential for binomial probability calculations.

Why does the calculator show a factorial form output?

The factorial form output shows the formula n! / (k! (n−k)!) evaluated directly. It serves as a verification that the ncr function is correct and helps you understand the underlying math. For large n, the factorial form may overflow before the ncr function does, so the ncr result is the primary answer.

Related

Formula used
in n | Total items (n) | - | 10 | 0
in k | Items chosen (k) | - | 3 | 0
out result | n choose k | - | ncr(n,k) | 0
out factorial_form | Factorial form | - | fact(n) / (fact(k) * fact(n-k)) | 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.