dopecalc

Combination Calculator

Calculate the number of ways to choose r items from a set of n distinct items, where order does not matter. Uses the formula C(n,r) = n! / (r! × (n−r)!).

About this Calculator

Calculate the number of ways to choose r items from a set of n distinct items, where order does not matter. Uses the formula C(n,r) = n! / (r! × (n−r)!).

Formula & Calculations

Formula

C(n,r) = n! / (r! × (n−r)!), also written as (n choose r)
Where:
  • n=Total number of distinct items
  • r=Number of items to select (0 ≤ r ≤ n)
  • C(n,r)=Number of combinations (unordered selections), also known as the binomial coefficient

Assumptions

  • Order does not matter: selecting the same set of r items in any order counts as one combination.
  • All n items are distinct; repetition is not allowed.
  • r must be ≤ n and r, n must be non-negative integers.

Calculation Examples

Example 1

Inputs:n = 10, r = 4
Result:C(10,4) = 210

P(10,4) = 10×9×8×7 = 5,040 permutations, divided by 4! = 24 gives 210 combinations.

Example 2

Inputs:n = 5, r = 2
Result:C(5,2) = 10

From 5 items, there are 10 pairs: {1,2}, {1,3}, {1,4}, {1,5}, {2,3}, {2,4}, {2,5}, {3,4}, {3,5}, {4,5}.

Frequently Asked Questions

What is the binomial coefficient?

C(n,r) is called a binomial coefficient because it appears in the expansion of (x + y)^n. The coefficient of x^(n−r) * y^r is C(n,r). For example, (x+y)^4 = x^4 + 4x^3y + 6x^2y^2 + 4xy^3 + y^4, where the coefficients 1, 4, 6, 4, 1 are C(4,0) through C(4,4).

How are combinations used in probability?

Combinations are fundamental to counting problems in probability. For example, the probability of winning a 6/49 lottery is 1 / C(49,6) = 1 / 13,983,816.