ThisCalculator

Technology

Every Possible Number Combination Calculator

Updated · Standard formula, shown below

Combinations (nCr) 120
Permutations (nPr)
720
Result
Total items (n)
10
You entered
Items chosen (r)
3
You entered

Every Possible Number Combination Calculator

This calculator works out how many distinct combinations can be formed from a set of items, given a chosen subset size. You enter the total number of items (n) and how many you pick at a time (r), and it returns the number of possible combinations, along with the number of permutations for comparison. The result tells you the count of unique groups where order does not matter, which is the standard mathematical meaning of a combination.

Formula

The number of combinations is given by the binomial coefficient:

C(n, r) = n! / [ r! × (n − r)! ]

  • n = total number of distinct items (unitless count)
  • r = number of items chosen in each group (unitless count, 0 ≤ r ≤ n)
  • ! = factorial, meaning the product of all positive integers up to that number (e.g., 5! = 5 × 4 × 3 × 2 × 1 = 120)

The calculator also shows permutations, which use the formula P(n, r) = n! / (n − r)!. The only difference is that permutations count different orderings as separate outcomes, while combinations treat them as the same group.

Worked Example

Using the default values from the calculator (n = 10, r = 3):

  1. Compute 10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 3,628,800
  2. Compute 3! = 3 × 2 × 1 = 6
  3. Compute (10 − 3)! = 7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5,040
  4. Plug into the formula: C(10,3) = 3,628,800 / (6 × 5,040) = 3,628,800 / 30,240 = 120

The calculator returns 120 combinations and 720 permutations for these defaults. That means from 10 distinct items, you can form 120 different groups of 3 where order does not matter, and 720 ordered sequences of 3.

When to Use Combinations vs. Permutations

Combinations apply whenever the arrangement of the chosen items is irrelevant. Common real-world examples include:

  • Choosing 3 toppings from a menu of 10 – the order you list them does not change the pizza
  • Selecting 5 players from a team of 12 for a photo – the photo is the same group regardless of who stands where
  • Drawing 2 cards from a deck – the hand {Ace of Spades, King of Hearts} is the same as {King of Hearts, Ace of Spades}

Permutations are for situations where order matters, such as assigning 3 different prizes to 3 winners, creating a 4-digit PIN from distinct digits, or arranging books on a shelf. If you are unsure, ask: would swapping two chosen items produce a different outcome? If yes, use permutations; if no, use combinations.

Common Mistakes and Misunderstandings

A frequent error is mixing up combinations with permutations when the problem involves a sequence, like a lottery draw. Lottery numbers are usually combinations because the order of the drawn balls does not matter – the set {1, 2, 3} wins the same as {3, 2, 1}. Another common mistake is using r > n, which yields zero combinations because you cannot choose more items than exist. The calculator prevents this by requiring r ≤ n, but if you enter a larger r manually, the factorial formula would produce an undefined negative factorial, so always check your inputs.

Rounding is not an issue here because the result is always an integer, but very large n and r can exceed the calculator’s numeric range. For example, C(100, 50) is about 1.0089 × 10^29, which is fine, but C(1000, 500) is astronomically large and may display in scientific notation or overflow. In such cases, use a calculator or software that handles arbitrary-precision integers.

How to Choose n and r for Your Problem

Start by identifying the total set of distinct items you are choosing from – that is n. Then decide how many items go into each group – that is r. Make sure every item is distinct; if you have duplicate items, the standard combination formula does not apply directly. For example, if you have 3 identical red balls and 2 identical blue balls, the number of distinct color sequences is different from C(5,2). That situation requires a multiset combination formula, which is more complex and not covered by this calculator.

Also confirm whether you are choosing without replacement. The formula assumes each item can be used at most once. If you allow repeats (like a combination lock where digits can repeat), the count is C(n + r − 1, r), known as combinations with repetition. This calculator does not handle that case; it is strictly for sampling without replacement.

Limits of the Formula

The combination formula works perfectly for any non-negative integers n and r with r ≤ n. However, it assumes all items are distinct and that the selection is uniform – every group of size r is equally likely. In probability problems, that assumption is usually stated. The formula also does not account for constraints like “at least one of a certain type� or “no two adjacent items.� Those require more advanced counting techniques or inclusion-exclusion principles.

For practical purposes, the calculator is most useful for combinatorics homework, game design (e.g., how many possible hands exist), inventory planning, and simple probability calculations. If you need to enumerate the actual combinations rather than just count them, you would need a separate tool that lists them, as the count alone does not show the groups.

Frequently Asked Questions

What is the difference between a combination and a permutation?

A combination is a selection where order does not matter, so {A, B} and {B, A} are the same. A permutation is an arrangement where order matters, so those two are different. The number of permutations is always larger than the number of combinations for the same n and r (except when r = 0 or r = 1, where they are equal).

Why does the calculator show permutations too?

Because many people confuse the two, and seeing both side by side helps clarify which one matches their problem. If you need the number of ordered sequences, use the permutation result; if you need unordered groups, use the combination result. The calculator gives both so you do not have to switch tools.

Can I use this for lottery odds?

Yes, for the basic count of possible ticket combinations. For a typical lottery where you pick 6 numbers from 49, enter n = 49 and r = 6, and the calculator returns 13,983,816 combinations. That is the total number of distinct tickets. The probability of winning with one ticket is 1 divided by that number. However, this does not account for bonus numbers or additional prize tiers – those require more complex calculations.

What if I have repeated items?

Then the standard combination formula does not apply. For example, if you have 4 red balls and 3 blue balls and want to choose 2 balls, the number of distinct color combinations is not C(7,2). You must treat identical items as indistinguishable, which changes the counting method. This calculator assumes all n items are distinct, so it is not suitable for multiset problems.

What is the maximum n and r the calculator can handle?

There is no hard limit, but very large numbers will cause the factorial to overflow the calculator’s numeric precision. In practice, n and r up to about 170 work fine because 170! is near the maximum double-precision float value. Beyond that, results may be inaccurate or display in scientific notation. For exact large values, use a dedicated arbitrary-precision calculator.

How do I calculate combinations with repetition?

Use the formula C(n + r − 1, r). For example, choosing 3 flavors from 5 available flavors with repetition allowed gives C(5 + 3 − 1, 3) = C(7, 3) = 35. This counts combinations where the same item can be chosen multiple times. This calculator does not include that option, so you would need to compute it manually or use another tool.

Related

Formula used
in n | Total items (n) | - | 10 | 0
in r | Items chosen (r) | - | 3 | 0
out combos | Combinations (nCr) | - | fact(n) / (fact(r) * fact(n - r)) | 0
out perms | Permutations (nPr) | - | fact(n) / fact(n - r) | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.