Home/Calculators/Combinations Calculator

Combinations Calculator

Calculate combinations (nCr) and permutations (nPr) with step-by-step solutions. Perfect for probability, statistics, and combinatorics problems.

Enter Values

Maximum value: 170

Must be ≤ n

Formula:

C(n, r) =
n!r! × (n − r)!

Enter values and click Calculate to see results

Choose between combinations (nCr) or permutations (nPr)

Understanding Combinations and Permutations

Combinations and permutations are fundamental concepts in combinatorics, the branch of mathematics dealing with counting, arrangement, and selection. Our comprehensive combinations calculator helps you quickly compute both combinations (nCr) and permutations (nPr) with detailed step-by-step solutions, making it perfect for students, educators, statisticians, and anyone working with probability and counting problems.

The key difference between combinations and permutations lies in whether the order of selection matters. Combinations are used when order doesn't matter (like choosing lottery numbers), while permutations are used when order is important (like arranging books on a shelf).

This calculator uses precise mathematical formulas to compute exact results, displaying the full working process so you can understand not just the answer, but how it was derived. Whether you're solving probability problems, analyzing statistical scenarios, or working on discrete mathematics assignments, this tool provides accurate results with educational value.

What is a Combination?

A combination is a selection of items from a larger set where the order of selection does not matter. When we calculate C(n, r) or nCr, we're determining the number of ways to choose r items from a set of n items, regardless of the order in which they are chosen.

Combination Formula:

n!r! × (n − r)!

Where n! represents n factorial (n × (n-1) × (n-2) × ... × 1)

For example, if you have 5 different fruits and want to choose 3 of them for a fruit salad, the number of different combinations is C(5, 3) = 10. The selection (apple, banana, orange) is the same as (orange, apple, banana) because order doesn't matter in combinations.

What is a Permutation?

A permutation is an arrangement of items from a larger set where the order of arrangement matters. When we calculate P(n, r) or nPr, we're determining the number of ways to arrange r items selected from a set of n items, taking into account the different orders.

Permutation Formula:

n!(n − r)!

The number of ordered arrangements of r items from n total items

For example, if you have 5 runners in a race and want to know how many different ways the top 3 positions can be filled, you calculate P(5, 3) = 60. Here, the arrangement (Alice, Bob, Charlie) is different from (Bob, Alice, Charlie) because order matters in permutations.

How to Use This Calculator

  1. 1
    Select Calculation Type:

    Choose whether you need to calculate a combination (nCr) where order doesn't matter, or a permutation (nPr) where order is important.

  2. 2
    Enter n (Total Items):

    Input the total number of items in your set. This must be a non-negative integer (maximum 170 to avoid computational overflow).

  3. 3
    Enter r (Items to Select):

    Input the number of items you want to choose or arrange. This value must be less than or equal to n.

  4. 4
    Click Calculate:

    The calculator will compute your result and display both the combination and permutation values, along with detailed step-by-step solutions showing all calculations.

  5. 5
    Review Results:

    Examine the answer, step-by-step solution, formula breakdown, and factorial calculations to fully understand the process.

Combinations vs Permutations: Key Differences

Understanding when to use combinations versus permutations is crucial for solving counting problems correctly. Here's a comprehensive comparison:

AspectCombination (nCr)Permutation (nPr)
Order Matters?NoYes
Formulan! / (r! × (n-r)!)n! / (n-r)!
Result SizeSmaller (fewer possibilities)Larger (more arrangements)
ExampleChoosing 3 lottery numbers from 10Arranging top 3 winners from 10 contestants
RelationshipP(n,r) = C(n,r) × r!

💡 Quick Tip:

Ask yourself: "Does the order of selection matter?" If yes, use permutations. If no, use combinations. For example, a handshake between person A and person B is the same as between B and A (combination), but person A arriving before person B is different from B arriving before A (permutation).

Step-by-Step Calculation Guide

