C

Combination Calculator (nCr)

Calculate C(n,k) binomial coefficients with step-by-step solution, Pascal's triangle & permutation comparison

C(n,k) = n! / (k! × (n−k)!)
Quick Examples

What is a Combination (nCr)?

A combination is a selection of items from a larger set where the order does not matter. If you are choosing 3 people to form a committee from a group of 10, you do not care who is "first" or "second" — only which 3 are on the committee. That is a combination problem.

The notation C(n,k), also written nCk, nCk, or "n choose k", counts the number of ways to choose k items from n distinct items without repetition and without regard to order. It is also called the binomial coefficient because it appears as the coefficient in the binomial expansion (a+b)n.

Compare this to a permutation: if the order of selection matters (e.g., assigning President, Vice-President, and Treasurer from 10 people), you use P(n,k) instead. Since every combination of k items can be arranged in k! orders, we always have P(n,k) = k! × C(n,k).

Combination Formula

The combination formula, also known as the binomial coefficient formula, is:

C(n, k) = n! / (k! × (n−k)!)

where n! = n × (n−1) × … × 2 × 1 and 0! = 1

A practical shortcut avoids computing large factorials: multiply n × (n−1) × … down exactly k terms (the numerator), then divide by k!. For C(10,3):

C(10, 3) = (10 × 9 × 8) / (3 × 2 × 1) = 720 / 6 = 120

This shortcut works because most of the n! in the numerator cancels with (n−k)! in the denominator, leaving only the top k terms.

Combination vs Permutation

Feature Combination C(n,k) Permutation P(n,k)
Order matters?NoYes
Formulan! / (k!(n−k)!)n! / (n−k)!
Example useTeam selectionRace finish order
C(5,2) vs P(5,2)1020
RelationshipC(n,k) = P(n,k) / k!P(n,k) = k! × C(n,k)

When you have 5 items and choose 2, there are 20 ordered arrangements (permutations). Since each pair can be ordered in 2! = 2 ways, there are 20/2 = 10 unordered combinations. This is the core relationship between the two formulas.

Pascal's Triangle and Binomial Coefficients

Pascal's triangle is a number triangle where every entry equals the sum of the two entries directly above it. The entry in row n (starting at row 0) and column k (starting at column 0) equals exactly C(n,k).

Row 0: 1
Row 1: 1 1
Row 2: 1 2 1
Row 3: 1 3 3 1
Row 4: 1 4 6 4 1
Row 5: 1 5 10 10 5 1

This works because of Pascal's identity: C(n,k) = C(n−1,k−1) + C(n−1,k). Every interior entry in the triangle is the sum of its two "parent" entries. Pascal's triangle gives a fast, recursive way to compute any combination without using factorials — just build rows from the top.

Real-World Examples

  • Lottery (49 choose 6): C(49,6) = 13,983,816. To win India's or UK's national lottery, a player picks 6 numbers from 1–49. There are nearly 14 million possible tickets — which is why jackpot wins are so rare. The probability of a single ticket winning is 1 in 13,983,816.
  • Poker hands (52 choose 5): C(52,5) = 2,598,960 possible 5-card hands from a standard 52-card deck. Poker probabilities (straight flush, full house, etc.) are all computed by dividing the number of qualifying hands by 2,598,960.
  • Committee selection (10 choose 3): C(10,3) = 120 ways to choose a 3-person committee from 10 candidates. Order does not matter; you care only about who is on the committee, not who was selected first.
  • Handshakes in a room: If n people are in a room and everyone shakes hands with everyone else exactly once, the total handshakes = C(n,2) = n(n−1)/2. For 20 people: C(20,2) = 190 handshakes.
  • Binomial theorem: (a+b)n = Σ C(n,k) × an−k × bk. The combination C(n,k) is the coefficient of each term, which is why it is called the binomial coefficient.

Special Values Table

nkC(n,k)Notes
5210Handshakes for 5 people
103120Committee of 3 from 10
6320Middle of Pascal row 6
426Pairs from 4 items
n01Always 1 (choose nothing)
nn1Always 1 (choose everything)
n1nAlways n (choose one)
5252,598,9605-card poker hands
49613,983,8166/49 lottery tickets

Frequently Asked Questions

What is the difference between combination and permutation?
A combination counts selections where order does NOT matter. A permutation counts arrangements where order DOES matter. Choosing a committee of 3 from 10 people is a combination (C(10,3) = 120) because {Alice, Bob, Carol} is the same committee regardless of the order you list them. Awarding gold, silver, and bronze from 10 athletes is a permutation (P(10,3) = 720) because the order matters. The relationship is: C(n,k) = P(n,k) / k!.
What does C(n,k) mean?
C(n,k), also written nCk or "n choose k", is the number of ways to select k items from a set of n distinct items without regard to order and without repetition. It equals n! / (k! × (n−k)!). The notation comes from "combination," and the value is also called the binomial coefficient because it appears as a coefficient in the binomial expansion of (a+b)n.
How do I calculate C(10,3)?
C(10,3) = 10! / (3! × 7!). Since 10!/7! = 10 × 9 × 8 = 720, and 3! = 6, we get 720/6 = 120. The shortcut is: multiply the top k values of n downward (10 × 9 × 8), then divide by k! (3 × 2 × 1 = 6). Result: 120. This shortcut avoids computing large factorials and always produces the answer more efficiently.
What is C(n,0) and C(n,n)?
C(n,0) = 1 for any n ≥ 0. There is exactly one way to choose 0 items — choose nothing. Similarly, C(n,n) = 1 for any n ≥ 0 — there is exactly one way to choose all n items. These are the boundary values: every row in Pascal's triangle starts and ends with 1.
What is Pascal's triangle and how does it relate to combinations?
Pascal's triangle is built by placing 1s on the edges and making each interior entry equal to the sum of the two entries directly above it. The entry in row n (0-indexed) at position k equals C(n,k). Row 5 is: 1, 5, 10, 10, 5, 1 — which is C(5,0) through C(5,5). Pascal's identity C(n,k) = C(n−1,k−1) + C(n−1,k) is the exact rule used to build each row.
How many poker hands are possible?
C(52,5) = 2,598,960. A 5-card poker hand is drawn from a 52-card deck, and since the order of cards in a hand does not matter, we use combinations. All poker probabilities are calculated by dividing the number of favourable 5-card hands by 2,598,960.
What is the combination with repetition formula?
Combinations with repetition (multiset coefficients) allow the same item to be chosen more than once. The formula is C(n+k−1, k) = (n+k−1)! / (k! × (n−1)!). For example, choosing 3 scoops from 5 ice cream flavours with repetition allowed gives C(5+3−1, 3) = C(7,3) = 35 ways. This calculator handles standard combinations without repetition.