All calculators

Education

Combination Calculator

Enter the total number of items n and the number chosen r, and the calculator returns C(n, r), the count of unordered selections. Uses the multiplicative form for accurate results across a wide range of inputs.

How many distinct items you have to choose from. · e.g. 10

Number to select. Cannot exceed n. · e.g. 3

Formula

C(n, r) = n! ÷ (r! × (n − r)!)

Combinations count selections where order does not matter: choosing {A, B, C} is the same as {C, B, A}. Use permutations instead when order matters.

Combinations

C(10, 3)

120

Order does not matter

n10
r3
By symmetryC(10, 3) = C(10, 7)
Result120
Was this helpful?

Examples

C(10, 3)

120

C(52, 5) (5-card poker hands)

2,598,960

C(20, 10)

184,756

How it works

A combination counts unordered selections. The closed-form formula uses three factorials, but the calculator uses the equivalent multiplicative form to compute the answer directly, multiplying and dividing one term at a time so very large factorials never appear in intermediate values.

Closed form · C(n, r) = n! ÷ (r! × (n − r)!)

Multiplicative · Π from i = 1 to k of (n − k + i) ÷ i, where k = min(r, n − r)

Conventions: C(n, 0) = C(n, n) = 1 · C(n, r) = C(n, n − r).

Related counting and math calculators

Frequently asked questions

A combination is a selection of items where order does not matter. Picking the set {A, B, C} from a larger group is the same combination as picking {C, B, A}: only which items appear matters, not the order. The standard C(n, r) counts how many ways you can choose r items from a set of n distinct items.

C(n, r) = n! ÷ (r! × (n − r)!). The numerator is all permutations of n choose r; dividing by r! removes the orderings, since each unordered set of r items appears r! times among the permutations. The calculator uses the equivalent multiplicative form to avoid computing massive factorials directly: result = product from i = 1 to r of (n − r + i) ÷ i.

Permutations count arrangements where order matters. Combinations count selections where order does not. Choosing the gold, silver, and bronze winners is a permutation. Choosing 3 finalists is a combination. P(n, r) = r! × C(n, r), so permutations are always at least as large as combinations.

C(n, r) = C(n, n − r). Choosing r items to keep is the same number of combinations as choosing the n − r items to leave out, because each choice on one side uniquely determines the other. The calculator uses this symmetry to compute with the smaller of r and n − r, which is faster and more numerically stable.

Both equal 1. There is exactly one way to choose zero items (the empty set), and exactly one way to choose all of them. This makes the formula consistent: with r = 0, the denominator is 0! × n! = n!, and the numerator is n!, giving 1.

The multiplicative formula stays numerically reasonable up to values around C(50, 25), where the answer is around 10^14. Beyond that, JavaScript's safe-integer range (about 9 × 10^15) starts to truncate digits, and the calculator flags the result as approximate. For exact answers on very large inputs, use a big-integer math tool.