Calculating Combinations (nCr):

Example: Calculate C(7, 3)

  1. Step 1: Identify n = 7 and r = 3
  2. Step 2: Apply the formula: C(7, 3) = 7! / (3! × (7-3)!) = 7! / (3! × 4!)
  3. Step 3: Calculate factorials:
    • 7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5,040
    • 3! = 3 × 2 × 1 = 6
    • 4! = 4 × 3 × 2 × 1 = 24
  4. Step 4: Substitute: C(7, 3) = 5,040 / (6 × 24) = 5,040 / 144
  5. Step 5: Simplify: C(7, 3) = 35

Result: There are 35 ways to choose 3 items from 7 items.

Calculating Permutations (nPr):

Example: Calculate P(7, 3)

  1. Step 1: Identify n = 7 and r = 3
  2. Step 2: Apply the formula: P(7, 3) = 7! / (7-3)! = 7! / 4!
  3. Step 3: Calculate factorials:
    • 7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5,040
    • 4! = 4 × 3 × 2 × 1 = 24
  4. Step 4: Substitute: P(7, 3) = 5,040 / 24
  5. Step 5: Simplify: P(7, 3) = 210

Result: There are 210 ways to arrange 3 items from 7 items.

Real-World Applications

Lottery and Gaming

Calculate the odds of winning lottery games by determining the number of possible combinations. For example, in a lottery where you choose 6 numbers from 49, there are C(49, 6) = 13,983,816 possible combinations.

Committee Selection

Determine how many ways a committee can be formed from a larger group. For instance, selecting a 5-person committee from 12 employees uses combinations since the order of selection doesn't matter.

Password & Security

Calculate the number of possible passwords or PIN combinations. If a 4-digit PIN uses unique digits from 0-9, there are P(10, 4) = 5,040 possible permutations.

Sports Tournaments

Determine the number of possible match-ups or tournament brackets. In a league with 8 teams, there are C(8, 2) = 28 possible pairings for matches.

Genetics & Biology

Calculate genetic combinations and probability of trait inheritance. Understanding combinations helps predict offspring genotypes and phenotypes in Mendelian genetics.

Menu Planning

Restaurants use combinations to determine how many different meal combinations can be created from available ingredients or how many different combos can be offered to customers.

Common Mistakes to Avoid

❌ Mistake 1: Confusing Combinations and Permutations

Wrong: Using combinations when order matters, or permutations when it doesn't.

Correct: Always ask "Does order matter?" If yes, use permutations (nPr). If no, use combinations (nCr).

❌ Mistake 2: Incorrect Formula Application

Wrong: Forgetting to divide by r! in the combination formula.

Correct: Remember that C(n,r) = n!/(r!×(n-r)!) while P(n,r) = n!/(n-r)!

❌ Mistake 3: Invalid Input Values

Wrong: Setting r greater than n, or using negative numbers.

Correct: Ensure 0 ≤ r ≤ n and both values are non-negative integers.

❌ Mistake 4: Calculation Errors with Large Factorials

Wrong: Calculating factorials sequentially without simplification.

Correct: Simplify before calculating. For C(50,2), use (50×49)/2 instead of calculating 50!, 2!, and 48! separately.

❌ Mistake 5: Misunderstanding Special Cases

Wrong: Forgetting that C(n,0) = 1 and C(n,n) = 1.

Correct: Remember these special cases: C(n,0) = 1 (one way to choose nothing), C(n,n) = 1 (one way to choose everything), and C(n,1) = n.

❌ Mistake 6: Ignoring Problem Context

Wrong: Not reading the problem carefully to determine if order matters.

Correct: Look for keywords like "arrange," "sequence," or "rank" (permutation) versus "select," "choose," or "group" (combination).

Tips and Tricks

✨ Simplification Shortcut

For C(n,r), you can simplify by canceling out the larger factorial terms. For example, C(10,2) = (10×9)/(2×1) = 45, much easier than calculating 10!, 2!, and 8! separately.

