Calculate combinations (nCr) instantly, view the formula, and solve combinatorics problems with precise BigInt calculations.
Enter values for n and r to calculate the binomial coefficient.
This free Binomial Coefficient Calculator computes the exact value of nCr (also written as C(n, r) or ⁿCᵣ) using arbitrary-precision arithmetic. Enter the values of n and r to instantly calculate the number of ways to choose r items from n distinct items without considering order. It is an essential tool for combinatorics, probability, statistics, and programming.
Enter non-negative integers n and r (where 0 ≤ r ≤ n) to calculate the exact binomial coefficient. The calculator displays the result, explains the formula, and provides step-by-step calculations for smaller values.
This calculator is perfect for students studying combinatorics and probability, teachers preparing math lessons, competitive exam candidates, statisticians, programmers implementing combination algorithms, and anyone solving counting problems.
Binomial coefficients count the number of possible combinations without repetition. They are fundamental in probability theory, Pascal's Triangle, the Binomial Theorem, statistical distributions, machine learning, cryptography, and many areas of discrete mathematics.
Binomial coefficients are used in probability calculations, lottery odds, statistical sampling, machine learning, combinatorial optimization, genetics, coding theory, algorithm design, and financial risk analysis.
How this calculator computes combinations accurately
Unlike permutations, combinations count selections where the order of chosen items is irrelevant.
Every value in Pascal's Triangle is a binomial coefficient and follows simple recursive relationships.
Binomial coefficients are fundamental in probability distributions and statistical calculations.
Calculate combinations in just a few simple steps
Input the total number of available items.
Input the number of items you want to choose.
The calculator evaluates the factorial formula using exact arithmetic.
The exact value of nCr is displayed instantly.
See how factorials are used to compute the combination value.
Use the result in probability, combinatorics, statistics, programming, or mathematical analysis.
Computing the binomial coefficient C(8,3) step by step
A teacher wants to know how many different ways 3 students can be selected from a class of 8 students.
Explanation: A binomial coefficient counts the number of ways to choose r items from n items when the order of selection does not matter. It is commonly written as C(n,r), nCr, or (\(\binom{n}{r}\)).
What each output represents
| Output | What It Means | Example |
|---|---|---|
| C(n,r) | The total number of combinations of choosing r objects from n objects. | C(8,3) = 56 |
| n | The total number of available items. | 8 students |
| r | The number of items selected. | Select 3 students |
| Formula Used | The factorial formula used to compute the result. | n! / (r!(n−r)!) |
Order doesn't matter: Binomial coefficients count combinations, unlike permutations where different orders are counted separately.
Symmetry property: C(n,r) always equals C(n,n−r), allowing calculations to be simplified.
Manual verification: Expand the factorial formula, cancel common terms, and verify the remaining multiplication equals the calculator's answer.
The calculator prints C(n, n−r) next to your answer because every binomial coefficient is symmetric: choosing r items leaves n−r items unchosen, so the two counts are always equal. For example, C(10, 3) equals C(10, 7), which is why picking 3 students from a group of 10 has the same number of outcomes as picking the 7 who stay behind.
Binomial coefficients grow extremely quickly, and the Digits row shows how many digits the exact answer contains. C(100, 50) has 30 digits, while C(1000, 500) has around 300 digits. That number is a quick sanity check that the calculator worked at full precision instead of rounding the result.
The calculator stops and warns you, because C(n, r) is only defined when 0 ≤ r ≤ n. There is no way to choose more items than are available, so an r above n produces no result until you correct the inputs.
Exactly two cases give 1: choosing nothing (r = 0) and choosing everything (r = n). Both have only one possible outcome, so C(n, 0) = 1 and C(n, n) = 1 for every n, while every selection strictly between 0 and n produces a larger count.
Every value in Pascal's Triangle is a binomial coefficient: row n contains C(n, 0) through C(n, n) reading left to right. Your C(n, r) result is exactly the entry at row n, position r, so you can cross-check any calculation against the triangle or its row-sum rule.
The calculator relies on BigInt arithmetic and a multiplicative algorithm that cancels common factors before multiplying, so it returns exact values even for n up to 5000. Because the answer can run into hundreds of digits, the on-screen value wraps to a new line instead of being cut off.
Where combination calculations are commonly used
Solve combinations and counting problems in algebra and combinatorics.
Quickly answer nCr questions in aptitude and entrance examinations.
Compute combinations used in probability distributions and random sampling.
Calculate sample selections and statistical combinations.
Verify algorithms involving combinations, recursion, and dynamic programming.
Generate entries in Pascal's Triangle using binomial coefficients.
Find coefficients in the expansion of (a + b)n.
Create classroom examples with detailed step-by-step solutions.
Determine the number of possible ticket combinations.
Use combinations in genetics, biology, and statistical modeling.
Calculate possible team selections and puzzle arrangements.
Explore combinatorial identities and advanced counting techniques.
What this binomial coefficient calculator does well, and where it has limits
Four closely related concepts in combinatorics and probability, compared
| Concept | Formula | Primary Use |
|---|---|---|
| Binomial Coefficient | C(n,r) = n! / (r!(n−r)!) | Coefficient of xr in the expansion of (1 + x)n. |
| Combinations (nCr) | n! / (r!(n−r)!) | Counts unordered selections of r objects from n. |
| Permutations (nPr) | n! / (n−r)! | Counts ordered arrangements of r objects. |
| Pascal's Triangle | Adjacent values are summed | Generates all binomial coefficients row by row. |
Summary: This Binomial Coefficient Calculator computes exact values of C(n,r) (also written as nCr) using efficient algorithms that avoid overflow for large numbers. It is useful for combinatorics, probability, algebra, competitive programming, and statistics. Pair it with the Combination Calculator and Pascal Triangle Calculator for a complete combinatorics toolkit.
Common questions about binomial coefficients
Trusted educational references on combinations, Pascal's Triangle, and binomial coefficients
Explore more combinatorics and number theory tools