Binomial Coefficient Calculator
The binomial coefficient C(n, k), read “n choose k,” counts how many ways you can choose k items from n when order does not matter: the number of 5-card hands from a 52-card deck is C(52, 5) = 2,598,960. It is also the coefficient of x^k in the expansion of (x + 1)^n, which is where the “binomial” name comes from.
This calculator computes exact integer values using a division-at-every-step recurrence that keeps results precise far beyond naive factorial division, shows the multiplicative working, and includes the permutation P(n, k) mode for when order does matter.
Binomial Coefficient Calculator
Exact “n choose k” values, plus permutations when order matters.
| Notation | — |
| Formula used | — |
| In words | — |
| With repetition | — |
| Pascal’s triangle row n | — |
Results are exact integers up to about 9 × 10¹⁵; beyond that they are shown in exponential form. n is capped at 1000 to keep the computation instant.
Combinations vs permutations
The only question is whether order matters. Dealing a poker hand: order does not matter, so C(52, 5) = 2,598,960 hands. Awarding gold, silver, and bronze medals to 52 athletes: order matters, so P(52, 3) = 52 × 51 × 50 = 132,600 outcomes. Permutations always outnumber combinations for the same n and k, because each chosen set can be arranged in k! orders.
Worked example
Choose 3 students from a class of 20. C(20, 3) = 20! ÷ (3! × 17!) = (20 × 19 × 18) ÷ (3 × 2 × 1) = 6,840 ÷ 6 = 1,140 ways. Enter n = 20, k = 3 to confirm.
New: with-repetition mode, Pascal's triangle row, factorial breakdown
Three additions match the strongest competing tools. A with-repetition mode computes C(n+k-1, k): the number of ways to choose k items from n types when each type may be picked more than once (the stars-and-bars result). Unlike plain combinations, k may exceed n here.
Every calculation now also shows Pascal's triangle row n: all values C(n, 0) through C(n, n), so you can see where your answer sits in the triangle. And the step-by-step panel gained an exact factorial breakdown: for n up to 18 it expands n!, k!, and (n-k)! to their full integer values and shows the division.
Worked example, checked against this exact tool
C(10, 3): 10! = 3,628,800, 3! = 6, 7! = 5,040. 3,628,800 / (6 x 5,040) = 3,628,800 / 30,240 = 120.
With repetition, choosing 3 from 10 types: C(10+3-1, 3) = C(12, 3) = 220.
Pascal's row 10: 1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1.
Frequently asked questions
What does “n choose k” mean?
The number of ways to choose k items from n distinct items where the order of choosing does not matter. C(5, 3) = 10: from {A,B,C,D,E} you can pick ABC, ABD, ABE, ACD, ACE, ADE, BCD, BCE, BDE, or CDE.
What is the binomial coefficient formula?
C(n, k) = n! ÷ (k! × (n−k)!). The calculator avoids computing huge factorials directly and instead multiplies and divides step by step, which keeps the arithmetic exact.
Why is C(n, k) the same as C(n, n−k)?
Choosing which k items to take is the same as choosing which n−k items to leave behind. The calculator uses this symmetry to do less work.
When do I use permutations instead?
When order matters: passwords, race finishes, seating arrangements, PIN codes. P(n, k) = n! ÷ (n−k)!, with no division by k! because the arrangements are not divided out.
What is Pascal’s triangle?
A triangular arrangement where each number is the sum of the two above it. Row n of the triangle lists C(n, 0), C(n, 1), …, C(n, n): row 4 is 1, 4, 6, 4, 1.
