How to use the binomial coefficient calculator
The binomial coefficient C(n, k) counts the ways to choose k items from n, and it is also the coefficient of the xⁿ⁻ᵏyᵏ term when (x + y)ⁿ is expanded. Enter n and k to see the value together with that term, its position in Pascal triangle, and two independent checks.
How it is computed matters. Evaluating n! ÷ (k!(n−k)!) directly fails from 21! onward, where ordinary floating point numbers can no longer hold the exact integer. This calculator therefore never computes a factorial directly: it applies C(n, k) = C(n, k−1) × (n−k+1) ÷ k step by step in exact BigInt arithmetic. Every intermediate value is a whole number, so no rounding error creeps into the divisions.
Two checks are shown. The first is symmetry: choosing k items to take is the same as choosing n−k to leave, so C(n, k) = C(n, n−k). The second is the Pascal recurrence, where the two entries above sum to this one: C(n−1, k−1) + C(n−1, k) = C(n, k). The result states whether the sum matches.
If k exceeds n there are not enough items, so the coefficient is 0 and a note replaces the symmetry and recurrence rows. When k is 0 or equal to n the value is 1. The supported range is n ≤ 1000, so a value such as C(1000, 500) with nearly 300 digits still prints exactly, with scientific notation added above 16 digits.
Frequently asked questions
The values are identical. The number of combinations C(n, k) is exactly the coefficient of the xⁿ⁻ᵏyᵏ term in the expansion of (x+y)ⁿ.
From 21! onward ordinary floating point numbers cannot hold the exact integer, so the answer drifts. Sequential multiplication with BigInt keeps intermediate values smaller and the result exact.
There are not enough items to choose, so the coefficient is 0. The tool shows 0 and explains why.