Skip to main content
HSCalculadora

Binomial Coefficient Calculator

Compute n choose k, the number of combinations.

Results update as you type.

Binomial coefficient (n choose k)
—
Ordered arrangements (nPk)—

How it works

The binomial coefficient, written 'n choose k' or C(n, k), tells you how many different groups of k items you can select from a set of n when the order of selection does not matter, and this calculator computes it. You enter n, the total number of items, and k, how many you are choosing, and it returns the binomial coefficient along with the number of ordered arrangements. The value is found by dividing n factorial by the product of k factorial and (n minus k) factorial, though the calculator uses a numerically stable method to avoid overflow with large numbers. Binomial coefficients appear throughout mathematics: they are the entries of Pascal's triangle, the coefficients in the expansion of (a + b) raised to a power, and the foundation of combinatorics and probability. For example, C(5, 2) equals 10, meaning there are 10 ways to choose 2 items from 5. If order matters, so that choosing A then B differs from B then A, you want permutations instead, which the calculator also provides by multiplying the combination count by k factorial. These ideas underpin lottery odds, card-game probabilities, and countless counting problems. The result requires k to be between 0 and n; choosing more items than exist has no valid count. Enter n and k to compute the binomial coefficient.

Formula

C(n, k) = n! / (k! × (n − k)!)

The binomial coefficient counts how many ways you can choose k items from n when order does not matter. It equals n factorial divided by the product of k factorial and (n − k) factorial. Multiplying the coefficient by k factorial gives the number of ordered arrangements, where order does matter.

Source:Combinatorics

We review all our tools from time to time to ensure accuracy.

Worked example

n (total items):5k (chosen items):2
C(5, 2) = 5! / (2! × 3!) = 10 ways to choose 2 from 5.

How to use this calculator

  1. 1

    Enter your values

    Enter n (total items) and k (chosen items).

  2. 2

    Adjust the options

    Fine-tune any options to match your situation.

  3. 3

    Read your result

    Binomial coefficient (n choose k) updates instantly as you type — no button to press.

Frequently asked questions

What is a binomial coefficient?

A binomial coefficient, written C(n, k) or 'n choose k', is the number of ways to select k items from a set of n when order does not matter. It equals n factorial divided by k factorial times (n minus k) factorial. Binomial coefficients are central to combinatorics, probability, and the binomial theorem for expanding powers of sums.

What is the difference between combinations and permutations?

Combinations count selections where order does not matter, so choosing A and B is the same as B and A. Permutations count arrangements where order does matter, treating A-then-B as different from B-then-A. The number of permutations equals the number of combinations multiplied by k factorial, which the calculator shows alongside the coefficient.

How does this relate to Pascal's triangle?

Each entry in Pascal's triangle is a binomial coefficient. The number in row n and position k equals C(n, k). The triangle is built so each number is the sum of the two above it, which mirrors the identity that C(n, k) equals C(n−1, k−1) plus C(n−1, k). This gives a quick way to generate coefficients.

Why must k be between 0 and n?

You cannot choose more items than exist in the set, so k cannot exceed n, and you cannot choose a negative number of items, so k cannot be below 0. When k is 0 or equal to n, the coefficient is 1, since there is exactly one way to choose nothing or everything. Values outside this range have no valid count and return no result.

Where are binomial coefficients used?

They appear in probability calculations such as lottery and card odds, in the binomial theorem for expanding expressions like (a + b) to a power, in statistics through the binomial distribution, and in many counting problems across computer science and engineering. Any time you need to count unordered selections from a set, the binomial coefficient provides the answer.