Skip to content

Combination Calculator

Count selections from n available item types when order does not matter, with or without repetition.

Enter the selection

Count selections from n available item types when order does not matter, with or without repetition.

Your data stays in this browser.

Combination result

Enter n and r, choose the repetition rule, then calculate.

What does this calculate?

Pick r items from n available types and form a group where position does not matter.

Available items (n)
One selected group (r)

{A, B, C} and {C, B, A} are the same outcome because the group members did not change.

No repetitionC(n, r) = n!r!(n − r)!
Repetition allowedC(n + r − 1, r) = (n + r − 1)!r!(n − 1)!

How to use the combination calculator

Use this page when only the selected group matters and rearranging that group does not create a new outcome. It calculates a count, not a list of groups.

  1. Enter n, the number of distinct available items or item types.
  2. Enter r, the number of items to choose.
  3. Choose whether a type may be selected more than once. No repetition is the default.
  4. Select Calculate, then review the exact count, formula, and digit length. Copy result preserves every digit.
  5. Choose Clear to remove inputs, errors, the result, and copy feedback while keeping your language setting.

When order does not matter

A combination treats selections with the same members as one outcome, regardless of order. Choosing three committee members from nine people is a combination because Alice–Ben–Chen is the same group as Chen–Alice–Ben. Medal places are not this task because first, second, and third are different roles.

This page stays focused on unordered selections. It does not calculate permutations, probability, lotteries with extra rules, circular arrangements, or enumerate every group.

Combination without repetition: nCr

When each item may be chosen once, the formula is C(n,r) = n! ÷ (r!(n − r)!). Dividing by r! removes the repeated orderings of each group. The calculator uses a multiplicative BigInt method so division remains exact and avoids floating-point rounding.

Without repetition, r cannot exceed n. Choosing none has one outcome, the empty group, so C(n,0) = 1. Choosing every available item also has one outcome, and C(0,0) = 1.

Combination with repetition

When item types may repeat and order still does not matter, the formula is C(n + r − 1,r). For example, choosing three doughnuts from five flavours allows three of one flavour, two plus one, or three different flavours, without treating their pickup order as new results.

Choosing zero items returns 1. If n = 0 and r is positive, the selection is impossible and the calculator asks for at least one available type instead of applying a factorial to a negative number.

Exact integers and the display limit

n and r must be whole numbers from 0 through 1,000. Even within that limit, a result may contain hundreds of digits. The computed and copied values are exact BigInt integers, never rounded decimals or scientific notation.

For a very long result, the card shows its beginning and end plus the exact digit count. The hidden middle is a display choice only; Copy result copies the full integer. Changing an input or repetition setting immediately removes the previous result and copied state.

Practical uses and common mistakes

  • Use no repetition for committees, hands of distinct cards, or choosing distinct options where order is irrelevant.
  • Use repetition for choosing quantities by type, such as several scoops from available flavours, when a type can appear more than once.
  • If swapping two selected items creates a different outcome, you need a permutation instead.
  • Do not use the repeated formula when items themselves are identical but have fixed limited counts; that is a different multiset problem.
  • Inputs accept whole counts only, not percentages, decimals, negative values, infinity, or formulas.

Worked examples

Choose five people from twelve without assigning roles: C(12,5) = 792 groups.

Choose three doughnuts from five flavours with repetition allowed: C(5 + 3 − 1,3) = C(7,3) = 35 selections.

Choose zero items from any pool: there is one empty selection, so the result is 1.

Frequently asked questions

How is a combination different from a permutation?

A combination ignores order. A permutation counts different orders as different outcomes.

Why is r greater than n allowed only with repetition?

Without repetition every chosen item must be distinct. With repetition, one available type may fill several of the r choices.

What does repetition mean here?

It means an item type can be selected again while the final order remains irrelevant. It does not mean arranging repeated letters.

Why does choosing zero items return 1?

The empty group is the one valid selection containing no items. This includes C(0,0).

Does Copy result include the hidden middle digits?

Yes. Long answers are shortened only on screen; copying uses the complete exact integer.