Best Calculator Hub

Combination Calculator

Calculate the number of ways to choose r elements from a set of n elements, where order doesn't matter.

Enter Values

Combination Formula

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

How the formula works:

  1. Calculate the factorial of n: n!
  2. Calculate the factorial of r: r!
  3. Calculate the factorial of (n-r): (n-r)!
  4. Divide n! by the product of r! and (n-r)!

This formula gives the number of ways to select r objects from a set of n distinct objects, where the order of selection doesn't matter.

Combination Result

10

There are 10 ways to choose 3 elements from a set of 5 elements.

Step-by-step Calculation:

This means that if you have a set of 5 distinct elements, there are 10 different possible combinations when selecting 3 elements, regardless of the order in which they are selected.

What are Combinations?
Applications
Combinations vs. Permutations
Properties & Identities

What are Combinations?

A combination is a selection of items from a collection, such that the order of selection does not matter. In mathematics, a combination is a way of selecting several things out of a larger group, where order doesn't matter.

For example, if we have a set {a, b, c, d, e} and we want to select 3 elements, the combinations {a, b, c}, {b, a, c}, and {c, a, b} are all considered the same combination because they contain the same elements.

The number of ways to choose r elements from a set of n elements is given by the combination formula:

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

where n! represents the factorial of n, which is the product of all positive integers less than or equal to n.

Applications of Combinations

Combinations are used in many areas of mathematics and real-world applications:

  • Probability and Statistics: Calculating the probability of selecting specific items from a group
  • Lottery and Gambling: Determining the number of possible combinations in games like lotto, poker, etc.
  • Sports: Calculating tournament structures, team selections, and matchups
  • Genetics: Analyzing gene combinations and inheritance patterns
  • Cryptography: Creating secure combinations for encryption algorithms
  • Finance: Portfolio selection and risk management
  • Computer Science: Algorithm analysis, computational complexity, and data structures
  • Chemistry: Molecular structures and compound formation

For example, in a lottery where 6 numbers are drawn from 49, the number of possible combinations is C(49,6) = 13,983,816, which explains why winning the lottery is so unlikely.

Combinations vs. Permutations

The key difference between combinations and permutations is whether the order of the selected elements matters:

  • Combinations: Order does NOT matter. Example: Selecting a committee of 3 people from a group of 10 people - it doesn't matter in what order they were selected.
  • Permutations: Order DOES matter. Example: Selecting a 1st, 2nd, and 3rd place winner from 10 contestants - the order is important.

Formula comparison:

Combination: C(n,r) = n! / (r! × (n-r)!)

Permutation: P(n,r) = n! / (n-r)!

