Binomial Coefficient Calculator

Binomial coefficient C(n, k)—
Permutations P(n, k)—

How Binomial Coefficient Calculator is calculated: C(n, k) = n! ÷ (k! × (n − k)!) = P(n, k) ÷ k!; C(n, k) = C(n, n − k)

What is a binomial coefficient?

A binomial coefficient, written C(n, k) or “n choose k”, counts the ways to choose k items out of n when the order does not matter. C(5, 2) is 10: there are ten ways to pick two items out of five. It is the same number a combination calculator gives, but the binomial coefficient is also the number that appears in the expansion of (x + y)ⁿ, in Pascal's triangle, and in the binomial distribution — which is why it has its own name and its own calculator.

The name comes from the binomial theorem. Expand (x + y)⁵ and the coefficient of x³y² is C(5, 2) = 10, because there are ten ways to choose which two of the five factors contribute a y. The same number counts committees, card hands and lottery tickets. One number, many jobs — that is why the binomial coefficient is one of the most used counts in all of mathematics.

This calculator takes n and k and returns C(n, k) and P(n, k) instantly, with the results updating live as you type. The maths runs entirely in your browser — nothing is uploaded and nothing is stored. It is built for students meeting the binomial theorem for the first time, and for anyone who needs a quick “n choose k” while working on probability or algebra.

The binomial coefficient formula

The formula is C(n, k) = n! ÷ (k! × (n − k)!). For n = 5 and k = 2, that is 5! ÷ (2! × 3!) = 120 ÷ (2 × 6) = 120 ÷ 12 = 10. The factorials cancel heavily, so the practical shortcut is to compute the permutation count first — 5 × 4 = 20 — and divide by k! = 2, giving 10. The calculator does exactly that, by iterative multiplication, so the answer stays exact.

The coefficient is symmetric: C(n, k) equals C(n, n − k). C(10, 5) is 252, and so is C(10, 5) read the other way — C(10, 5) is its own mirror, since 5 is half of 10. C(10, 0) is 1 and C(10, 10) is 1: there is exactly one way to choose nothing and exactly one way to choose everything. C(10, 1) is 10, since there are ten choices for a single item.

The largest coefficient for a given n sits in the middle. For n = 10, the coefficients run 1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1 — rising to 252 at k = 5 and falling back symmetrically. That middle peak is the reason the binomial distribution is bell-shaped: the middle outcomes have the most combinations behind them. A factorial calculator is handy for checking the factorial parts of the formula by hand.

Pascal's triangle and the binomial coefficient

Pascal's triangle is the table of binomial coefficients, and it is the fastest way to see them all at once. Each row starts and ends with 1, and every other number is the sum of the two numbers above it. Row 5 reads 1, 5, 10, 10, 5, 1 — and the 10s in that row are C(5, 2) and C(5, 3), the same 10 this calculator returns for n = 5, k = 2.

The triangle is more than a pretty pattern: it is the addition rule for binomial coefficients, C(n, k) = C(n−1, k−1) + C(n−1, k). That rule is how you build the next row from the one above, and it is also the key step in proving the binomial theorem by induction. If you need a whole row of coefficients at once, writing out the triangle is faster than computing each one separately.

The triangle also shows the symmetry at a glance — every row reads the same forwards and backwards — and it shows why the middle numbers are the biggest. For n = 10, row 10 reads 1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1, and the 252 in the middle is the largest binomial coefficient for that row. That peak is the same peak you see in the binomial distribution, which a probability calculator can turn into chances.

A worked example: C(5, 2) = 10 and C(10, 5) = 252

Take the default example on this page: n = 5, k = 2. The permutation count is 5 × 4 = 20. Divide by k! = 2! = 2, and the binomial coefficient is 20 ÷ 2 = 10. You can list all ten pairs from A, B, C, D and E: AB, AC, AD, AE, BC, BD, BE, CD, CE and DE. Ten pairs, no more, and the calculator agrees.

Now the edge case: n = 10, k = 0. Choosing nothing out of ten can be done in exactly one way, so C(10, 0) = 1. The formula agrees: 10! ÷ (0! × 10!) = 1, because 0! is defined as 1. The permutation count P(10, 0) is also 1, for the same reason — there is one way to arrange nothing.

Now the middle case: n = 10, k = 5. The permutation count is 10 × 9 × 8 × 7 × 6 = 30,240. Divide by 5! = 120, and C(10, 5) = 252. That is the largest binomial coefficient for n = 10, and it is the number of ways to split ten items into two groups of five — or the number of ways to get exactly five heads in ten coin tosses, which is the most likely single outcome.

Where binomial coefficients do real work

In probability, the binomial coefficient counts the favourable outcomes. The chance of exactly 5 heads in 10 coin tosses is C(10, 5) ÷ 2¹⁰ = 252 ÷ 1,024, which is about 24.6%. The 252 counts the sequences with five heads; the 1,024 counts all sequences. Without the coefficient, the probability cannot be computed at all — it is the heart of the binomial distribution.

