Statistics Calculators
Combinations Calculator


Combinations Calculator

Free Combinations Calculator (nCr) to instantly find the number of ways to choose r items from n possibilities where order doesn't matter. Try it now!

Combinations

6

There was an error with your calculation.

Last updated: June 3, 2026

Table of Contents

  1. The rules for using the combinations calculator
  2. The fundamental principle of counting
    1. The rule of sum
    2. The rule of products
    3. Examples
  3. Sample Spaces
  4. Combination
    1. Example 1
    2. Example 2
  5. Permutation
    1. Example 3
  6. The Difference between Combinations and Permutations

Combinations Calculator

In mathematics, there are several strategies to determine the number of unique ways you can choose objects from a given set. But how exactly do you calculate the number of ways to pick r outcomes from n possibilities? The answer depends on two crucial factors: whether the order of your selection matters, and whether the values are allowed to repeat.

The number of ways to pick r unordered outcomes from n possibilities is known as a combination, mathematically denoted as C(n, r). This is also widely recognized as the binomial coefficient. Our combinations calculator (or nCr calculator) provides a fast and reliable way to calculate the exact number of combinations of r objects from a set of n objects.

The rules for using the combinations calculator

For any given set of objects, there is a specific number of ways to arrange or select them based on your required parameters. This calculator computes the number of ways you can select r objects from a set of n objects without repetition, specifically for scenarios where the order of selection does not matter.

To use the tool effectively, the calculator requires two primary inputs:

  • n = number of distinct objects to choose from, and
  • r = number of positions to fill.

An essential mathematical criterion for entering data into the combination calculator is that:

0 ≤ r ≤ n

If you input a value for r that is larger than n, the calculator will instantly prompt you with the message:

"Enter values where n ≥ r ≥ 0".

The fundamental principle of counting

The Fundamental Counting Principle is the mathematical backbone that guides us in finding the total number of ways to accomplish different sequential tasks. It is built upon two core rules of counting.

The rule of sum

If a first task can be completed in m ways, and a second task can be completed in n ways, but these tasks cannot be done simultaneously, the total number of possible ways to complete either task is counted as (m + n).

The rule of products

If a first task can be done in m ways and a second task can be done in n ways, and both tasks can be performed simultaneously (or one after the other), then there are (m × n) total ways of executing them.

Examples

Imagine a cafeteria that sells 3 kinds of pies (apple, strawberry, and blueberry) and 4 kinds of drinks (orange, grape, cherry, and pineapple juice). Both the drinks and the pies cost $2 each. If you only have exactly $2 in your pocket, you can only afford one item. Using the rule of sum, you have 3 + 4 = 7 different opportunities to make a single choice.

Now, suppose you want to find the number of ways to flip a coin and roll a standard die at the same time. The number of ways you can flip a coin is 2, since a coin has 2 faces. Likewise, there are 6 possible outcomes when you roll a die. Because you are performing both tasks simultaneously, the rule of products applies: there are 2 × 6 = 12 total ways to flip a coin and roll a die.

Similarly, if you want to draw 2 cards from a standard deck of 52 cards without replacing them, there are 52 possible ways to draw the first card, and 51 remaining ways to draw the second. Therefore, the total number of ways to draw those two unique cards is 52 × 51 = 2,652.

Sample Spaces

A sample space is a complete list of all possible outcomes in a given scenario, typically denoted by the capital letter S. For example, the sample space for flipping a coin and rolling a die simultaneously is:

S = {{H,1}, {H,2}, {H,3}, {H,4}, {H,5}, {H,6}, {T,1}, {T,2}, {T,3}, {T,4}, {T,5}, {T,6}}

As shown, there are exactly twelve possible outcomes. The fundamental counting principles allow us to easily calculate this total number of possibilities without having to manually map out the entire sample space.

Combination

A combination represents the number of possible ways to pick r non-repeating outcomes from n possibilities when the order of selection is entirely irrelevant. The combination of objects is written as C(n, r) and is commonly referred to as the binomial coefficient. The standard combination (nCr) formula is defined as:

$$C(n,r)=\frac{n!}{r!(n-r)!}$$

