Skip to main content
math

Combination Calculator

Calculate the number of ways to choose r items from n items where order does not matter. Uses the formula C(n,r) = n!/(r!(n-r)!)

Reviewed by Christopher FloiedPublished Updated

This free online combination calculator provides instant results with no signup required. All calculations run directly in your browser — your data is never sent to a server. Enter your values below and see results update in real time as you type. Perfect for everyday calculations, homework, or professional use.

Minimum: 0

Minimum: 0

Results

Number of Combinations C(n,r)

3e+6

How to Use This Calculator

1

Enter your input values

Fill in all required input fields for the Combination Calculator. Most fields include unit selectors so you can work in your preferred unit system — metric or imperial, whichever matches your problem.

2

Review your inputs

Double-check that all values are correct and that you have selected the right units for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.

3

Read the results

The Combination Calculator instantly computes the output and displays results with units clearly labeled. All calculations happen in your browser — no loading time and no data sent to a server.

4

Explore parameter sensitivity

Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.

When to Use This Calculator

  • Use the Combination Calculator when you need a quick mathematical result without writing out all the steps manually, saving time on repetitive calculations.
  • Use it to verify hand calculations on tests or assignments and catch arithmetic mistakes.
  • Use it when teaching or explaining mathematical concepts to others, demonstrating how changing inputs affects the result.
  • Use it to explore the behavior of mathematical functions across a range of inputs.

About Combination Calculator

The Combination Calculator answers the classic question: 'In how many ways can I choose r items from a set of n?' — when the order of selection doesn't matter. This is different from permutations, where sequence matters. Combinations are the right tool for counting poker hands, lottery tickets, committees, subsets, choosing team members, selecting items from a menu, and countless probability problems. The binomial coefficient C(n,r), also written (n choose r), is one of the most frequently used formulas in combinatorics, probability, statistics, and computer science. If you've ever calculated the odds of winning the lottery, analyzed a card game, or estimated failure rates in quality control, you've used combinations.

The Math Behind It

A combination is a selection of items from a set where the order does not matter. The number of ways to choose r items from n distinct items is denoted C(n,r), nCr, or (n choose r). **The Formula**: C(n,r) = n! / (r! × (n-r)!) Where: - n! = n factorial - r! = factorial of chosen items - (n-r)! = factorial of items not chosen **Derivation from Permutations**: Start with P(n,r) permutations — ordered arrangements. Each set of r items can be arranged in r! ways, so dividing by r! gives us the count where order doesn't matter: C(n,r) = P(n,r) / r! = n! / [r! × (n-r)!] **Fundamental Identity**: C(n,r) = C(n, n-r) In other words, choosing r items is the same as NOT choosing (n-r) items. Example: C(10,3) = C(10,7) = 120. **Pascal's Triangle**: Combinations form Pascal's triangle: ``` 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 ``` Each entry is C(row, column). Pascal's identity: C(n,r) = C(n-1,r-1) + C(n-1,r) **Key Applications**: **Poker Hands (from 52 cards, choose 5)**: - Total hands: C(52,5) = 2,598,960 - Royal flush: 4 - Straight flush: 36 - Four of a kind: 624 - Full house: 3,744 - Flush: 5,108 - Straight: 10,200 - Three of a kind: 54,912 - Two pair: 123,552 - One pair: 1,098,240 - High card: 1,302,540 **Lottery Odds**: Mega Millions: Choose 5 from 70 white balls, plus 1 from 25 gold: - C(70,5) × 25 = 12,103,014 × 25 = 302,575,350 - Odds: 1 in 302 million of matching the jackpot **Binomial Theorem**: (x + y)^n = Σ C(n,k) × x^k × y^(n-k) for k=0 to n This is why combinations are called binomial coefficients. **Committee Selection**: How many different committees of 4 can be formed from 15 people? C(15,4) = 1,365 **Special Cases**: - C(n,0) = 1 (one way to choose nothing) - C(n,n) = 1 (one way to choose everything) - C(n,1) = n (n ways to choose one) - C(n,r) = 0 if r > n (can't choose more than you have) **When to use combinations**: 1. 'How many ways to pick...' 2. 'How many subsets of size...' 3. 'How many possible teams...' 4. 'How many different hands...' 5. 'In how many ways can we group...'

Formula Reference

Combination Formula

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

Variables: n = total items, r = items chosen, order does NOT matter

Worked Examples

Example 1: Poker Hands

How many different 5-card poker hands are possible from a standard 52-card deck?

Step 1:n = 52, r = 5
Step 2:C(52,5) = 52! / (5! × 47!)
Step 3:C(52,5) = (52 × 51 × 50 × 49 × 48) / (5 × 4 × 3 × 2 × 1)
Step 4:C(52,5) = 311,875,200 / 120
Step 5:C(52,5) = 2,598,960

2,598,960 different 5-card poker hands. This is why calculating probabilities for specific hands (royal flush = 4/2,598,960 ≈ 0.00015%) is feasible.

Example 2: Committee Formation

From a department of 20 people, how many ways can a committee of 5 be formed?

Step 1:n = 20, r = 5
Step 2:C(20,5) = 20! / (5! × 15!)
Step 3:C(20,5) = (20 × 19 × 18 × 17 × 16) / 120
Step 4:C(20,5) = 1,860,480 / 120
Step 5:C(20,5) = 15,504

15,504 possible committees. Compare to permutations P(20,5) = 1,860,480 — 120 times more when order matters.

Common Mistakes & Tips

  • !Using combinations when order matters (use permutations instead).
  • !Forgetting that C(n,0) = 1 and C(n,n) = 1. These edge cases follow the formula using 0! = 1.
  • !Computing (n-r)! incorrectly. Double-check: it's the factorial of items NOT chosen.
  • !Misapplying combinations to problems involving repetition. With repetition, use C(n+r-1, r) instead.

Related Concepts

Used in These Calculators

Calculators that build on or apply the concepts from this page:

Frequently Asked Questions

What's the difference between combinations and permutations?

The critical difference is whether ORDER MATTERS. Combinations count distinct selections regardless of order — {A,B,C} = {C,B,A}. Permutations count distinct arrangements where order matters — ABC ≠ CBA. For the same n and r, permutations are always larger than or equal to combinations: P(n,r) = C(n,r) × r!. Example: P(5,3) = 60, C(5,3) = 10.

What is the lottery probability for common games?

Powerball: Choose 5 from 69 balls + 1 from 26 Powerballs. Odds: 1 in C(69,5) × 26 = 1 in 292,201,338. Mega Millions: 5 from 70 + 1 from 25. Odds: 1 in 302,575,350. Pick-3 daily games: 1 in 1,000. Odds of being struck by lightning in a year: about 1 in 1.2 million — you're 250 times more likely to be struck by lightning than win Powerball.

Can C(n,r) be larger than n!?

No. C(n,r) is always ≤ 2^n (the total number of subsets). The maximum value of C(n,r) for fixed n occurs at r = n/2 (or near it), and this value grows much slower than n!. For example, C(10,5) = 252, while 10! = 3,628,800 — a factor of 14,400 difference.

How do I calculate 'combinations with repetition'?

Use the formula C(n+r-1, r). This counts ways to choose r items from n types with repetition allowed. Example: Choosing 3 ice cream scoops from 10 flavors with repetition: C(10+3-1, 3) = C(12,3) = 220 ways. The classic 'stars and bars' problem.