In algebra, the coefficients are the numbers in the expansion of (x + y)ⁿ. (x + y)⁵ expands to x⁵ + 5x⁴y + 10x³y² + 10x²y³ + 5xy⁴ + y⁵, and the 5s and 10s are C(5, 1), C(5, 2), C(5, 3) and C(5, 4). Anyone expanding a binomial by hand reads the coefficients straight off Pascal's triangle instead of computing factorials.

In computing, binomial coefficients count subsets, paths and combinations of choices. The number of ways to choose k features out of n in a machine-learning model, the number of paths through a grid that move right k times and up n − k times, and the number of subsets of a set are all binomial coefficients. An average calculator can summarise the results of an experiment, but the coefficient is what counts the possibilities before the experiment runs.

Binomial coefficient vs permutation — which one do you need?

The two counts answer different questions, and this calculator shows both so you can compare them. C(n, k) counts groups where order does not matter; P(n, k) counts arrangements where it does. For n = 5, k = 2, the answers are 10 and 20. The ratio is always k! — here 2 — because each pair can be ordered in two ways.

Use the binomial coefficient when the result is a set: a committee, a hand of cards, the number of heads in ten tosses, the terms of a binomial expansion. Use the permutation when the result is a sequence: a ranking, a password, the order of the tosses themselves. The test is the same as ever: swap two chosen items. If nothing changed, it is a combination; if the outcome changed, it is a permutation.

The two formulas are linked by one division: C(n, k) = P(n, k) ÷ k!. If you can compute the permutation count — start at n and multiply k numbers counting down — then dividing by k! gives the binomial coefficient. That is the whole relationship, and it is why the calculator shows both rows: the permutation count is the stepping stone to the coefficient, and seeing both makes the link obvious.

Common binomial coefficient mistakes

The first mistake is using the permutation count as the coefficient. P(5, 2) is 20, not 10 — the 20 counts each pair twice, once in each order. Forgetting to divide by k! overcounts by exactly k!, which is a factor of 2 for k = 2, 6 for k = 3, and 120 for k = 5. Always divide.

The second mistake is the symmetry trap: thinking C(n, k) changes when k passes half of n. It does not — C(10, 8) equals C(10, 2), which is 45, because choosing 8 to keep is the same as choosing 2 to leave out. If your answer for a large k looks enormous, recompute with n − k and check.

The third mistake is computing the factorials separately. 10! is 3,628,800, which is manageable, but 100! is about 9.3 × 10¹⁵⁷, far beyond what a basic calculator displays exactly. Cancel first: C(10, 5) is 10 × 9 × 8 × 7 × 6 ÷ 120 = 252, a calculation that fits anywhere. This calculator multiplies iteratively for the same reason.

The fourth mistake is forgetting that 0! is 1. Without that definition, C(n, 0) would divide by zero and the formula would break — yet there is clearly one way to choose nothing. The definition 0! = 1 is what makes the formula work at the edges, and it is why C(10, 0) = 1 and C(10, 10) = 1.

How to use this binomial coefficient calculator

Type n, the total number of items, and k, how many you choose. Both must be whole numbers, with k no larger than n and n no larger than 170. The binomial coefficient and the permutation count update live as you type, so you can watch the coefficient rise to its peak in the middle and fall back symmetrically.

Read the main result first: C(n, k), the number of groups. The second row shows P(n, k), the number of ordered arrangements, so you can confirm which one your question asks for. If a row shows a dash, the inputs are out of range — usually k is larger than n — so adjust them and the results will appear.

Everything runs in your browser. No account, no sign-up, no data sent anywhere. Use it to check binomial expansions, to count committees and card hands, or to work out the favourable outcomes for a probability question. If you want to turn a count into a chance, a percentage calculator can express it as a share of all possibilities, and the formula is shown on this page so you can check the result by hand.

Frequently Asked Questions

C(5, 2) = 10. The permutation count is 5 × 4 = 20, and dividing by 2! = 2 gives 10. The ten pairs from A, B, C, D and E are AB, AC, AD, AE, BC, BD, BE, CD, CE and DE.

C(10, 5) = 252. The permutation count is 10 × 9 × 8 × 7 × 6 = 30,240, and dividing by 5! = 120 gives 252. It is the largest binomial coefficient for n = 10, sitting in the middle of Pascal's row.

Yes — C(n, k) = C(n, n − k). Choosing 8 items out of 10 to keep is the same as choosing 2 to leave out, so C(10, 8) = C(10, 2) = 45. The calculator uses the smaller of k and n − k to keep the arithmetic exact.

The coefficient of x³y² in the expansion of (x + y)⁵ is C(5, 2) = 10, because there are ten ways to choose which two of the five factors contribute a y. The full expansion is x⁵ + 5x⁴y + 10x³y² + 10x²y³ + 5xy⁴ + y⁵.

More free tools

More calculators and utilities from Sortrun — free, no sign-up.