Binomial Coefficient Calculator, n Choose k, Exact
Work out C(n,k), the number of ways to choose k items from n, exactly for n up to 1000. See the formula with your numbers, the digit count and the symmetry rule.
Binomial coefficient C(n,k)
C(10,3) =
120
C(n,k) = n! / (k! (n-k)!)
C(10,3) = (10 × 9 × 8) / 3!
Symmetry: C(n,k) = C(n,n-k), so C(10,3) = C(10,7).
Pascal's triangle
Hover, focus or tap a number to see its C(n,k) value.
About the Binomial Coefficient Calculator
A binomial coefficient, written C(n,k) and read "n choose k", counts the ways to pick k items from a set of n when the order of the picks does not matter. This calculator evaluates it exactly for any n from 0 to 1000 and any whole number k from 0 to n. Type your two numbers and the answer appears at once, with the formula filled in with your values, the number of digits in the result and a copy button for the full number.
Results are exact integers, not rounded decimals. C(1000,500) has 300 digits and the page prints all of them, which an ordinary calculator cannot do. The Pascal's triangle sits below the calculator so you can see where your coefficient lives: C(n,k) is the entry in row n at position k.
How to use it
Steps
- Enter n (0 to 1000), the total number of items to choose from.
- Enter k, the number of items in each selection. It must be a whole number from 0 up to n.
- Read the result, the expanded product and the digit count. Press Copy result to copy every digit.
- Decimals, negative numbers, k larger than n and n above 1000 are explained in a message instead of giving a wrong answer.
The formula
The second form is the one to use by hand. The numerator multiplies k terms starting at n and counting down; the denominator is k factorial. The calculator multiplies and divides in turn, which keeps every intermediate value an exact binomial coefficient and avoids ever building a huge factorial.
Symmetry
C(n,k) = C(n,n-k). Selecting 5 cards to keep from 52 is the same as selecting 47 to put back, so both counts are equal. The calculator uses whichever of k and n-k is smaller, so C(1000,999) is as quick as C(1000,1).
Worked examples
Example 1: choosing a committee
How many different committees of 3 can be formed from 10 people? C(10,3) = (10 × 9 × 8) / 3! = 720 / 6 = 120.
Example 2: a poker hand
A five-card hand from a 52-card deck can be dealt in C(52,5) = 2,598,960 ways. That is the denominator for every poker-hand probability you will see quoted.
Example 3: lottery odds
A lottery that draws 6 numbers from 49 has C(49,6) = 13,983,816 possible tickets, so one ticket wins the jackpot with probability 1 in 13,983,816, about 0.0000072 percent.
Example 4: a very large answer
C(100,50) = 100891344545564193334812497256, a 30-digit number. C(1000,500) begins 270288240945 and runs to 300 digits.
Edge cases
C(n,0) and C(n,n) both equal 1, because there is exactly one way to choose nothing and one way to choose everything. C(0,0) is 1. When k is greater than n you cannot choose more items than you have, so the calculator reports an error instead of returning 0.
Privacy
Nothing is uploaded; every calculation runs in your browser and never leaves your device. No account is needed and no values are stored.
Related tools
The Pascal's Triangle Calculator shows the full triangle that these coefficients come from. Use the Percentage Calculator to turn odds into percentages, and the Random Number Generator to draw a sample of your own.
Frequently asked questions
What does n choose k mean?
It is the number of ways to pick k items from a set of n when the order does not matter, written C(n,k). Choosing 3 people from 10 for a committee can be done in C(10,3) = 120 ways.
What is the formula for a binomial coefficient?
C(n,k) = n! / (k! (n-k)!). In practice you multiply n(n-1)...(n-k+1), which is k terms counting down from n, and divide by k!. For C(10,3) that is (10 × 9 × 8) / 6 = 120.
Why is C(n,k) equal to C(n,n-k)?
Choosing k items to take is the same as choosing the other n-k to leave behind, so both counts are equal. C(52,5) and C(52,47) are both 2,598,960.
What are the limits of the calculator?
n must be a whole number from 0 to 1000, and k must be a whole number from 0 to n. Decimals, negative numbers, k larger than n and n above 1000 produce an explanatory message rather than a result.
Can it handle very large answers?
Yes. It uses exact arbitrary-precision integers and prints every digit. C(1000,500) has 300 digits, and the Copy result button copies all of them.
How do I work out lottery odds with it?
Enter the pool size as n and the number of balls drawn as k. A 6-from-49 lottery gives C(49,6) = 13,983,816, so a single ticket has a 1 in 13,983,816 chance of matching all six numbers.
What are C(n,0) and C(n,n)?
Both equal 1. There is exactly one way to choose nothing and one way to choose everything. C(0,0) is also 1.
Is my input sent anywhere?
No. Everything is calculated in your browser and never leaves your device. The n and k values you type are used only on this page for the exact big-integer calculation, and nothing is sent to a server.