Algebra • Combinatorics & Discrete Mathematics

Binomial Coefficient Calculator

Calculate combinations C(n, k) = n! / (k!(n − k)!), factorial cancellations, complete binomial theorem expansions, and Pascal's Triangle rows with verified step-by-step arithmetic.

|
Last Updated: September 2026
|
Applied Mathematics & Combinatorics Verified
Quick Combinatorics Presets Click to load test parameters

Combinatorics Parameters

Non-negative integer (n ≥ 0)

Subset size (0 ≤ k ≤ n)

Primary Result
Binomial Coefficient C(n, k):
56
C(8, 3) = 8! / (3! × 5!) = 56
Symmetric C(n, n-k) C(8, 5) = 56
Permutations P(n, k) 336
Row Sum (2ⁿ) 256
Subset Odds 21.88%

Mathematical Step-by-Step Derivation

Pascal's Triangle Row & Expansion

Visual Representation
Direct Answer & Overview
Verified Educational Guide

Binomial Coefficient: n Choose k

A binomial coefficient, denoted C(n, k) or (n choose k), represents the total number of distinct ways to choose an unordered subset of k elements from a set of n unique items. It also yields the algebraic coefficient of the aⁿ⁻ᵏbᵏ term in the polynomial expansion of (a + b)ⁿ.

Primary Mathematical Formula Universal Combinatorial Factorial Quotient
Standard Equation
ƒ(x)
Q.E.D.
(nk)=C(n,k)=n!k!(n−k)!\binom{n}{k} = C(n, k) = \frac{n!}{k!(n - k)!}
Where n! represents the factorial product n × (n - 1) × ... × 1, with 0! = 1 by mathematical definition.
Exact Formula
Input Parameters
Required
1
Total Items (n): Total number of distinct elements in the master set (n ≥ 0)
2
Chosen Items (k): Subset count to select without regard to order (0 ≤ k ≤ n)
3
Boundary Conditions: C(n, 0) = 1 and C(n, n) = 1 for any non-negative integer n
Expected Outputs
Calculated
Combinations Count: Total unordered subsets C(n, k)
Symmetric Value: C(n, n − k) identical reflection count
Permutations P(n, k): Total ordered arrangements n! / (n − k)!
Row Sum (2ⁿ): Total possible subsets across all possible values of k from 0 to n
Worked Numerical Example
Instant Verification
Calculate the number of 5-card poker hands that can be dealt from a standard 52-card deck: C(52, 5).
→ C(52, 5) = 52! / (5! × 47!) = (52 × 51 × 50 × 49 × 48) / (5 × 4 × 3 × 2 × 1) = 311,875,200 / 120 = 2,598,960.
C(52, 5) = 2,598,960 unique 5-card hands

What Is a Binomial Coefficient?

The binomial coefficient, expressed notationally as C(n, k), ⁿCₖ, or "n choose k", is one of the most pervasive concepts in discrete mathematics, probability theory, and combinatorics. It answers a fundamental question:

"How many distinct subsets of k elements can be selected from a set of n elements when the order of selection does not matter?"

The term "binomial" originates from elementary algebra: when raising a two-term polynomial (a binomial like a + b) to an integer power n, the numerical coefficients multiplying each term aⁿ⁻ᵏbᵏ are the exact values generated by C(n, k).

The Factorial Cancellation Formula

Computing factorials directly for large numbers leads to astronomical values that exceed hardware integer limits (for example, 52! ≈ 8.06 × 10⁶⁷). In practice, mathematicians utilize factorial cancellation:

C(n, k) = [ n × (n − 1) × ... × (n − k + 1) ] / [ k × (k − 1) × ... × 1 ]

By canceling (n − k)! out of n!, the numerator simplifies to the product of exactly k descending integers, divided by k!.

Furthermore, because of the symmetry property C(n, k) = C(n, n − k), you can always replace k with min(k, n − k) to minimize the count of multiplication steps.

Step-by-Step Worked Examples

Example 1: Small Group Selection — C(8, 3)

Calculate the number of ways to pick a 3-person project team from 8 candidates:

Step 1: Set up formula: C(8, 3) = 8! / [3! × (8 − 3)!] = 8! / [3! × 5!]

Step 2: Cancel 5!: (8 × 7 × 6) / (3 × 2 × 1)

Step 3: Simplify: 336 / 6 = 56

Conclusion: There are 56 distinct possible teams.

Example 2: Card Gaming Combinatorics — C(52, 5)

Find the total number of distinct 5-card poker hands dealt from a standard 52-card deck:

Step 1: C(52, 5) = 52! / [5! × 47!]

Step 2: Cancel 47!: (52 × 51 × 50 × 49 × 48) / (5 × 4 × 3 × 2 × 1)

Step 3: Evaluate: 311,875,200 / 120 = 2,598,960

The total combination pool against which all poker hand probabilities are evaluated.

The Binomial Theorem: Expanding (a + b)ⁿ

The Binomial Theorem states that for any real or complex variables $a$ and $b$ and any non-negative integer $n$:

(a + b)ⁿ = ∑ [ C(n, k) × aⁿ⁻ᵏ × bᵏ ]   for k = 0 to n

For example, setting $n = 4$:

(a + b)⁴ = C(4, 0)a⁴ + C(4, 1)a³b + C(4, 2)a²b² + C(4, 3)ab³ + C(4, 4)b⁴
= 1a⁴ + 4a³b + 6a²b² + 4ab³ + 1b⁴

