🏆 US-Registered Digital Marketing Agency Trusted by 200+ brands · USA · UK · Canada · AUS
Advertisement
Advertisement
ALGEBRA

Binomial Coefficient Calculator — n choose k, exactly

Compute C(n, k) with exact whole-number arithmetic, plus permutations, the symmetry check and the Pascal's triangle row it comes from.

Both must be whole numbers with 0 ≤ k ≤ n. Order does not matter for C(n, k) — that is what separates it from a permutation.
C(n, k) — n choose k
0
 
0
Permutations P(n, k)
0
C(n, n − k)
0
Row sum 2n
0
Share of the row
Working:
 
Advertisement

The binomial coefficient calculator above computes C(n, k) — read as "n choose k" — the number of ways to select k items from n when the order of selection does not matter. It uses exact integer arithmetic rather than floating-point factorials, so the answer is a whole number even for values where n! would overflow an ordinary numeric type.

Arb Digital built this alongside the rest of its free maths tools. If you need the factorials themselves rather than the combination, the factorial calculator handles those directly; this page is about the ratio of factorials that counts selections.

What This Binomial Coefficient Calculator Does

Enter n and k. The calculator returns C(n, k), the corresponding number of permutations P(n, k) where order does matter, the symmetric coefficient C(n, n − k), the sum of the entire Pascal's triangle row (which is always 2n), and this coefficient's share of that row. The working panel prints the multiplicative formula with your numbers substituted, term by term.

Results are computed with arbitrary-precision integers, so C(100, 50) comes back as its exact 30-digit value rather than a rounded approximation. That matters because binomial coefficients grow explosively: the largest coefficient in row 100 has thirty digits, and a double-precision float loses exactness long before that.

How to Use It

  1. Set n to the total number of distinct items available to choose from.
  2. Set k to how many you are selecting. It must be a whole number between 0 and n.
  3. Press Calculate. The combination, the permutation count and the Pascal's row figures all update together.
  4. Check the working panel to see the multiplicative formula expanded with your values.
  5. Compare C and P to see exactly how much the ordering assumption changes the count.

The Formula and Why the Factorial Version Is the Wrong One to Use

The textbook definition is C(n, k) = n! / (k! × (n − k)!). It is correct, and it is a poor way to actually compute anything. For n = 100 the numerator has 158 digits, and every one of them cancels away again — an enormous amount of arithmetic to produce a comparatively small answer.

The multiplicative form does the cancellation first: C(n, k) = (n × (n−1) × … × (n−k+1)) / (1 × 2 × … × k), with exactly k factors on top and k on the bottom. Better still, the running product stays an exact integer at every stage if you multiply then divide in the right order, because the product of any j consecutive integers is always divisible by j!. This calculator uses that method, which is why it stays exact where a factorial-based one would not. The identities are set out in the Wolfram MathWorld entry on the binomial coefficient.

Advertisement

A Fully Worked Example

How many three-person committees can be formed from ten people? That is C(10, 3).

Using the multiplicative form, the numerator has three factors counting down from 10: 10 × 9 × 8 = 720. The denominator is 3! = 3 × 2 × 1 = 6. So C(10, 3) = 720 ÷ 6 = 120.

The denominator is the interesting part. There are 720 ways to pick three people in order — that is the permutation count P(10, 3). But a committee of Alice, Bob and Carol is the same committee however you list them, and there are 3! = 6 orderings of any three people. Dividing by 6 collapses those six equivalent orderings into one, giving 120 distinct committees.

Two quick checks. Symmetry: C(10, 3) should equal C(10, 7), because choosing 3 to include is the same act as choosing 7 to exclude — and C(10, 7) = (10×9×8×7×6×5×4)/5040 = 604800/5040 = 120. Row sum: every coefficient in row 10 of Pascal's triangle adds to 210 = 1024, and 120 is one entry within that total.

Combinations vs. Permutations: The Distinction That Decides the Answer

P(n, k) = n!/(n − k)! counts ordered selections; C(n, k) divides that by k! to count unordered ones. The whole difference is whether rearranging your chosen items produces a genuinely different outcome.

Choosing three people for a committee: unordered, so use C. Choosing three people to be chair, secretary and treasurer: ordered, so use P. Choosing six lottery numbers: unordered, so C. Setting a three-digit code from ten digits without repetition: ordered, so P. The ratio between the two is always exactly k!, which is why P(10, 3) = 720 is precisely six times C(10, 3) = 120.

A third case catches people out: selection with repetition allowed. Choosing 3 scoops from 10 ice cream flavours, where you may repeat a flavour, is neither formula — it is C(n + k − 1, k) = C(12, 3) = 220. Deciding between these three counts is the actual difficulty in most combinatorics questions; the arithmetic afterwards is trivial.