✨ Symmetry Property

C(n,r) = C(n, n-r). This means choosing r items is the same as choosing which (n-r) items to leave out. Use the smaller value for easier calculations.

✨ Quick Mental Math

For small values, memorize common combinations: C(5,2)=10, C(6,2)=15, C(7,2)=21. These appear frequently in problems and can save calculation time.

✨ Pascal's Triangle

The values of C(n,r) form Pascal's Triangle. Each number is the sum of the two numbers above it, which can be useful for finding combinations without direct calculation.

✨ Relationship Formula

Remember that P(n,r) = C(n,r) × r!. If you know one value, you can quickly calculate the other without repeating all calculations.

✨ Problem-Solving Strategy

When stuck, try listing out small examples manually. If you can see the pattern with small numbers, it's easier to identify whether you need combinations or permutations.

Important Properties and Special Cases

Identity Properties

  • C(n, 0) = 1 - There is exactly one way to choose nothing
  • C(n, n) = 1 - There is exactly one way to choose everything
  • C(n, 1) = n - There are n ways to choose one item from n items
  • C(n, r) = C(n, n-r) - Symmetry property (choosing r is same as leaving n-r)

Addition Property

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

This is the foundation of Pascal's Triangle. The number of ways to choose r items from n items equals the sum of choosing r-1 from n-1 (including a specific item) and choosing r from n-1 (excluding that item).

Relationship Between nCr and nPr

P(n, r) = C(n, r) × r!

The number of permutations equals the number of combinations multiplied by the number of ways to arrange r items (r factorial). This makes sense because for each combination, there are r! different orderings.

Binomial Theorem Connection

Combination values are also called binomial coefficients because they appear in the expansion of (a + b)ⁿ. The coefficient of aⁿ⁻ʳbʳ in this expansion is C(n, r).

Practice Problems

Test your understanding with these practice problems. Use our calculator to check your answers!

Problem 1: Beginner

A school committee needs to select 4 students from a group of 10 volunteers. How many different committees can be formed?Hint: Does the order of selection matter for a committee?

Problem 2: Beginner

In a race with 8 runners, how many different ways can the gold, silver, and bronze medals be awarded?Hint: Does finishing order matter for medal positions?

Problem 3: Intermediate

A pizza parlor offers 12 different toppings. If you want to create a pizza with exactly 5 toppings, how many different combinations are possible?Hint: Think about whether the order you add toppings matters.

Problem 4: Intermediate

How many different 4-letter "words" (including nonsense words) can be formed using the letters A, B, C, D, E, F without repeating any letter?Hint: Consider if ABCD is different from DCBA.

Problem 5: Advanced

In how many ways can a basketball team of 5 players be chosen from 12 players, if 2 specific players refuse to play together?Hint: Calculate total combinations, then subtract invalid combinations.

Problem 6: Advanced

A company has 7 employees. In how many ways can they form a leadership team consisting of a president, vice president, and secretary if no person can hold more than one position?Hint: Each position is distinct and matters.

Problem 7: Challenge

In a standard deck of 52 cards, how many different 5-card poker hands contain exactly 3 aces?Hint: You need to choose 3 aces from 4, and 2 other cards from the remaining 48.

Problem 8: Challenge

How many different ways can you arrange the letters in the word "MATHEMATICS" if you use all 11 letters?Hint: This involves permutations with repetition—some letters repeat!

Frequently Asked Questions

What is the difference between nCr and nPr?

nCr (combinations) is used when order doesn't matter—it counts the number of ways to choose r items from n items. nPr (permutations) is used when order matters—it counts the number of ways to arrange r items selected from n items. Always remember: P(n,r) = C(n,r) × r!, meaning there are r! different arrangements for each combination.

How do I know whether to use combinations or permutations?

