Combination Calculator

Count the ways to choose r items from n when the order does not matter, as an exact whole number.

A whole number from 0 to 1,000, for example 52.

A whole number from 0 up to n, for example 5.

Worked example

Inputs: n = 52 cards, r = 5 cards chosen. Formula: C(n, r) = n! ÷ (r! × (n − r)!). Substitution: 52 × 51 × 50 × 49 × 48 ÷ (5 × 4 × 3 × 2 × 1) = 311,875,200 ÷ 120. Result: C(52, 5) = 2,598,960 different five-card hands.

How it works

A combination is a selection where the order does not matter: choosing the ace of spades then the king of hearts is the same hand as the king then the ace. C(n, r), read "n choose r", counts the different selections of r items from n. If the order does matter, use the Permutation Calculator, which counts arrangements instead. Each item can be chosen only once (there is no repetition), r cannot be more than n, and both must be whole numbers from 0 up, with n at most 1,000.

The result is always the exact whole number. It is calculated by multiplying and dividing in turn rather than by writing out the factorials, so it stays exact even far beyond the size ordinary calculators can hold. Choosing nothing, or everything, can be done in one way, so C(n, 0) = C(n, n) = 1, and C(0, 0) = 1. A very long result is summarised in the headline as a shorter "≈" figure; the summary is only a shorter way to write the same whole number, and the full exact digits are given under the result.

What this result means

The result is how many different selections of r items can be made from n items when the order of the chosen items does not matter. It is always an exact whole number.

Common mistakes

  • Using combinations when the order matters. Choosing a captain and then a vice-captain is an arrangement, so the Permutation Calculator counts it, not this one.
  • Allowing repeats. Each item can be chosen once only; selections that allow repeats are a different count.

Assumptions and limitations

  • n and r must be whole numbers, r cannot be more than n, and n can be at most 1,000.
  • A very long result is summarised in the headline; its full exact digits are always given below it.

Analytics only runs if you choose to allow it below. Advertising and affiliate tracking are not currently used on Numerila. This panel exists so your preference is on record for if that ever changes.