Binomial Coefficient Calculator - Compute C(n, k) and P(n, k) Instantly

Use this binomial coefficient calculator to find C(n, k) and the matching permutation P(n, k). Enter n and k to see exact integer results, the formula breakdown, and digit count for large counts.

Updated: June 20, 2026 • Free Tool

Binomial Coefficient Calculator

Total number of distinct items you are choosing from. Use 0 to 170 for reliable integer math.

How many items to select at a time. Must be between 0 and n for a valid binomial coefficient.

Results

Binomial coefficient C(n, k)
0
Permutation count P(n, k) 0
Formula expansion 0
Digit count of C(n, k) 0

What Is a Binomial Coefficient Calculator?

A binomial coefficient calculator is a tool that evaluates C(n, k), the number of ways to choose k items from a set of n distinct items without regard to order.

  • Lottery and draws: Count exact ticket combinations such as choosing 6 numbers from 49, which yields C(49, 6) = 13,983,816 unique outcomes.
  • Card and probability games: Count 5-card poker hands with C(52, 5) = 2,598,960 to compute probabilities of straights, flushes, and full houses.
  • Binomial distribution homework: Look up the coefficient weights used in P(X = k) = C(n, k) p^k (1 − p)^(n − k) for hypothesis tests and risk models.
  • Algorithm complexity and combinatorics: Resolve closed-form counts for selection problems in computer science, such as committee sizes from a roster.

The binomial coefficient is sometimes called 'n choose k', and you may see it written as nCk or (n over k). The phrase tells you exactly what the count represents: the unordered selections of k items from n distinct candidates.

Because the count is always an integer, the calculator returns an exact whole number, never a rounded approximation. When the result has more than fifteen digits, the page switches to scientific notation so it still fits on screen without losing the leading digit and the order of magnitude.

For deeper counting workflows, pair this with the dedicated Combinations Without Repetition tool to break each result down by selection size.

How the Binomial Coefficient Calculator Works

The calculator uses the standard factorial-ratio formula, but evaluates it with the multiplicative product form to keep intermediate values small and exact.

C(n, k) = n! / (k! × (n − k)!)
  • n: Total number of distinct items in the set you are choosing from. Must be a non-negative integer.
  • k: Number of items selected at once. Must satisfy 0 ≤ k ≤ n for the count to be non-zero.
  • C(n, k): The binomial coefficient, an integer equal to the number of unordered selections of k items from n.

Internally the formula runs as C(n, k) = Π (n − k + i) / i for i running from 1 to k. This avoids computing n! on its own and keeps every intermediate value an integer, which matters when n is large.

The matching permutation P(n, k) is reported alongside the coefficient so you can see how order changes the count. P(n, k) equals C(n, k) multiplied by k!, the number of ways to arrange the chosen items.

Choose 3 from 8: C(8, 3)

n = 8, k = 3

C(8, 3) = 8! / (3! × 5!) = 40,320 / (6 × 120) = 40,320 / 720

C(8, 3) = 56 unordered selections

There are 56 distinct ways to pick a 3-item committee from 8 people.

According to Wolfram MathWorld, the binomial coefficient C(n, k) equals n! / (k! (n-k)!) and is zero when k > n

Key Concepts Behind the Binomial Coefficient

Four concepts anchor every combinatorial calculation you do with this tool. Understand them once and the rest of Pascal's triangle, the binomial distribution, and counting arguments become routine.

Factorials (n!)

A factorial multiplies all positive integers up to n, so 5! = 5 × 4 × 3 × 2 × 1 = 120. The binomial coefficient is built from three factorials, and a factorial calculator handles the individual pieces when n is large.

n choose k notation

The notation C(n, k) and the spoken phrase 'n choose k' both encode the same count: the unordered selections of k items from n distinct items. The k always sits at the bottom of the bracket, marking the selection size.

Symmetry property

C(n, k) equals C(n, n − k) because choosing k items to keep is the same as choosing n − k items to leave out. Use this to halve computation time when k is closer to n than to 0.

Pascal's triangle identity

Each interior entry of Pascal's triangle equals the sum of the two entries directly above it, reflecting the identity C(n, k) = C(n − 1, k − 1) + C(n − 1, k). Rows are indexed from n = 0 at the top.

Every row of Pascal's triangle is the list of binomial coefficients C(n, 0), C(n, 1), ... up to C(n, n), so the triangle doubles as a quick lookup table for small n without any calculation.

When n is large enough that you want to see the full product, jump over to the Factorial Calculator to inspect each intermediate factorial separately.

How to Use the Binomial Coefficient Calculator

