Free Binomial Coefficient Calculator

nk

Enter n and k, then click Calculate

The binomial coefficient calculator (often referred to as an n choose k calculator, combination calculator, or nCr calculator) is a specialized tool that computes the number of ways to select kk unordered items from a set of nn distinct elements. This value is known as a binomial coefficient and is denoted as (nk)\binom{n}{k} or C(n,k)C(n,k). It appears across many fields—combinatorics, probability, statistics, and algebra—and corresponds to the nCr button on standard calculators.

What Is a Binomial Coefficient?

In algebra, a binomial is a polynomial with exactly two terms—for example, x+1x+1 or x3z−0.5y5x^3z - 0.5y^5. When a binomial is raised to a positive integer power, the resulting expansion follows the binomial theorem:

(a+b)n=∑k=0n(nk)an−kbk(a+b)^n = \sum_{k=0}^{n} \binom{n}{k} a^{n-k} b^k

Each coefficient (nk)\binom{n}{k} in this expansion is a positive integer that counts the number of possible combinations. These numbers also appear arranged in Pascal’s triangle, where row nn contains the coefficients for (a+b)n(a+b)^n and the sum of the row is 2n2^n.

Understanding Combinations

A combination is a selection of items from a larger set where the order does not matter. For instance, picking a committee of 4 students from a class of 20 yields (204)\binom{20}{4} possible groups; swapping two members does not create a new committee. This concept is fundamental to probability, card games, lotteries, and any scenario that involves choosing subsets.

The n Choose k Formula

The value of (nk)\binom{n}{k} (read as “n choose k”) is calculated using factorials:

(nk)=n!k! (n−k)!\binom{n}{k} = \frac{n!}{k!\,(n-k)!}

where n!n! (n factorial) is the product of all positive integers up to nn: n!=1×2×3×⋯×nn! = 1 \times 2 \times 3 \times \dots \times n. For example:

  • (42)=4!2! 2!=242×2=6\displaystyle \binom{4}{2} = \frac{4!}{2!\,2!} = \frac{24}{2 \times 2} = 6
  • (62)=6!2! 4!=7202×24=15\displaystyle \binom{6}{2} = \frac{6!}{2!\,4!} = \frac{720}{2 \times 24} = 15

A useful symmetry property follows directly from the formula:

(nk)=(nn−k)\binom{n}{k} = \binom{n}{n-k}

This means that choosing kk items is equivalent to leaving out n−kn-k items, so the number of ways remains the same.

Permutation vs. Combination

The key difference between permutations and combinations lies in order:

  • A permutation arranges items in a specific sequence. For example, the number of ways to order 3 distinct objects is 3!=63! = 6.
  • A combination simply selects a subset; the order of selection is irrelevant.

The formula for permutations of kk items chosen from nn is:

P(n,k)=n!(n−k)!P(n,k) = \frac{n!}{(n-k)!}

Whereas the combination formula includes an extra division by k!k! to remove ordering. In everyday terms: if the order of results matters (like race placements), use permutations; if order does not matter (like lottery numbers), use combinations.

Practical Examples with Poker Hands

A standard deck has 52 cards. The number of possible 5‑card poker hands is:

(525)=2, ⁣598, ⁣960\binom{52}{5} = 2,\!598,\!960

A royal flush (Ace, King, Queen, Jack, 10 of the same suit) can occur in only 1 of these hands, giving a probability of roughly 11 in 2.62.6 million.

A full house (three of a kind + a pair) is more common. To count it:

  1. Choose the rank for the three of a kind: 13 options.
  2. Choose the rank for the pair: 12 options (must differ from the triple rank).
  3. Choose suits for the three of a kind: (43)=4\binom{4}{3} = 4 ways.
  4. Choose suits for the pair: (42)=6\binom{4}{2} = 6 ways.

Multiplying gives:

13×12×4×6=3, ⁣74413 \times 12 \times 4 \times 6 = 3,\!744

Thus a full house occurs 3, ⁣7443,\!744 times more often than a royal flush. Such calculations are immediate with an n choose k calculator.

Connection to Pascal’s Triangle

Every binomial coefficient (nk)\binom{n}{k} can be found in Pascal’s triangle: the entry in row n+1n+1 at position k+1k+1. Conversely, the triangle can be built using the recurrence (nk)=(n−1k−1)+(n−1k)\binom{n}{k} = \binom{n-1}{k-1} + \binom{n-1}{k}. This triangle provides a quick, visual way to obtain binomial coefficients for small nn.

A binomial coefficient calculator automates all these computations—whether you need to evaluate a specific n choose k, explore combinatorial identities, or apply the results to probability and statistics problems. It is an indispensable tool for students, data analysts, and anyone working with combinations.

FAQ

1. How do you calculate n choose k using the binomial coefficient formula?

Use the formula \( \binom{n}{k} = \frac{n!}{k!(n-k)!} \), where \(n!\) is the factorial of \(n\). For example, \( \binom{5}{2} = \frac{5!}{2!3!} = 10\).

2. What is the value of 4 choose 2?

4 choose 2 equals 6. It is computed as \( \frac{4!}{2!2!} = \frac{24}{2 \times 2} = 6\).

3. What is the difference between a combination and a permutation?

In a combination the order of selecting items does not matter; in a permutation the order matters. Permutations of k items from n are given by \( P(n,k) = \frac{n!}{(n-k)!} \), while combinations are \( \binom{n}{k} = \frac{n!}{k!(n-k)!} \).

4. Can I use the binomial coefficient calculator for poker hand probabilities?

Yes. For instance, the number of 5-card poker hands from a 52-card deck is \( \binom{52}{5} = 2,598,960 \). The calculator can quickly evaluate such combos and help compute probabilities.

5. How are binomial coefficients related to Pascal's triangle?

Each entry in Pascal's triangle corresponds to a binomial coefficient. Row \(n+1\) (starting the row count at 1) contains the coefficients \( \binom{n}{0}, \binom{n}{1}, \dots, \binom{n}{n} \).

How to Use

  1. Enter the total number of items (n) in the first input field. This must be a non-negative integer.
  2. Enter the number of items to choose (k) in the second input field. k must be less than or equal to n.
  3. Click the Calculate button to see the binomial coefficient C(n, k) result and factorial breakdown.