Binomial Coefficient Calculator
Compute n choose k exactly with the multiplicative recurrence, for n up to 10,000.
Binomial Coefficient Calculator
Compute n choose k exactly with the multiplicative recurrence, for n up to 10,000.
What the page prints, and what it refuses
Every figure is printed with the rule or formula that produced it, and any numerical tolerance is stated on the result rather than implied. The page refuses an input the formula does not define and names the value it read; it prints no answer it cannot support.
The calculation runs entirely in this browser tab; nothing is uploaded.
The page computes C(n, k), the number of ways to choose k items from n without regard to order. 52 choose 5 is 2598960, the count of five-card poker hands, and the exact value is printed with its digit count.
Each coefficient is built from the previous one by multiplying and dividing whole numbers, so no factorial is ever formed and nothing is rounded. C(10000, 5000) has 3009 digits and is still exact.
Why the recurrence replaces n! ÷ (k!(n − k)!)
The textbook formula divides two enormous factorials, which overflows a double long before n reaches 200. The page instead uses C(n, k) = C(n, k − 1) × (n − k + 1) ÷ k, where every division is exact.
It also uses the symmetry C(n, k) = C(n, n − k) so the loop runs min(k, n − k) times. That is why 5000 of 10000 costs the same as 5000 of 10000 and no intermediate value is ever a fraction.
How to use Binomial Coefficient Calculator
Enter n and k as whole numbers, with k no larger than n, then press Run.
The first line is the exact coefficient, followed by its digit count and the two inputs restated.
What to Expect
Best for
- Counting combinations exactly
- Checking a probability that uses a binomial coefficient
- Working with a coefficient too large for a normal calculator
Not ideal for
- Permutations, where order matters and the combinations page is the wrong one
- n above 10,000
- A fractional or negative k
What this tool keeps
- n and k exactly as entered
What may need cleanup
- Nothing: the coefficient is a final integer
Common errors
- k above n is refused rather than answered with zero
- A fractional input is refused by name
Example use cases
- Count five-card poker hands
- Evaluate a binomial probability by hand
- Check a row of Pascal's triangle
Sample input
n = 52, k = 5
Sample output
C(52, 5) = 2598960, with 7 digits
Who this is for
- Students meeting combinations
- Anyone checking a binomial probability
Frequently asked questions
What is the difference between C(n, k) and nPk?
C(n, k) counts unordered choices and nPk counts ordered ones. This page answers the unordered count, and the combinations and permutations page covers both together.
Why is k above n refused?
Choosing more items than exist has no arrangement, and the convention C(n, k) = 0 for k above n would be a different answer from the one the page promises. The refusal names the rule instead.
Can the answer be a decimal?
No. A binomial coefficient is a whole number, and the page computes it with whole-number arithmetic only.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.