Enter the two integers, read the four outputs, and decide whether you need C(n, k) or P(n, k). The four steps below walk through the entire flow.

  1. 1 Enter n: Type the total number of distinct items into the Total items (n) field. Whole numbers from 0 to 170 keep the math precise; larger inputs may exceed display limits.
  2. 2 Enter k: Type the number of items to choose at once into the Items to choose (k) field. Keep k between 0 and n, since C(n, k) returns 0 when k is larger.
  3. 3 Read C(n, k) and P(n, k): Look at the primary coefficient and the permutation count. P(n, k) is always at least as large as C(n, k), and equals C(n, k) × k!.
  4. 4 Use the formula expansion and digit count: Copy the formula string (for example, 8! / (3! × 5!) = 56) into your homework, and use the digit count to size up very large outcomes.

Pick n = 12 and k = 5 to count 5-flavor sample packs from 12 available flavors. The result C(12, 5) = 792 tells you there are 792 unique sample packs before considering order.

If your homework wants ordered arrangements too, run the same n and k through the Permutation and Combination Calculator to compare permutations side by side.

Benefits of Using This Binomial Coefficient Calculator

Counting selections by hand is error-prone even for small inputs, and astronomical factorials break paper-and-pencil arithmetic within minutes. This calculator removes those failure modes.

  • Exact integer results: Every C(n, k) is a whole number, and the multiplicative product form keeps the math exact up to BigInt precision, so no rounding quietly changes the answer.
  • Permutation comparison in one view: The matching P(n, k) appears next to C(n, k), so you can see how much order changes the count without switching tools.
  • Edge case handling: Choose nothing (k = 0), choose everything (k = n), or push past n (k > n) all return the right answer by definition, so homework mistakes do not slip through.
  • Readable formula and digit count: The formula line shows the factorial ratio expanded, and the digit count tells you whether a count will fit on a single printed line.
  • No setup or symbolic arguments: Just two integer inputs, no distribution assumption, no probability parameter — the calculator focuses on the count itself, which is the right granularity for homework and quick checks.

Once you have the coefficient, plug n, k, and a success probability into the Binomial Distribution Calculator to finish a full binomial probability problem.

Factors and Limits of the Binomial Coefficient

Even with an exact formula, the result depends on how you choose n and k, and how the calculator handles inputs that drift outside the standard range.

Selection size relative to n

When k is close to n, the symmetry property keeps the computation cheap, and the resulting C(n, k) will equal the count you would have gotten from the smaller equivalent selection.

Magnitude of n

Above n ≈ 25, binomial coefficients grow into double-digit digits and quickly into hundreds of digits. The calculator keeps precision but switches to scientific notation past fifteen digits so the display stays readable.

Whether order matters

If you actually care about ordered arrangements, divide P(n, k) by C(n, k) to recover k! and decide which output answers your question.

Negative or non-integer inputs

The calculator clamps invalid ranges to safe defaults and warns when k is greater than n, matching the combinatorial convention that C(n, k) = 0 for k > n.

  • The tool reports counts only; it does not assume a probability p, so it cannot return binomial probabilities directly — multiply by p^k (1 − p)^(n − k) afterwards.
  • Inputs above n = 170 may exceed display limits because even the factorial itself grows faster than doubles, although intermediate BigInt math still returns the exact integer when it fits in memory.

According to NIST Digital Library of Mathematical Functions, the binomial coefficient counts unordered selections of k items from n distinct items

For a wider counting view across all selection sizes, use the Subset Calculator to enumerate every subset at once.

Binomial coefficient calculator showing C(n, k) input form, the n! / (k! × (n-k)!) formula, and the computed result alongside the matching permutation P(n, k).
Binomial coefficient calculator showing C(n, k) input form, the n! / (k! × (n-k)!) formula, and the computed result alongside the matching permutation P(n, k).

Frequently Asked Questions

Q: What is a binomial coefficient?

A: A binomial coefficient, written C(n, k) or nCk, is the number of ways to choose k items from n distinct items without repetition and without regard to order. It is the central count behind Pascal's triangle, lotteries, and the binomial probability distribution.

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

A: Use the formula C(n, k) = n! / (k! (n-k)!). Compute n!, then divide by k! and by (n-k)!. For example, C(8, 3) = 8! / (3! × 5!) = 40,320 / (6 × 120) = 56.

Q: What is the relationship between binomial coefficients and Pascal's triangle?

A: Pascal's triangle is built from binomial coefficients: each interior entry equals the sum of the two entries directly above it, which reflects the identity C(n, k) = C(n-1, k-1) + C(n-1, k). Rows are indexed from n = 0.

Q: What happens when k is greater than n?

A: When k > n, C(n, k) = 0 because you cannot choose more items than exist. The calculator returns 0 for this case, matching the combinatorial convention used in binomial distributions.

Q: How does a binomial coefficient differ from a permutation?

A: A binomial coefficient C(n, k) counts unordered selections, while a permutation P(n, k) counts ordered arrangements. They are related by P(n, k) = C(n, k) × k!, so the permutation is always the larger value.

Q: Why are binomial coefficients important in probability?

A: Binomial coefficients weight the binomial distribution: P(X = k) = C(n, k) p^k (1-p)^(n-k). They also appear in the binomial theorem, which expands (a + b)^n into a sum of terms with these coefficients.