The Binomial Coefficient Explained: "n Choose k", Pascal's Triangle and When to Use It
The binomial coefficient C(n, k) counts how many ways you can choose k items from n when order does not matter. This guide derives the formula, walks a committee-to-lottery worked example, lays out Pascal's triangle and the identities worth knowing, and untangles the combinations-with-repetition trap that catches most people.
What "n choose k" actually counts
A binomial coefficient answers one very specific question: how many different ways can you pick k things out of n when the order you pick them in does not matter? Written C(n, k) and read aloud as "n choose k", it is the workhorse of combinatorics — the branch of maths concerned with counting arrangements without listing them one by one. Choose 6 lottery numbers from 49, deal 5 cards from a deck of 52, pick a 3-person committee from a team of 10: each is an "n choose k" count, and each has an exact whole-number answer.
The binomial coefficient calculator gives you that number for any n and k up to 1,000, holds it as an exact integer no matter how many digits it runs to, and shows the companion permutation count alongside. This guide is about the ideas behind the number — where the formula comes from, the handful of identities worth memorising, the counting problems it solves, and the one variation (choosing with repetition) that trips up almost everyone the first time. The arithmetic is primary-school simple. Knowing which count you actually want is the hard part.
How the binomial coefficient is calculated
The textbook definition is a ratio of three factorials:
C(n, k) = n! / (k! · (n − k)!)
A factorial like 6! means 6 × 5 × 4 × 3 × 2 × 1 = 720 — the number of ways to arrange 6 distinct things in a row. The formula is really a two-step argument. First count the ordered selections: there are n choices for the first item, n − 1 for the second, and so on for k picks, giving n! / (n − k)! ordered lists (this is the permutation count, P(n, k)). But every unordered selection of k items has been counted k! times over — once for each way of shuffling those same k items. Divide by k! to collapse the duplicates, and you have C(n, k). That single division is the whole difference between a combination and a permutation.
In practice nobody computes three giant factorials and divides — 1000! has over 2,500 digits and would overflow long before the division rescues it. The efficient route is the multiplicative form, C(n, k) = (n × (n − 1) × … × (n − k + 1)) / (k × (k − 1) × … × 1), building the answer one factor at a time so the running total stays an exact integer at every step. Two shortcuts make it fast. Symmetry says C(n, k) = C(n, n − k) — choosing which 6 people join a 15-person squad is the same decision as choosing which 9 to leave out, so C(15, 6) = C(15, 9) = 5,005 — which lets the calculator iterate over the smaller of k and n − k. And because C(n, k) can be a colossal number (C(100, 50) is a 30-digit integer), the binomial coefficient calculator keeps every value in arbitrary-precision integer form rather than the floating-point numbers that lose accuracy past about 15 digits.
Worked example: from a committee to the lottery
Start small. How many 3-person committees can you form from a team of 10? Plug n = 10, k = 3 into the binomial coefficient calculator and it returns C(10, 3) = 120. By hand: the numerator is 10 × 9 × 8 = 720 ordered picks, and you divide by 3! = 6 because the committee {Ann, Bob, Cara} is the same three people in any order. 720 / 6 = 120. Notice the breakdown on the calculator shows P(10, 3) = 720 as well — that is the answer to the different question "how many ways to pick a president, a secretary and a treasurer", where the three roles make order matter.
Now scale it up to the classic example: the 6-from-49 lottery. The number of possible tickets is
C(49, 6) = (49 × 48 × 47 × 46 × 45 × 44) / (6 × 5 × 4 × 3 × 2 × 1)
The numerator multiplies out to 10,068,347,520 and the denominator is 720, so C(49, 6) = 13,983,816. There are just under 14 million equally likely combinations, which is exactly why a single ticket's chance of matching all six balls is 1 in 13,983,816. The count is the odds. Change the rules to 6-from-59 and the count jumps to 45,057,474 — more than triple the tickets, a third of the winning chance — which is how lottery operators quietly lengthen the odds without touching the headline "pick 6" format.
Pascal's triangle and the identities worth knowing
Write the binomial coefficients out in a triangle — row n holding C(n, 0), C(n, 1), up to C(n, n) — and you get Pascal's triangle, one of the most reused objects in maths:
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
Every interior entry is the sum of the two directly above it. That is Pascal's rule: C(n, k) = C(n − 1, k − 1) + C(n − 1, k). It has a plain-English reading. To choose k items from n, either you include a particular item — then you need k − 1 more from the remaining n − 1 — or you exclude it, and you need all k from the other n − 1. Add the two disjoint cases and you have every possibility, exactly once.
Three more identities pay for themselves constantly. Symmetry, C(n, k) = C(n, n − k), you have already met — it is why the triangle reads the same left-to-right as right-to-left. The row sum adds every entry in row n to 2ⁿ: the total number of subsets of an n-item set is 2ⁿ because each item is independently either in or out, and grouping those subsets by size is exactly the row of coefficients. And the hockey-stick identity sums a diagonal: C(2, 2) + C(3, 2) + C(4, 2) + C(5, 2) = 1 + 3 + 6 + 10 = 20 = C(6, 3). The name comes from the shape the terms trace on the triangle — a straight diagonal that hooks at the answer.
The coefficients earn their name from the binomial theorem: expand (a + b)ⁿ and the number in front of each aᵏbⁿ⁻ᵏ term is C(n, k). So (a + b)⁵ = a⁵ + 5a⁴b + 10a³b² + 10a²b³ + 5ab⁴ + b⁵ — the coefficients 1, 5, 10, 10, 5, 1 are simply row 5 of Pascal's triangle. That is not a coincidence: each term is built by choosing, for k of the five brackets, to take the a, and there are C(5, k) ways to make that choice. If you also need to raise those base values to powers by hand, the exponent calculator handles the aᵏ and bⁿ⁻ᵏ pieces.
Where n choose k shows up
Card game odds. A poker hand is 5 cards from 52, so there are C(52, 5) = 2,598,960 distinct hands. Want the probability of being dealt a flush (five cards of one suit)? Count the flush hands: 4 suits, each offering C(13, 5) = 1,287 five-card selections, for 4 × 1,287 = 5,148 hands. Divide by the 2,598,960 total and a flush turns up about once every 505 deals (0.198%). Every "odds of" figure in a card game is one binomial coefficient over another.
Counting subsets and menus. A pizzeria with 8 toppings can build 2⁸ = 256 different pizzas (each topping in or out) — and if you specifically want a 3-topping pizza, that is C(8, 3) = 56 of them. The factor calculator deals with the divisor side of counting problems; the binomial coefficient handles the selection side.
The handshake problem. If 20 people at a meeting each shake hands once with everyone else, how many handshakes happen? A handshake is an unordered pair of people, so the answer is C(20, 2) = 190. The general formula C(n, 2) = n(n − 1)/2 counts edges in a network, matches in a round-robin tournament, or pairwise comparisons in a survey — anywhere "every one with every other" appears.
Sampling and statistics. The binomial coefficient is the counting factor buried inside the binomial distribution: the probability of exactly k successes in n trials is C(n, k) · pᵏ · (1 − p)ⁿ⁻ᵏ, where C(n, k) counts how many orderings of successes and failures give that total. It is why quality-control sampling plans, A/B tests, and clinical trial response counts all trace back to a row of Pascal's triangle. For the spread of those counts, the standard deviation calculator does the follow-on arithmetic.
The trap: choosing with repetition
The plain binomial coefficient assumes you pick k distinct items, each at most once. A surprising number of real problems let you repeat — and using C(n, k) on them silently undercounts.
Say an ice-cream shop has 5 flavours and you want a 3-scoop cup, where scoops can repeat (three scoops of vanilla is allowed) and order does not matter. This isnot C(5, 3) = 10. The right count is combinations with repetition, given by C(n + k − 1, k) = C(5 + 3 − 1, 3) = C(7, 3) = 35. The trick behind the formula — known as "stars and bars" — is to picture 3 scoops as 3 stars and use 4 bars to divide them among the 5 flavours; arranging 3 stars and 4 bars in a row is a choose-3-of-7 problem. The moment your selection can reuse an option — dice faces, coin denominations, repeated survey answers — reach for C(n + k − 1, k), not C(n, k).
Common mistakes
Using a permutation when order does not matter. The single most common slip is computing n × (n − 1) × … and forgetting to divide by k!. That gives the lottery 10,068,347,520 "tickets" instead of 13,983,816 — off by a factor of 720. If the things you pick have no labels or ranking, you want a combination.
Forgetting repetition is allowed (or isn't). Combinations, combinations with repetition, and permutations are three different counts, and picking the wrong one is an order-of-magnitude error, not a rounding error. Ask two questions before you compute: does order matter, and can items repeat? Your answers pick the formula.
Double-counting overlapping cases. When a problem splits into cases ("at least two aces" = exactly two + exactly three + exactly four), the cases must be mutually exclusive before you add their counts. Adding overlapping cases inflates the total; the fix is usually Pascal's rule or an inclusion–exclusion argument.
Treating "at least" as "exactly". "What are the odds of at least 3 heads in 5 flips?" is a sum of several binomial terms, not the single term C(5, 3). Point counts and cumulative counts answer different questions — the binomial distribution calculator keeps the two straight for you.
When you need more than a raw count
A binomial coefficient is exact and unambiguous, so there is rarely anything to "get wrong" once you have matched the problem to the right formula. The judgement calls live one level up. If you are turning a count into a probability, you also need to know the outcomes are equally likely — real lotteries and shuffled decks qualify, but "number of ways" is not a probability on its own. If your trials involve chance over many repetitions, move from the coefficient to the full binomial distribution. And if a serious decision — a pricing model, a safety margin, a published statistic — rests on the count, have someone check that the counting model itself (independent? ordered? repeatable?) matches reality, because that framing, not the arithmetic, is where combinatorics errors hide.
Frequently asked questions
How do I decide between combinations and permutations?
Ask one question: does the order of the chosen items change the answer? If rearranging your selection gives you something genuinely different — a race finishing order, a PIN, ranked medal positions — it is a permutation, P(n, k) = n! / (n − k)!. If rearranging gives the same thing — a committee, a hand of cards, a set of lottery numbers — it is a combination, C(n, k). A quick tell: if the roles or positions have names (first, second, president, gold), order matters; if the picked items form an unlabelled group, it does not.
How many possible combinations are there in a 6-from-49 lottery?
C(49, 6) = 13,983,816 — just under 14 million. That number is both the count of distinct tickets and the odds against any single ticket: 1 in 13,983,816. Formats with more numbers or a larger pool climb fast; a 6-from-59 draw has C(59, 6) = 45,057,474 combinations, so the same "pick 6" game becomes more than three times harder to win. Enter your own draw's numbers into the binomial coefficient calculator to see its exact odds.
What is a combination with repetition, and when do I use it?
Use it when the same option can be chosen more than once and order still does not matter — like 3 scoops from 5 flavours where a triple vanilla counts. The formula is C(n + k − 1, k). For the ice-cream example that is C(7, 3) = 35, versus only C(5, 3) = 10 if repeats were banned. Choosing distinct items uses the plain C(n, k); allowing repeats uses C(n + k − 1, k). Confusing the two is one of the most common counting errors.
What is Pascal's triangle used for?
It is a lookup table for binomial coefficients: the k-th entry in row n is C(n, k). Because each number is the sum of the two above it, you can extend it by hand with no multiplication at all, which makes it handy for small cases and for spotting patterns. It also encodes the coefficients of the binomial theorem (row n gives the expansion of (a + b)ⁿ), the Fibonacci numbers along its shallow diagonals, and the powers of 2 as its row sums.
How many subsets does a set of n items have?
Exactly 2ⁿ, because each of the n items is independently either in a given subset or out of it. That total is also the sum of one row of Pascal's triangle: C(n, 0) + C(n, 1) + … + C(n, n) = 2ⁿ, since grouping the subsets by how many items they contain and adding the group sizes has to recover the whole. A set of 10 items therefore has 2¹⁰ = 1,024 subsets, of which C(10, 3) = 120 have exactly three members.
Can k be a decimal, negative, or larger than n?
For everyday counting, k must be a whole number between 0 and n. There is exactly one way to choose nothing, so C(n, 0) = 1, and one way to choose everything, so C(n, n) = 1. By the standard integer convention, C(n, k) = 0 whenever k is negative or greater than n — you cannot choose 8 items from a set of 5. (Mathematicians do extend binomial coefficients to non-integer and negative arguments through the gamma function, but that generalisation is a different object from the counting coefficient this calculator computes.)
How do I work out n choose k by hand for small numbers?
Use the multiplicative shortcut and cancel as you go. C(10, 3) = (10 × 9 × 8) / (3 × 2 × 1): put k factors on top counting down from n, and k factors on the bottom counting down from k. Here that is 720 / 6 = 120. Always iterate over the smaller of k and n − k — for C(20, 18), compute C(20, 2) = (20 × 19) / (2 × 1) = 190 instead of multiplying eighteen terms. For anything past a couple of digits, the binomial coefficient calculator keeps the result exact where hand arithmetic would slip.
Related calculators
- Binomial Coefficient Calculator — the parent tool: exact C(n, k) for any n and k up to 1,000, plus the permutation count and the linking factorial.
- Binomial Distribution Calculator — turns the coefficient into a probability: P(X = k) for n trials at success probability p, with the mean, variance and cumulative probabilities.
- Dice Roller — simulate any dice and see the odds, a hands-on way to watch combinatorial probabilities play out.
- Standard Deviation Calculator — the spread of a data set, including counts drawn from a binomial process.
- Exponent Calculator — raise a base to any power, for the pᵏ and (1 − p)ⁿ⁻ᵏ terms of the binomial theorem and distribution.
- Factor Calculator — every factor of a whole number, the divisor side of many counting problems.
Frequently asked questions
How do I decide between combinations and permutations?
Ask one question: does the order of the chosen items change the answer? If rearranging your selection gives you something genuinely different — a race finishing order, a PIN, ranked medal positions — it is a permutation, P(n, k) = n! / (n − k)!. If rearranging gives the same thing — a committee, a hand of cards, a set of lottery numbers — it is a combination, C(n, k). A quick tell: if the roles or positions have names (first, second, president, gold), order matters; if the picked items form an unlabelled group, it does not.
How many possible combinations are there in a 6-from-49 lottery?
C(49, 6) = 13,983,816 — just under 14 million. That number is both the count of distinct tickets and the odds against any single ticket: 1 in 13,983,816. Formats with more numbers or a larger pool climb fast; a 6-from-59 draw has C(59, 6) = 45,057,474 combinations, so the same "pick 6" game becomes more than three times harder to win.
What is a combination with repetition, and when do I use it?
Use it when the same option can be chosen more than once and order still does not matter — like 3 scoops from 5 flavours where a triple vanilla counts. The formula is C(n + k − 1, k). For the ice-cream example that is C(7, 3) = 35, versus only C(5, 3) = 10 if repeats were banned. Choosing distinct items uses the plain C(n, k); allowing repeats uses C(n + k − 1, k). Confusing the two is one of the most common counting errors.
What is Pascal's triangle used for?
It is a lookup table for binomial coefficients: the k-th entry in row n is C(n, k). Because each number is the sum of the two above it, you can extend it by hand with no multiplication at all, which makes it handy for small cases and for spotting patterns. It also encodes the coefficients of the binomial theorem (row n gives the expansion of (a + b)^n), the Fibonacci numbers along its shallow diagonals, and the powers of 2 as its row sums.
How many subsets does a set of n items have?
Exactly 2^n, because each of the n items is independently either in a given subset or out of it. That total is also the sum of one row of Pascal's triangle: C(n, 0) + C(n, 1) + … + C(n, n) = 2^n. A set of 10 items therefore has 2^10 = 1,024 subsets, of which C(10, 3) = 120 have exactly three members.
Can k be a decimal, negative, or larger than n?
For everyday counting, k must be a whole number between 0 and n. There is exactly one way to choose nothing, so C(n, 0) = 1, and one way to choose everything, so C(n, n) = 1. By the standard integer convention, C(n, k) = 0 whenever k is negative or greater than n — you cannot choose 8 items from a set of 5. Mathematicians extend binomial coefficients to non-integer arguments through the gamma function, but that is a different object from the counting coefficient.
How do I work out n choose k by hand for small numbers?
Use the multiplicative shortcut and cancel as you go. C(10, 3) = (10 × 9 × 8) / (3 × 2 × 1): put k factors on top counting down from n, and k factors on the bottom counting down from k. Here that is 720 / 6 = 120. Always iterate over the smaller of k and n − k — for C(20, 18), compute C(20, 2) = (20 × 19) / (2 × 1) = 190 instead of multiplying eighteen terms.
Informational only. Not personalised financial, legal, or tax advice.