Combinations Calculator

Total number of items to choose from (0-25)
Number of items to select (r ≤ n)

Result:

Calculate combinations C(n,r) with our free online calculator. Perfect for selection problems, probability calculations, and situations where order doesn't matter.

What are Combinations?

Combinations count the number of ways to choose r items from a set of n items where order doesn't matter. Different orders of the same items are considered the same combination.

Combination Formula

C(n,r) = n! / (r!(n-r)!)
Also written as: (n choose r) or ⁿCᵣ
Symmetry: C(n,r) = C(n,n-r)

Combination Properties

Key Properties
  • Order doesn't matter: ABC = BCA
  • C(n,0) = 1 (empty selection)
  • C(n,1) = n (choose one)
  • C(n,n) = 1 (choose all)
  • C(n,r) = C(n,n-r) (symmetry)
Relationship to Permutations
  • C(n,r) = P(n,r) / r!
  • Fewer combinations: Than permutations
  • Factor difference: r! times fewer
  • Pascal's triangle: Each entry is C(n,r)
  • Binomial coefficients: Used in expansions

Step-by-Step Examples

Problem: How many ways to choose 3 people from a group of 5?

Solution: C(5,3) = 5! / (3!(5-3)!) = 5! / (3!2!)

Calculation:

C(5,3) = (5 × 4 × 3 × 2 × 1) / ((3 × 2 × 1) × (2 × 1))

C(5,3) = 120 / (6 × 2) = 120 / 12 = 10

Alternative: C(5,3) = (5 × 4 × 3) / (3 × 2 × 1) = 60 / 6 = 10

Answer: 10 different combinations

Problem: Choose 2 letters from {A, B, C, D}

Formula: C(4,2) = 4! / (2!(4-2)!) = 4!/(2!2!) = 24/(2×2) = 6

All combinations:

  • AB (same as BA)
  • AC (same as CA)
  • AD (same as DA)
  • BC (same as CB)
  • BD (same as DB)
  • CD (same as DC)

Count: 6 combinations

Note: Order doesn't matter, so AB = BA

Problem: Lottery - choose 6 numbers from 49

Formula: C(49,6) = 49! / (6! × 43!)

Efficient calculation:

C(49,6) = (49 × 48 × 47 × 46 × 45 × 44) / (6 × 5 × 4 × 3 × 2 × 1)

C(49,6) = 10,068,347,520 / 720 = 13,983,816

Result: Almost 14 million different combinations!

Probability: 1 in 13,983,816 chance of winning

Common Combination Values

C(n,r) Value Description Common Use
C(5,2)10Choose 2 from 5Small team selection
C(6,3)20Choose 3 from 6Committee formation
C(7,3)35Choose 3 from 7Menu combinations
C(10,2)45Choose 2 from 10Pairings
C(10,3)120Choose 3 from 10Project teams
C(12,4)495Choose 4 from 12Card hands
C(20,5)15,504Choose 5 from 20Survey samples
C(52,5)2,598,9605-card poker handCard games

Real-World Applications

Games & Probability
  • Lottery number selection
  • Poker hand probabilities
  • Bingo game outcomes
  • Raffle ticket combinations
  • Board game possibilities
Group Selection
  • Team formation
  • Committee selection
  • Study group creation
  • Project partnerships
  • Interview panel selection
Science & Research
  • Clinical trial design
  • Sample selection methods
  • Experimental combinations
  • Hypothesis testing scenarios
  • Data analysis subsets

Combinations vs Permutations Comparison

Aspect Combinations C(n,r) Permutations P(n,r)
Order matters? No - ABC = BCA Yes - ABC ≠ BCA
Formula n! / (r!(n-r)!) n! / (n-r)!
Result size Smaller Larger
Example C(4,2) 6 combinations 12 permutations
Use cases Team selection, lottery Rankings, sequences

Computational Efficiency

Naive Method
def combination(n, r):
    return factorial(n) / 
           (factorial(r) * 
            factorial(n-r))

Problem: Large factorials overflow
Use: Small values only

Multiplicative Method
def combination(n, r):
    if r > n-r: r = n-r
    result = 1
    for i in range(r):
        result *= (n-i)
        result //= (i+1)
    return result

Advantage: No large factorials
Use: Most efficient

Pascal's Triangle
def combination(n, r):
    # Build Pascal's triangle
    # C[i][j] = C[i-1][j-1] + 
    #           C[i-1][j]
    # Return C[n][r]

Advantage: Multiple values at once
Use: When computing many C(n,r)

Special Combination Identities

🧮 Mathematical Identities
Basic Identities:
  • Symmetry: C(n,r) = C(n,n-r)
  • Pascal's identity: C(n,r) = C(n-1,r-1) + C(n-1,r)
  • Sum identity: C(n,0) + C(n,1) + ... + C(n,n) = 2ⁿ
  • Hockey stick: C(r,r) + C(r+1,r) + ... + C(n,r) = C(n+1,r+1)
Advanced Identities:
  • Vandermonde: C(m+n,r) = Σ C(m,k)C(n,r-k)
  • Absorption: n × C(n-1,r-1) = r × C(n,r)
  • Committee-chairman: r × C(n,r) = n × C(n-1,r-1)
  • Inclusion-exclusion: Used for restricted selections

Frequently Asked Questions (FAQ)