The coefficients 1, 4, 6, 4, 1 are exactly the numbers in row 4 of Pascal's Triangle.

Pascal's Triangle & Recurrence Relations

Pascal's Triangle is a triangular array where the k-th entry of row n corresponds to C(n, k). It is governed by Pascal's Identity:

C(n, k) = C(n − 1, k − 1) + C(n − 1, k)

Combinatorial Proof: Consider choosing $k$ students from a group of $n$ students that includes Alice. There are two mutually exclusive scenarios:

  • Scenario A (Alice is chosen): You must pick the remaining $k - 1$ students from the other $n - 1$ candidates → $C(n - 1, k - 1)$ ways.
  • Scenario B (Alice is NOT chosen): You must pick all $k$ students from the other $n - 1$ candidates → $C(n - 1, k)$ ways.

Summing both scenarios proves the identity naturally without requiring any algebra.

Key Mathematical Identities & Symmetries

1. Reflection Symmetry
C(n, k) = C(n, n − k)

Choosing which k items to include is identical to choosing which n − k items to exclude.

2. Sum of Row Entries
∑ C(n, k) = 2ⁿ

Summing row n yields the total number of all possible subsets (the power set size) of an n-element set.

3. Alternating Sum
∑ (-1)ᵏ C(n, k) = 0

For any n > 0, the sum of even-indexed coefficients equals the sum of odd-indexed coefficients.

4. Hockey-Stick Identity
∑ C(i, r) [for i=r to n] = C(n + 1, r + 1)

Summing along a diagonal in Pascal's Triangle produces the value immediately diagonally below it.

Combinations vs. Permutations: Order Analysis

The defining difference between permutations and combinations is whether the sequential ordering of selected elements constitutes a distinct outcome:

Property Combinations C(n, k) Permutations P(n, k)
Does Order Matter? NO YES
Mathematical Formula n! / [k! × (n − k)!] n! / (n − k)!
Typical Examples Committee selection, card hands, pizza toppings PIN codes, race podium finishes, anagrams
Numerical Relationship P(n, k) = k! × C(n, k)

Common Combinatorial Calculation Mistakes

1. Confusing Permutations with Combinations

If a problem asks for ways to select a 4-person committee with no distinct roles, using $P(n, k)$ artificially inflates the count by $4! = 24$ times because it treats permutations of the same group as different outcomes.

2. Attempting to Compute Full Large Factorials Directly

Calculating $50!$ directly causes numerical overflow in standard 64-bit IEEE-754 floating point arithmetic. Always cancel common factorial factors prior to multiplying.

3. Assuming C(n, 0) = 0

A common misconception is thinking there are 0 ways to pick 0 items. In set theory, there is exactly 1 way to select no items: choosing the empty set $\emptyset$. Hence $C(n, 0) = 1$.

Real-World Applications in Probability & Data

Binomial coefficients provide the mathematical backbone for quantitative modeling across multiple technical disciplines:

Binomial Probability Distribution

Calculates the probability of observing exactly k successes in n independent Bernoulli trials: P(X = k) = C(n, k) × pᵏ(1 − p)ⁿ⁻ᵏ.

Mendelian Genetics

Predicting phenotypic allele ratios and genotype distributions across multiple offspring generations uses binomial expansions.

Cryptography & Hashing

Evaluating hash collision vulnerabilities (Birthday Paradox) and key-space entropy requires combinatorial subset counting.

Fact-Checked & Verified • Computational Accuracy Standards
Updated September 2026 • Editorial Policy
Authored By
Sanjay Samanta

Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.

Reviewed & Verified By
Academic Review Board

Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.

Found an error or have an improvement suggestion? Report a calculation issue

Frequently Asked Questions

What is a binomial coefficient?
A binomial coefficient, written as C(n, k) or (n choose k), is the number of ways to choose k unordered items from a total set of n distinct items. In algebra, it is also the coefficient of the x^(n-k) y^k term when expanding the binomial power (x + y)^n.
What is the formula for n choose k?
The universal formula is C(n, k) = n! / [k! × (n − k)!], where "!" denotes the factorial operation (multiplying all positive integers down to 1). For example, C(5, 2) = 5! / (2! × 3!) = 120 / (2 × 6) = 10.
What is the symmetry property of binomial coefficients?
Binomial coefficients are symmetric: C(n, k) = C(n, n − k). Choosing k items to include in a group is mathematically equivalent to choosing the n − k items to leave behind. For example, C(10, 3) = C(10, 7) = 120.
What is the difference between combinations and permutations?
In combinations C(n, k), the order of selection does not matter (e.g. selecting a 3-person committee). In permutations P(n, k), the order of selection matters (e.g. assigning President, Vice-President, and Secretary). Consequently, P(n, k) = k! × C(n, k).
How do binomial coefficients relate to Pascal's Triangle?
The numbers in row n of Pascal's Triangle are the exact sequence of binomial coefficients C(n, 0), C(n, 1), C(n, 2), ..., C(n, n). Each interior number is the sum of the two numbers immediately above it: C(n, k) = C(n − 1, k − 1) + C(n − 1, k).
Why does 0! equal 1 in the binomial coefficient formula?
By mathematical convention, the empty product equals 1, so 0! = 1. This ensures that boundary cases like C(n, 0) = n! / (0! × n!) = 1 and C(n, n) = n! / (n! × 0!) = 1 evaluate correctly, representing the unique single way to choose either no items or all items.