For example, if we have the set {a, b, c} and want to select 2 elements:

  • Combinations (order doesn't matter): {a,b}, {a,c}, {b,c} - There are 3 combinations.
  • Permutations (order matters): (a,b), (b,a), (a,c), (c,a), (b,c), (c,b) - There are 6 permutations.

In general, for any set: P(n,r) = C(n,r) × r!

Properties and Identities of Combinations

Combinations have several important properties and identities that are useful in solving problems:

  • Symmetry Property: C(n,r) = C(n,n-r)
    Example: C(8,3) = C(8,5) = 56
  • Identity Property: C(n,0) = C(n,n) = 1
    There is only 1 way to select 0 elements or all n elements.
  • Pascal's Identity: C(n,r) = C(n-1,r-1) + C(n-1,r)
    The basis for building Pascal's triangle.
  • Sum of Combinations: C(n,0) + C(n,1) + ... + C(n,n) = 2^n
    The total number of all possible subsets of a set with n elements.
  • Complementary Counting: Often it's easier to count the complement of a set rather than the set itself.

Pascal's Triangle: Each number in Pascal's triangle is the sum of the two numbers directly above it, and each row represents the combinations C(n,r) for a fixed n and varying r.

These properties can help simplify complex counting problems and are fundamental to combinatorial mathematics.

Picture of Dr. Evelyn Carter

Dr. Evelyn Carter

Author | Chief Calculations Architect & Multi-Disciplinary Analyst

Combination Calculator: Understanding and Computing Mathematical Combinations

Our comprehensive combination calculator provides a simple way to determine how many different possible combinations can be formed when selecting elements from a set. Whether you’re analyzing probability, working on statistical problems, or planning combinations for games or lotteries, this tool offers intuitive calculation with step-by-step explanations.

Thank you for reading this post, don't forget to subscribe!

What is a Combination?

A combination is a selection of items from a larger set, where the order of selection does not matter. Unlike permutations, combinations only concern themselves with which items are selected, not the sequence in which they appear.

Key Concepts in Combinations

  • Notation: C(n,r), nCr, or $\binom{n}{r}$ all represent the number of ways to choose r items from n items
  • Formula: C(n,r) = n! / [r! × (n-r)!]
  • Order irrelevance: The arrangement of the selected items doesn’t affect the count
  • Symmetric property: C(n,r) = C(n,n-r)
  • Base cases: C(n,0) = C(n,n) = 1

The combination formula counts the number of different ways to select r objects from a set of n distinct objects, where order doesn’t matter. This has applications ranging from probability theory to combinatorial optimization problems.

How to Use the Combination Calculator

Using our calculator is straightforward and designed for both beginners and advanced users:

Step 1: Enter the Set Size (n)

Input the total number of elements in your set. This represents how many distinct items you have to choose from.

Step 2: Enter the Subset Size (r)

Input how many elements you want to select from the set. This must be less than or equal to the set size.

Step 3: Calculate and View Results

Click the “Calculate” button to see the number of possible combinations. The calculator will also show you the step-by-step calculation process.

The calculator automatically handles large numbers and provides clear explanations for each computation step, making it easy to understand how combinations work.

Combination Formula Explained

The formula for calculating combinations is:

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

Where:

  • n is the total number of elements in the set
  • r is the number of elements being selected
  • n! represents the factorial of n (the product of all positive integers less than or equal to n)

Step-by-Step Example

Let’s calculate C(5,2), the number of ways to select 2 elements from a set of 5:

  1. Calculate 5! = 5 × 4 × 3 × 2 × 1 = 120
  2. Calculate 2! = 2 × 1 = 2
  3. Calculate (5-2)! = 3! = 3 × 2 × 1 = 6
  4. Apply the formula: C(5,2) = 5! / [2! × (5-2)!] = 120 / (2 × 6) = 120 / 12 = 10

Therefore, there are 10 different ways to select 2 elements from a set of 5 elements.

Combinations vs. Permutations: Understanding the Difference

One of the most common points of confusion in combinatorics is the distinction between combinations and permutations:

Aspect Combinations Permutations
Order Importance Order doesn’t matter Order matters
Formula C(n,r) = n! / [r! × (n-r)!] P(n,r) = n! / (n-r)!
Example Selecting a poker hand Ranking finalists in a competition
Relationship C(n,r) P(n,r) = C(n,r) × r!

For instance, if you’re selecting a committee of 3 people from a group of 10, you’d use combinations because the order of selection doesn’t matter. However, if you’re assigning 3 people to the positions of president, vice president, and secretary from a group of 10, you’d use permutations because the order matters.

Common Applications of Combinations

Combinations have numerous practical applications across various fields:

Probability & Statistics

  • Calculating the probability of specific outcomes in random sampling
  • Determining possible arrangements in experimental design
  • Analyzing distribution models and hypothesis testing

Games & Lotteries

  • Computing possible lottery number combinations
  • Analyzing card game probabilities (poker hands, bridge hands)
  • Calculating game strategy outcomes

Computer Science

  • Algorithm design and analysis
  • Cryptography and security systems
  • Data structure optimization

Finance & Business

  • Portfolio analysis and optimization
  • Risk assessment models
  • Team formation and project assignment

Example: Lottery Probability

In a standard 6/49 lottery, where 6 numbers are drawn from a set of 49 numbers, the total number of possible combinations is:

C(49,6) = 49! / [6! × (49-6)!] = 49! / [6! × 43!] = 13,983,816

This means the probability of winning with a single ticket is 1 in 13,983,816—explaining why lottery jackpots are so difficult to win.

Important Properties of Combinations

Understanding these key properties can simplify complex combination problems:

Symmetry Property

C(n,r) = C(n,n-r)

This means the number of ways to select r items from n items equals the number of ways to select (n-r) items from n items. For example, C(8,3) = C(8,5) = 56.

Pascal’s Identity

C(n,r) = C(n-1,r-1) + C(n-1,r)

This identity forms the basis of Pascal’s Triangle and provides a recursive way to calculate combinations.

Sum of Combinations

C(n,0) + C(n,1) + … + C(n,n) = 2^n

The sum of all combinations over a set of n elements equals 2^n, which is the total number of subsets (including the empty set and the full set).

Hockey-Stick Identity

C(r,r) + C(r+1,r) + C(r+2,r) + … + C(n,r) = C(n+1,r+1)

This identity is useful for summing diagonal entries in Pascal’s Triangle.

Solving Complex Combination Problems

For more advanced applications, these techniques can help solve complex combination problems:

Complementary Counting

Sometimes it’s easier to count the complement of what you’re looking for and then subtract from the total. For example, to find the number of ways to select at least one red ball from a set of 5 red and 7 blue balls, compute:

Total ways – Ways to select no red balls = C(12,3) – C(7,3)

The Multiplication Principle

When dealing with multiple independent selection processes, multiply the number of ways for each process. For instance, if selecting r items from set A and s items from set B:

C(n,r) × C(m,s) = Number of ways to select r items from set A and s items from set B

Partitioning Problems

For problems involving distributing n distinct objects into k distinct groups with sizes r₁, r₂, …, rₖ (where r₁ + r₂ + … + rₖ = n), use:

n! / (r₁! × r₂! × … × rₖ!)

Examples of Common Combination Problems

Example 1: Committee Selection

Problem: From a group of 15 people, how many ways can a committee of 4 be formed?

Solution: C(15,4) = 15! / [4! × 11!] = 1,365

There are 1,365 different possible committees of 4 people that can be formed from a group of 15 people.

Example 2: Card Hands

Problem: In a standard 52-card deck, how many 5-card poker hands are possible?

Solution: C(52,5) = 52! / [5! × 47!] = 2,598,960

There are 2,598,960 different possible 5-card poker hands.

Example 3: Team Arrangement

Problem: From 12 students, how many ways can we select 5 students for team A and 7 students for team B?

Solution: C(12,5) = 12! / [5! × 7!] = 792

Note that once we’ve selected 5 students for team A, the remaining 7 must go to team B, so this equals C(12,7) due to the symmetry property.

Frequently Asked Questions About Combinations

What is the difference between nPr and nCr?

nPr represents permutations (order matters) and equals n!/(n-r)!. nCr represents combinations (order doesn’t matter) and equals n!/[r!(n-r)!]. The relationship between them is nPr = nCr × r!, meaning permutations equal combinations multiplied by all possible arrangements of the chosen elements.

Why does the formula for combinations include r! in the denominator?

The r! term in the denominator accounts for the fact that in combinations, the order doesn’t matter. When we calculate n!/(n-r)!, we’re counting each possible selection r! times (once for each possible ordering of the r selected elements). Dividing by r! eliminates this overcounting, giving us each unique selection exactly once.

Can I calculate combinations with repetition allowed?

Yes, this is called “combinations with repetition” or “multisets.” The formula is different: C(n+r-1,r). For example, if you want to select 3 scoops of ice cream from 8 flavors, where you can pick the same flavor multiple times, you’d calculate C(8+3-1,3) = C(10,3) = 120 possible combinations.

How do I solve a combination problem with restrictions?

For problems with restrictions, you can use the principle of inclusion-exclusion or the complementary counting method. For example, to find the number of ways to select 5 people from 10 men and 8 women, with at least 2 women, you’d calculate: C(18,5) – [C(10,5) + C(10,4)×C(8,1) + C(10,3)×C(8,2)]. Alternatively, sum the valid cases: C(10,3)×C(8,2) + C(10,2)×C(8,3) + C(10,1)×C(8,4) + C(10,0)×C(8,5).

What happens when n equals r in the combination formula?

When n equals r, we have C(n,n) = n!/[n!×0!] = 1 (since 0! = 1 by definition). This makes intuitive sense: there is exactly one way to select all n elements from a set of n elements. Similarly, C(n,0) = 1, as there is exactly one way to select no elements (the empty set).

Mathematical Disclaimer

This Combination Calculator is designed for educational and reference purposes. While our calculator handles a wide range of values accurately, calculations involving extremely large numbers may be subject to computational limitations.

The calculator implements optimizations to handle larger values than basic methods would allow, but for values where n or r exceed 170, some approximations may be used due to the limitations of floating-point arithmetic.

Always verify critical calculations through multiple methods for important applications.

Last Updated: April 4, 2025 | Next Review: April 4, 2026

AI Engine Chatbot
Calculator Assistant:
Hi! What calculations will we do today?