Binomial Coefficient Calculator
Calculate n choose k, C(n, k), with step-by-step factorials. Also get permutations, Pascal's triangle, combinations with repetition, and binomial probability.
https://hexacalculator.com/calculators/mathematics/statistics/binomial-coefficient-calculator
Mathematics
Statistics
Binomial Coefficient Calculator
Calculate n choose k, C(n, k), with step-by-step factorials. Also get permutations, Pascal's triangle, combinations with repetition, and binomial probability.
Binomial Coefficient Calculator
Choose your values
Show binomial probability
Turn n choose k into P(X = k) for a success probability you set.
Show combinations with repetition
Count selections where the same item can be picked more than once.
- Permutations P(n, k) (order matters)
- Total number of subsets
C(5, 2) = 5! / ( 2! × 3! ) = 10
Written out with factorials: 120 / ( 2 × 6 ) = 10
Symmetry: choosing 2 to keep is the same as leaving 3 out, so C(5, 2) = C(5, 3).
If order matters, use permutations: there are 20 ordered arrangements versus 10 unordered selections.
Pascal's triangle and distribution
Binomial coefficients are used to calculate the number of ways a particular number of elements can be selected from a set when order does not matter. They are denoted by C(n, k) and read as "n choose k". It is also the value displayed on scientific calculators using the nCr button. When you input n and k into the top field, this tool will display not only the number of combinations but additional information such as factorial representation, corresponding permutations, and Pascal's triangle.
What is a binomial coefficient?
A combination is a selection of some or all elements from a set that has no regard to the order of the elements in the set. The binomial coefficient C(n,k) is the number of possible combinations from n elements.
This term comes from algebra. A binomial is an expression that contains two terms, such as x + y. When you expand an expression like (x + y) to a power n, the value in front of each term corresponds to one of these coefficients. This is where the term comes from.
The formula for choosing k elements out of n is:
Binomial coefficients are expressed using factorials. The factorial of a number is the product of all whole numbers from that smallest whole number up to and including that number, so 4! = 1 x 2 x 3 x 4 = 24. The formula looks like this:
Here n! counts the number of permutations of the entire set, k! eliminates the permutations within the selected group and (n − k)! eliminates the permutations of the remaining elements. As with combinations, order in these two groups does not matter, so those permutations are removed, leaving only the number of distinct subsets.
Explanation by example:
A teacher wants to split a class into project groups and wants to know how many ways there are to pick two students out of a group of four. This corresponds to the case of picking 2 elements from 4 elements.
So there are six possible combinations in total. The calculation of the selection of two students from a group of six also results in fifteen possibilities.
The following table shows each part of the formula with its value in the first example.
Symbol | Meaning | Example (4 choose 2) |
|---|---|---|
n | Total items in the set | 4 |
k | Items chosen | 2 |
n! | Factorial of n | 24 |
k! | Factorial of k | 2 |
(n - k)! | Factorial of the rest | 2 |
C(n, k) | Number of combinations | 6 |
Difference between permutations and combinations.
The main difference is the order. A combination is a set of elements where the order does not matter while a permutation is an ordered arrangement of elements. If it matters which element comes first, second, etc., then you use permutations.
Any combination can be arranged in k! different ways so the number of permutations is always the product of the number of combinations and k!. If a teacher selects a group of students then this is a combination. If a teacher decides who answers questions first, then this is a permutation.
Symmetry and Pascal's triangle
This formula has a simple symmetry: The choice of k elements is equivalent to omitting n - k elements. This results in the identity C(n, k) = C(n, n − k). So there are as many ways to choose 3 elements out of 8 as there are ways to choose 5 elements out of 8: 56.
If one organizes the coefficients in rows this yields Pascal's triangle. The nth row contains the coefficients of C(n, 0) to C(n, n), with each element equaling the sum of the two elements directly above it. This addition rule, C(n, k) = C(n − 1, k − 1) + C(n − 1, k), is usually the fastest method for computing small cases by hand.
Combinations with repetition
It is possible to pick the same elements more than once. For example, if you take three balls from five different flavors and can choose the same flavor multiple times. This type of counting is called a multiset coefficient, and we use an adjusted C-button for this.
If you activate the option "Duplicates" in a calculation tool this value will be shown next to the usual result.
Applications of binomial coefficients:
These numbers appear everywhere in combinatorics and probability. In a standard deck of cards with 52 cards there are 2,598,960 possible poker hands of five cards chosen from the 52. The rarity of each hand determines its value. In a lottery where six numbers are picked out of 49 possible numbers there are 13,983,816 equally likely draws since you can pick 49 things taken 6 at a time.
These numbers also form the basis of the binomial distribution. The probability of exactly k successes in n independent trials is the product of the binomial coefficient C(n, k) with the success probability and the failure probability. If you activate the above probability option, then you can convert n and k into such probabilities.
Frequently asked questions
- What is the formula for choosing k elements out of n?
The formula for calculating the number of ways to select k items from a set of n items (binomial coefficient) is given by: C(n, k) = n! / (k! × (n - k)!). It calculates the number of ways to choose k items from a set of n items without regard to order.
- How do you calculate choosing 2 out of 4?
Substitute n=4 and k=2 into the formula. This gives us: 4! / (2! × 2!) = 24 / (2 × 2) = 6. So there are six ways to choose two elements from a set of four.
- What is the difference between permutation and combination?
A combination counts groups without regard to order while a permutation counts arrangements with regard to order. The number of permutations is the multiple of the number of combinations by k!. This is because each selected group can be arranged in k! different ways.
- What is the relationship between binomial coefficients and Pascal's triangle?
Each row of Pascal's triangle gives the binomial coefficients for n from C(n, 0) to C(n, n). Each element is the sum of the two elements above it, which corresponds to the identity C(n, k) = C(n − 1, k − 1) + C(n − 1, k).
- Can k be larger than n?
If k is greater than n, the coefficient will be zero. This is because you cannot select more items than are available in a set. The calculator will return 0 and explain why.
Related calculators






Disclaimer: This calculator is provided for general informational and educational purposes only. Our calculators are under active development, and results may be inaccurate, incomplete, or unsuitable for your situation. Always verify the figures independently and seek advice from a qualified professional before relying on them. We make no warranties and accept no liability for any loss or decision arising from use of this tool.
References
- Wikipedia: Binomial coefficient
Definition, identities, and properties of C(n, k).
- Wolfram MathWorld: Binomial Coefficient
Formal reference on binomial coefficients and related sums.
- Encyclopaedia Britannica: Binomial theorem
How the coefficients arise in the expansion of a binomial power.