The exclamation mark (!) following a number or letter indicates a mathematical factorial. For example, n! represents the factorial of the number n—which is the product of all positive integers from 1 up to n. The factorial of 2 is 1 × 2. The factorial of 3 is 1 × 2 × 3. The factorial of 4 is 1 × 2 × 3 × 4, and so on. Note that factorials can only be calculated for non-negative integers.

The most critical characteristic of calculating combinations with this formula is that object repetition is not allowed, and the arrangement order does not matter.

Example 1

Suppose you have a simple set of four numbers:

{1, 2, 3, 4}

In how many unique ways can we combine two elements from this set if the same element cannot be repeated in a pair?

If the order of the elements mattered, we would be looking at groups formed by permutations:

(1,2), (1,3), (1,4), (2,1), (2,3), (2,4), (3,1), (3,2), (3,4), (4,1), (4,2), (4,3)

However, since the order does not matter in combinations, we eliminate the duplicates to get:

(1,2), (1,3), (1,4), (2,3), (2,4), (3,4)

This leaves us with 6 possible combinations. We can verify this using the combinations formula. In this example, $n=4$ and $r=2$. Therefore:

$$C(4,2)=\frac{4!}{2!(4-2)!}=\frac{4!}{2!2!}=\frac{4 × 3 × 2 × 1}{(2× 1)(2× 1)}=\frac{24}{4}=6$$

This manual calculation perfectly matches the results generated by our Combinations Calculator.

Example 2

What are the possible combinations of the letters A, B, C, and D when grouped in sets of 3? If order mattered (permutations), there would be 24 possible arrangements. However, in combinatorial counting, order is irrelevant. Because of this, only the unique groupings in the first row of the table below are relevant, giving us exactly 4 possible combinations.

ABC ABD ACD BCD
ACB ADB ADC BDC
BAC BAD CAD CBD
BCA BDA CDA CDB
CAB DAB DAC DBC
CBA DBA DCA DCB

Rather than tediously listing out all possible arrangements, we can quickly calculate the number of combinations using the nCr formula. Here, we have n=4 distinct objects, and we are taking r=3 at a time. Therefore:

$$C\left(n,r\right)=C\left(4,3\right)=\frac{4!}{\left(4-3\right)!3!}=\frac{4!}{1!3!}=4$$

Permutation

While combinations ignore order, a permutation defines the number of ways to organize and select objects when the order of those objects is strictly important. The standard formula for permutations (nPr) when selecting r objects from a pool of n distinct objects is:

$$P\left(n,r\right)=\frac{n!}{\left(n-r\right)!}$$

The two defining characteristics of calculating permutations using this formula are that object repetition is not allowed, and the specific sequence or order of the objects absolutely matters.

Example 3

Suppose there are 4 candidates in a job interview. The selection committee needs to rank all 4 candidates from 1st to 4th place. Here is how the possibilities break down:

  • 1st candidate - there are 4 ways to pick
  • 2nd candidate - there are 3 ways to pick
  • 3rd candidate - there are 2 ways to pick
  • 4th candidate - there is only one way to pick

Using the product rule of counting, the total number of ways to rank the candidates is 4 × 3 × 2 × 1 = 24, which is mathematically equivalent to 4!. Let's say the candidates are:

{A, B, C, D}

The sample space for this problem, displaying all 24 possible permutations, is outlined in the table below:

A in 1st place B in 1st place C in 1st place D in 1st place
ABCD BACD CABD DABC
ABDC BADC CADB DACB
ACBD BCAD CBAD DBAC
ACDB BCDA CBDA DBCA
ADBC BDAC CDAB DCAB
ADCB BDCA CDBA DCBA

Instead of mapping out all the potential sequences manually, we can calculate the exact number of arrangements using the permutations formula. For this example, there are n = 4 objects, and we are arranging r = 4 elements at a time. Therefore:

$$P\left(n,r\right)=P\left(4,4\right)=\frac{4!}{\left(4-4\right)!}=\frac{4!}{0!}=24$$

The Difference between Combinations and Permutations

When deciding which mathematical approach to use, remember this fundamental rule: the main difference between permutations and combinations is order. In combinations, the order of the selected elements is not important (e.g., picking a team). In permutations, the order of the selected elements is crucial (e.g., guessing a password or ranking candidates).