Pascal's Triangle and the Recurrence

Every binomial coefficient is an entry in Pascal's triangle, where each number is the sum of the two directly above it. Formally, C(n, k) = C(n−1, k−1) + C(n−1, k), and this recurrence has a clean combinatorial reading. Pick any one specific item. Either it is in your selection, and you must choose the remaining k − 1 from the other n − 1 items; or it is not, and you must choose all k from those n − 1. Those two cases cannot overlap and cover everything, so the counts add.

Two other row properties are worth knowing. Each row sums to 2n, because choosing any subset of n items means making n independent in-or-out decisions. And the alternating sum of any row beyond the first is zero, which is the reason inclusion-exclusion arguments collapse so neatly. A fuller catalogue of these row identities, including the hockey-stick and Vandermonde relations, appears in the NIST Digital Library of Mathematical Functions, section 26.3 on binomial coefficients.

Where Binomial Coefficients Show Up

The binomial theorem is the original source: expanding (a + b)n produces terms whose coefficients are exactly C(n, k). The coefficient of a2b3 in (a + b)5 is C(5, 3) = 10, and you can read the entire expansion off row 5 of Pascal's triangle without multiplying anything out.

In probability, the binomial distribution uses C(n, k) to count the arrangements of k successes among n trials — the coefficient answers "in how many orders could those successes have arrived?", and the probability terms handle the rest. The same coefficients appear in the hypergeometric distribution used for sampling without replacement, and in counting lattice paths, where the number of routes across a grid using only right and up steps is a binomial coefficient. Our probability calculator covers the distribution side once you have the count.

Edge Cases That Are Not Errors

C(n, 0) = 1 for every n, including n = 0. There is exactly one way to choose nothing: take nothing. It looks like a technicality but it is what makes the binomial theorem's constant term work, and it is consistent with the convention that 0! = 1.

C(n, n) = 1 for the same reason, read from the other end. C(n, k) = 0 whenever k > n, because you cannot choose more items than exist — not an error, just an empty count. And the largest coefficient in any row sits in the middle, at k = n/2, which is why binomial distributions peak at the centre and why the middle of Pascal's triangle grows so much faster than its edges.

Want tools like this built for your own site?

Arb Digital builds fast, dependency-free interactive calculators designed to rank and to be worth linking to. Browse the free library or tell us what you need.

Browse Free Tools Talk To Us

Common Mistakes to Avoid

  • Using combinations where order matters. Ranked positions, sequences and codes need P(n, k), not C(n, k).
  • Computing full factorials first. n! overflows quickly and loses exactness; the multiplicative form avoids the problem entirely.
  • Allowing repetition without changing the formula. Selection with repetition uses C(n + k − 1, k), which is a different and larger count.
  • Treating C(n, 0) as zero. It is 1 — there is exactly one way to select nothing at all.
  • Using non-integer or negative inputs. The counting interpretation requires whole numbers with k between 0 and n.

Related Free Tools From Arb Digital

The factorial calculator gives you n! directly if a question needs it, and the probability calculator takes over once you have the count. The exponent calculator handles the 2n row sums, the percentage calculator converts a share of a row into a percentage, and the scientific notation converter is useful when coefficients get long. Browse the free online tools hub for everything else.

Frequently Asked Questions

What does n choose k mean?

It is the number of different ways to select k items from a set of n when the order of selection does not matter. It is written C of n and k, or as n above k in brackets.

What is the difference between a combination and a permutation?

A permutation counts ordered selections and a combination counts unordered ones. The permutation count is always exactly k factorial times larger, because that is how many orderings each selection has.

Why is C(n, 0) equal to one?

There is exactly one way to choose nothing from a set, namely to take nothing at all. This also keeps the binomial theorem and the convention that zero factorial equals one consistent.

Why does C(n, k) equal C(n, n minus k)?

Choosing which k items to include is the same decision as choosing which n minus k items to leave out, so the two counts must be identical. This is why Pascal's triangle is symmetric.

How do I count selections when repetition is allowed?

Use C of n plus k minus one, choose k. That formula counts multisets, which is a larger total than ordinary combinations because items may be picked more than once.

Why not just compute the factorials?

Factorials grow far faster than the coefficient itself and lose exactness in ordinary arithmetic. The multiplicative form cancels the common factors as it goes, keeping every intermediate value a whole number.

What is the connection to Pascal's triangle?

Each entry in the triangle is a binomial coefficient, and each is the sum of the two entries above it. Every row also sums to two raised to the row number.

This calculator is provided for study and reference. Combination counts describe possibilities only and say nothing about how likely any particular outcome is.

Advertisement
Advertisement

Take it further

Arb Digital assistant

👋 Hey! Want to grow your business? Ask me anything — a free marketing proposal is on the table!