Use combinations when order doesn't matter:

  • Team selection: Choosing 5 players from 12 (the order you pick doesn't matter)
  • Lottery tickets: Numbers 1,2,3,4,5,6 same as 6,5,4,3,2,1
  • Committee formation: Selecting members regardless of roles
  • Menu choices: Picking 3 toppings from 10 available
  • Key question: If rearranging your selection gives the same result, use combinations

This symmetry exists because choosing items is the same as choosing what to leave out:

  • Logical reasoning: Choosing 3 from 5 is the same as choosing which 2 to leave out
  • Mathematical proof: C(n,r) = n!/(r!(n-r)!) = n!/((n-r)!r!) = C(n,n-r)
  • Example: C(10,3) = C(10,7) = 120
  • Practical benefit: Always compute the smaller of r or n-r for efficiency
  • Pascal's triangle: This symmetry is why the triangle is symmetric

For large combinations, use the multiplicative method to avoid overflow:

  • Don't compute factorials directly: 50! is too large for most computers
  • Use symmetry: C(50,25) = C(50,25), but C(50,5) = C(50,45) - compute C(50,5)
  • Multiplicative formula: C(n,r) = (n×(n-1)×...×(n-r+1)) / (r×(r-1)×...×1)
  • Alternate multiply and divide: Prevents intermediate overflow
  • Use logarithms: For very large values, work with log(C(n,r))
  • Software tools: Mathematical software handles arbitrary precision

Combinations are fundamental to calculating probabilities:

  • Basic probability: P(event) = favorable outcomes / total outcomes
  • Favorable outcomes: Often calculated using combinations
  • Example: Probability of exactly 3 heads in 5 coin flips = C(5,3)/2⁵
  • Binomial distribution: P(X=k) = C(n,k) × p^k × (1-p)^(n-k)
  • Hypergeometric distribution: Sampling without replacement
  • Card probabilities: Poker hands, bridge distributions

Yes! Combinations with repetition have a different formula:

  • Standard combinations (this calculator): Each item can be chosen at most once
  • With repetition: Items can be chosen multiple times
  • Formula with repetition: C(n+r-1,r) = C(n+r-1,n-1)
  • Example: Choose 3 candies from 4 types (can repeat): C(4+3-1,3) = C(6,3) = 20
  • Applications: Ice cream scoops, pizza toppings with doubles
  • Also called: Multiset coefficients or "stars and bars"

Related Calculators


Calculator Categories

Explore our comprehensive collection of calculation tools organized by category. Find exactly what you need for math, science, finance, health, and more.

26

Categories
100+ Calculators
Instant Results
Search Calculators

All Categories

Choose from our specialized calculator categories

Algebra

Comprehensive algebra calculators for equations, roots, exponents, logarithms, and more

22 calculators
Explore Algebra
Area Converters

Convert between different area units including square feet, square meters, and acres

2 calculators
Explore Area Converters
Chemistry

<p>Chemistry can be a complex subject, but it doesn't have to be overwhelming! With our powerful ch…

1 calculator
Explore Chemistry
Construction

Construction calculators.

1 calculator
Explore Construction
Conversions

In today's interconnected world, converting units and measurements is a common task. But who has ti…

23 calculators
Explore Conversions
Cooking Converters

Convert between cooking measurement units including teaspoons, tablespoons, cups, and ounces

5 calculators
Explore Cooking Converters
Data Storage Converters

Convert between different data storage units including bytes, kilobytes, megabytes, and gigabytes

2 calculators
Explore Data Storage Converters
Energy Converters

Convert between different energy units including joules, calories, kWh, and BTU

1 calculator
Explore Energy Converters
Everyday Life

<p>In our busy daily lives, we often encounter situations that require quick calculations. Whether …

6 calculators
Explore Everyday Life
Finance

<p>Our finance calculators help you make smart choices about money. Whether you're saving up for so…

3 calculators
Explore Finance
Fractions

Comprehensive fraction calculators for all fraction operations

16 calculators
Explore Fractions
Health

<p>Keeping track of your health can be a challenge, but it doesn't have to be! With our amazing hea…

3 calculators
Explore Health
Length Converters

Convert between different length and distance units including meters, feet, inches, and miles

5 calculators
Explore Length Converters
Maths

Math can seem like a tough subject, but it doesn't have to be! With our awesome math calculator, yo…

87 calculators
Explore Maths
Percentage

Comprehensive percentage calculators for discounts, taxes, tips, and voting calculations

4 calculators
Explore Percentage
Physics Converters

Convert between physics units including acceleration, force, density, and angles

4 calculators
Explore Physics Converters
Power Converters

Convert between different power units including watts, horsepower, and BTU/hr

1 calculator
Explore Power Converters
Pressure Converters

Convert between different pressure units including PSI, bar, and atmospheres

2 calculators
Explore Pressure Converters
Speed Converters

Convert between different speed units including mph, kph, m/s, and knots

1 calculator
Explore Speed Converters
Sports

p>In the world of sports, even the slightest edge can make a big difference. Whether you're a profe…

1 calculator
Explore Sports
Statistics

Statistical calculators for data analysis, probability, and descriptive statistics

16 calculators
Explore Statistics
Temperature Converters

Convert between Celsius, Fahrenheit, and Kelvin temperature scales

3 calculators
Explore Temperature Converters
Time Converters

Convert between different time units including seconds, minutes, hours, days, and years

5 calculators
Explore Time Converters
Time and Date

<p>Keeping track of dates, times, and schedules can be a daunting task. Whether you're planning a p…

3 calculators
Explore Time and Date
Volume Converters

Convert between different volume and capacity units including liters, gallons, cups, and milliliters

8 calculators
Explore Volume Converters
Weight Converters

Convert between different weight and mass units including pounds, kilograms, ounces, and grams

4 calculators
Explore Weight Converters