Utilorca

Combination calculator

Combination calculator by Utilorca (utilorca.com): free, no sign-up, runs in your browser. Count ways to choose r items from n distinct items or types. Select whether order matters and whether choices can repeat. Get an exact integer answer with the matching nCr, nPr or repetition formula and a shortened product for checking.

Enter whole numbers from 0 to 1,000. Without repetition, r cannot exceed n. Items or types are distinct; repeated choices are allowed only when the box is checked.

Formulas for combinations and permutations, with or without repetition. Reference: Math is Fun.

Private by design: your files are processed on your device and never uploaded.

How to use it

  1. Enter the number of available items or types n and the number of choices r, from 0 to 1,000.
  2. Decide whether order matters. Enable repetition only if the same type can be chosen more than once.
  3. Calculate and check the formula. Copy the exact count; this tool counts selections rather than listing them.

Questions and answers

When should I use combinations instead of permutations?

Use combinations when the order does not matter, such as choosing a committee. Use permutations when positions matter, such as choosing a chair, secretary and treasurer. Without repetition, 10 choose 3 gives 120 combinations but 720 ordered selections.

What changes when repetition is allowed?

For unordered selections from n distinct types with unlimited repetition, use C(n + r − 1, r). For r ordered positions with n choices each, use n^r. Choosing 3 from 5 types gives 35 unordered selections or 125 ordered selections.

What do zero choices and 0! mean?

There is one empty selection when r = 0, including when n = 0. The factorial convention 0! = 1 makes the usual formulas consistent. With zero available types and a positive number of repeated choices, there are zero ways.

Common questions and fixes

Do I use combinations or permutations for a committee?

If you choose three people from ten for a committee with equal roles, order does not matter: C(10, 3) = 120. If you assign chair, secretary and treasurer, the roles distinguish the outcomes: P(10, 3) = 10 × 9 × 8 = 720. Each three-person team has 3! = 6 role assignments, so 120 × 6 = 720.

Step by step
  1. Enter n = 10 and r = 3. Leave repetition off because one person cannot fill multiple places in this example.
  2. Select No — combinations and calculate. The exact count is 120.
  3. Switch to Yes — permutations and calculate. The count is 720 because the three positions are different.

How do I calculate combinations with repetition?

Choosing three scoops from five flavors gives C(5 + 3 − 1, 3) = C(7, 3) = 35 combinations if flavors may repeat and scoop order does not matter. If the scoops occupy three distinct ordered positions, each position has five options, giving 5^3 = 125 sequences. Both counts assume every flavor has an unlimited supply for these choices.

Step by step
  1. Enter n = 5 flavors and r = 3 scoops. Turn on Allow repeated choices.
  2. Choose No — combinations. The calculator uses C(n + r − 1, r) and returns 35.
  3. Choose Yes — permutations to treat the positions as distinct. It uses n^r and returns 125.

Why is n choose zero one, and what if r exceeds n?

C(n, 0) = 1 because there is exactly one empty selection. The convention 0! = 1 keeps the factorial formula consistent, including C(0, 0) = 1. Without repetition, selecting more items than are available is impossible; this calculator asks you to correct r > n. With repetition, r may exceed n because a type can be chosen again.

Step by step
  1. Set n = 10 and r = 0 without repetition. Calculate to get one empty selection, not ten or zero.
  2. Try n = 2 and r = 3 without repetition. The calculator reports an input error instead of evaluating a negative factorial.
  3. Enable repetition. You get C(4, 3) = 4 unordered selections, or 2^3 = 8 if order matters.

Embed this tool on your website

Free for blogs, schools and business sites: paste this code into any page (WordPress, Blogger, Wix, Squarespace or plain HTML). It runs in your visitors’ browsers, with no ads, sign-up or tracking cookies.