AbraCalc

Combination Calculator (nCr)

Calculate the number of combinations of n items taken r at a time (nCr).

Embed this tool on your site
Cite this tool

APA

AbraCalc. (2026). Combination Calculator (nCr) [Online calculator]. Retrieved from https://abracalc.com/calculator/combination-calculator/

BibTeX

@misc{abracalc-combination-calculator, author = {AbraCalc}, title = {Combination Calculator (nCr)}, year = {2026}, howpublished = {\url{https://abracalc.com/calculator/combination-calculator/}} }

Did this tool answer your question?

How to use this tool

  1. Enter n (total items) and r (items chosen) in the fields above.
  2. Results update instantly as you type — or click Calculate.
  3. Read your ncr and the full breakdown beneath it.

nCr = n! / (r! × (n−r)!) counts unordered selections of r items from n.

Formula

nCr = n! ÷ (r! × (n − r)!)

Computed iteratively: numerator = n × (n−1) × … × (n−r+1), denominator = r!, then nCr = numerator ÷ denominator. The smaller of r and n−r is used to minimise steps.

How it works

This calculator counts the number of unordered subsets of size r that can be chosen from n distinct items. Unlike permutations, the order of selection does not matter: {A, B} and {B, A} count as one combination. The algorithm uses the smaller of r and n−r to keep the loop short, and builds the numerator and denominator in parallel to maintain integer precision throughout.

Worked example

  1. n = 5 (total items), r = 2 (items chosen).
  2. Because r (2) ≤ n − r (3), keep r = 2.
  3. Numerator: 5 × 4 = 20.
  4. Denominator: 1 × 2 = 2.
  5. nCr = 20 ÷ 2 = 10.

nCr = 10 combinations.

Common mistakes to avoid

  • Using nCr when order matters (e.g. assigning ranked prizes); that requires nPr, not nCr.
  • Forgetting that nCr = nC(n-r), so C(10,7) = C(10,3); using the larger r unnecessarily inflates intermediate calculations.
  • Setting r = 0 and being surprised the result is 1; there is exactly one way to choose nothing from any set.

Key terms

Combination
A selection of items where order does not matter. Choosing {A, B} is the same as choosing {B, A}.
n (total items)
The total number of distinct items in the pool.
r (items chosen)
The number of items selected to form each subset.
Binomial coefficient
Another name for nCr. It appears as coefficients in the binomial theorem expansion of (a+b)ⁿ.
Symmetry property
nCr = nC(n−r). Choosing 2 from 5 gives the same count as choosing 3 from 5, both equal 10.

Frequently asked questions

What is a combination?
A combination is an unordered selection. nCr = n!/(r!(n-r)!). For example, C(5,2) = 10 — choosing 2 from 5 ignoring order.

References & sources