Ask yourself: "Does the order of selection matter?" If rearranging the selected items creates a different outcome, use permutations. If rearranging doesn't create a new outcome, use combinations. For example, selecting team members uses combinations (the order you pick them doesn't matter), but assigning positions to team members uses permutations (position assignment order matters).

What does "n choose r" mean?

"n choose r" is another way to say C(n,r) or nCr. It represents the number of ways to choose r items from a set of n items, where order doesn't matter. For example, "5 choose 2" means C(5,2) = 10—there are 10 different ways to select 2 items from a group of 5 items.

Can r be greater than n in combinations?

No, r cannot be greater than n in standard combinations or permutations. You cannot choose or arrange more items than you have available. The valid range is 0 ≤ r ≤ n. If r > n, the result is mathematically defined as 0 (zero ways to choose more items than exist).

What is a factorial and how is it calculated?

A factorial, denoted by n!, is the product of all positive integers from 1 to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. By definition, 0! = 1 and 1! = 1. Factorials grow very rapidly—10! = 3,628,800 and 20! = 2,432,902,008,176,640,000. Our calculator handles factorials automatically in combination and permutation formulas.

Why is the calculator limited to n ≤ 170?

Factorials grow extremely large very quickly. 170! is approximately 7.26 × 10³⁰⁶, which is near the maximum value that can be stored in standard floating-point numbers. Beyond 170!, we encounter computational overflow errors. For most practical applications, values up to 170 are more than sufficient.

What are binomial coefficients?

Binomial coefficients are another name for combination values C(n,r). They're called this because they appear as coefficients in the binomial expansion of (a + b)ⁿ. For example, (a + b)³ = a³ + 3a²b + 3ab² + b³, where the coefficients 1, 3, 3, 1 are C(3,0), C(3,1), C(3,2), and C(3,3) respectively.

How is this calculator useful for probability?

Combinations are fundamental in probability calculations. The probability of an event is often calculated as (favorable outcomes)/(total possible outcomes). For example, the probability of drawing a specific 5-card poker hand is 1/C(52,5) because there are C(52,5) total possible hands. This calculator helps you quickly compute these values for probability problems.

What is Pascal's Triangle and how does it relate to combinations?

Pascal's Triangle is a triangular array where each number is the sum of the two numbers above it. Each row represents the combination values for a given n. Row 5, for example, shows: 1, 5, 10, 10, 5, 1, which are C(5,0), C(5,1), C(5,2), C(5,3), C(5,4), and C(5,5). It's a visual tool for understanding combination patterns and relationships.

Can this calculator handle combinations with repetition?

This calculator computes standard combinations without repetition (where each item can be chosen at most once). Combinations with repetition use a different formula: C(n+r-1, r). If you need combinations with repetition (like choosing ice cream flavors where you can pick the same flavor multiple times), you'll need to use the modified formula or a specialized calculator.

Conclusion

Our Combinations Calculator provides a powerful, user-friendly tool for solving combinatorics problems with precision and clarity. Whether you're a student learning about probability and counting principles, a teacher creating educational materials, a statistician analyzing data, or anyone working with mathematical combinations and permutations, this calculator delivers accurate results with comprehensive step-by-step explanations.

Understanding the difference between combinations and permutations is essential for correctly solving counting problems. By mastering these concepts and using our calculator to verify your work, you'll develop stronger problem-solving skills and mathematical intuition. The detailed solutions provided help you learn the methodology, not just get the answer.

Start using our calculator today to solve combinations and permutations quickly, check your homework, prepare for exams, or explore the fascinating world of combinatorics. With proper mathematical notation, factorial breakdowns, and clear explanations, learning and applying these important mathematical concepts has never been easier. Make this calculator your go-to tool for all combination and permutation calculations!

Need Help with Combinatorics and Probability?

Our expert tutors can help you master combinations, permutations, probability theory, and discrete mathematics. Get personalized one-on-one guidance tailored to your learning style.