🔢
✓ Editorially reviewed by Derek Giordano, Founder & Editor · BA Business Marketing

Combination Calculator

nCr — Choose r Items from n Without Order

Last reviewed: April 2026

🧮
500 calculators, no signup required
Finance · Health · Math · Science · Business
nnng.com

What Is a Combination Calculator?

A combination calculator determines the number of ways to choose a subset of items from a larger set when the order of selection does not matter. It computes C(n, k) = n! / (k! times (n-k)!), which is used in probability, statistics, and combinatorics.

Understanding Combinations

A combination calculates how many ways you can choose a subset of items from a larger set when order doesn't matter. The formula is C(n,r) = n! / (r! × (n−r)!). For example, choosing 5 cards from a 52-card deck: C(52,5) = 2,598,960 possible hands. This is why poker hands are ranked by rarity. Combinations differ from permutations, where order matters — the same 5 cards dealt in different sequences count as different permutations but the same combination. For related math tools, see our Statistics Calculator and Logarithm Calculator.

Combinations vs Permutations

Use combinations when selecting a committee, lottery numbers, or items where arrangement doesn't matter. Use permutations when order matters — like ranking, passwords, or seating arrangements. Permutations are always larger: P(n,r) = n!/(n−r)!, which equals C(n,r) × r!. For example, C(10,3) = 120 but P(10,3) = 720 because each group of 3 can be arranged 6 ways (3! = 6).

Real-World Applications

Combinations appear everywhere: lottery odds (C(49,6) = 13,983,816), genetic combinations in biology, investment portfolio selection, team formation, menu combinations at restaurants, and statistical sampling. Understanding combinatorics helps you evaluate probabilities and make informed decisions. For probability calculations, see our Statistics Calculator.

Combinations vs Permutations

Formulan=10, r=3n=52, r=5Order Matters?
Combinations C(n,r)1202,598,960No
Permutations P(n,r)720311,875,200Yes
Ratio P/C6 (= 3!)120 (= 5!)

Understanding Combinations in Mathematics

Combinations are one of the two fundamental counting techniques in combinatorics, alongside permutations. While permutations count the number of ways to arrange items where order matters, combinations count selections where order does not matter. The combination formula, written as C(n, r) or "n choose r," equals n! / (r! × (n-r)!), where n is the total number of items and r is the number being chosen. For example, choosing 3 members from a group of 10 for a committee yields C(10, 3) = 120 possible committees, regardless of the order in which members are selected.

The distinction between combinations and permutations is critical in probability and statistics. If you are dealing cards from a standard 52-card deck, the number of possible 5-card hands is C(52, 5) = 2,598,960 — a combination, because the order you receive the cards does not affect the hand's value. However, if you were arranging 5 books on a shelf from a collection of 52, you would use permutations because the arrangement order matters: P(52, 5) = 311,875,200 possible arrangements. Understanding when order matters is the key to choosing the correct formula. Our Permutation & Combination Calculator can help you explore both.

The Combination Formula Explained Step by Step

The combination formula C(n, r) = n! / (r! × (n-r)!) uses factorials — the product of all positive integers up to a given number. For instance, 5! = 5 × 4 × 3 × 2 × 1 = 120. To calculate C(8, 3), you compute 8! / (3! × 5!) = 40,320 / (6 × 120) = 40,320 / 720 = 56. This means there are exactly 56 ways to choose 3 items from a set of 8 when order does not matter.

A useful shortcut avoids computing full factorials: C(n, r) can be calculated as (n × (n-1) × ... × (n-r+1)) / r!. For C(8, 3), this becomes (8 × 7 × 6) / (3 × 2 × 1) = 336 / 6 = 56. This method is computationally faster and avoids overflow errors when working with large numbers. Another important property is symmetry: C(n, r) = C(n, n-r), meaning choosing 3 items from 8 produces the same count as choosing 5 items from 8. Both equal 56.

Real-World Applications of Combinations

Combinations appear throughout mathematics, science, business, and daily life. In lottery mathematics, the number of possible ticket combinations determines your odds of winning. For a typical 6/49 lottery (choose 6 numbers from 49), there are C(49, 6) = 13,983,816 possible combinations, giving odds of approximately 1 in 14 million. In genetics, combinations calculate the possible genotype pairings in Mendelian inheritance — the number of ways alleles can combine during reproduction follows combination mathematics directly.

In business, combinations are used for market research survey design (choosing which product features to test), quality control sampling (selecting items from a production batch for inspection), and portfolio construction (choosing which stocks to include from a universe of candidates). In computer science, combinations are fundamental to algorithm design, particularly in problems involving subsets, search optimization, and combinatorial testing where you need to verify software behavior across all possible input combinations.

Sports brackets and tournament scheduling also rely heavily on combinatorics. The number of possible ways to select a team of 5 starters from a 12-player roster is C(12, 5) = 792. The number of possible matchups in a round-robin tournament with 16 teams is C(16, 2) = 120 games. Fantasy sports platforms use combination mathematics to calculate the total number of possible lineups, which for some formats can exceed billions of combinations.

Combinations with Repetition

Standard combinations assume each item can only be selected once. However, combinations with repetition (also called multichoose) allow items to be selected multiple times. The formula for combinations with repetition is C(n+r-1, r), where n is the number of item types and r is the number of selections. For example, choosing 3 scoops of ice cream from 5 flavors (where you can repeat flavors) gives C(5+3-1, 3) = C(7, 3) = 35 possible selections.

Combinations with repetition are commonly used in inventory problems (distributing identical items among distinct categories), polynomial coefficient calculations, and resource allocation scenarios. They also appear in the "stars and bars" method in discrete mathematics, which provides an elegant way to count the number of solutions to equations like x₁ + x₂ + x₃ = 10 where each variable is a non-negative integer.

Pascal's Triangle and Binomial Coefficients

Combination values form the entries of Pascal's Triangle, one of the most elegant structures in mathematics. Each entry in Pascal's Triangle equals the sum of the two entries directly above it, and the entry in row n, position r equals C(n, r). These values are also called binomial coefficients because they appear as coefficients when expanding expressions like (a + b)ⁿ using the binomial theorem. For example, (a + b)⁴ = 1a⁴ + 4a³b + 6a²b² + 4ab³ + 1b⁴, where the coefficients 1, 4, 6, 4, 1 are the values in row 4 of Pascal's Triangle: C(4,0), C(4,1), C(4,2), C(4,3), C(4,4).

Pascal's Triangle reveals many fascinating patterns. The sums of each row are powers of 2 (1, 2, 4, 8, 16...). The diagonal entries form sequences of natural numbers, triangular numbers, tetrahedral numbers, and higher figurate numbers. The triangle also connects to the Fibonacci sequence — the sum of the "shallow diagonals" produces consecutive Fibonacci numbers. These deep mathematical connections make combinations a cornerstone of number theory, algebra, and probability. For related calculations, try our Binomial Probability Calculator and Sample Size Calculator.

Computational Considerations for Large Combinations

When working with large values of n and r, direct computation of factorials can cause integer overflow even in programming languages that support large integers. C(100, 50), for example, equals approximately 1.009 × 10²⁹ — a number with 30 digits. Practical strategies for computing large combinations include using logarithms of factorials (Stirling's approximation), iterative multiplication with running division to keep intermediate values manageable, and recursive approaches leveraging Pascal's Triangle identity: C(n, r) = C(n-1, r-1) + C(n-1, r). Many programming libraries provide built-in functions for combinations, such as Python's math.comb() function introduced in version 3.8, which handles arbitrarily large integers natively.

What is the formula for combinations?
C(n,r) = n! / (r! × (n−r)!), where n is total items and r is items chosen. The exclamation mark (!) means factorial: 5! = 5×4×3×2×1 = 120.
What is the difference between combination and permutation?
Combinations ignore order (choosing a committee). Permutations care about order (ranking contestants). P(n,r) = n!/(n−r)! is always larger than C(n,r) because each combination can be arranged in r! different ways.
What are the odds of winning the lottery?
For a 6/49 lottery: C(49,6) = 13,983,816. Your odds of matching all 6 are about 1 in 14 million. For Powerball (5/69 + 1/26): C(69,5) × 26 = 292,201,338, or about 1 in 292 million.
When do I use combinations vs permutations?
Use combinations when order does not matter — choosing a team, selecting lottery numbers, or picking items from a menu. Use permutations when order matters — arranging people in seats, creating passwords, or ranking contestants. Ask yourself: would rearranging the same items create a different outcome? If yes, use permutations. If no, use combinations.
How do I calculate combinations by hand?
Use C(n,r) = n! / (r! × (n-r)!). For example, C(10,3) = 10! / (3! × 7!) = (10 × 9 × 8) / (3 × 2 × 1) = 720 / 6 = 120. A shortcut: for the numerator, multiply r terms counting down from n. For the denominator, take r factorial. You do not need to compute the full factorial of n.

See also: Permutation Calculator · Prime Factorization Calculator · GCD & LCM Calculator · Factorial & Combinations Calculator · Decimal to Fraction Converter

How to Use This Calculator

  1. Enter the total number of items (n) — Input the size of your set — for example, 52 cards in a deck, 10 job candidates, or 45 lottery numbers.
  2. Enter how many to choose (r) — Input how many items you're selecting from the set. For a 5-card poker hand from 52 cards, r = 5.
  3. Select combination or permutation — Choose C(n,r) if order doesn't matter (lottery draws, committee selection) or P(n,r) if order matters (race placements, password arrangements).
  4. Review the result — The calculator shows the total number of possible combinations or permutations, along with the step-by-step factorial computation.

Tips and Best Practices

Order is the key distinction. Combinations: order doesn't matter (choosing 3 people for a committee). Permutations: order matters (assigning 1st, 2nd, 3rd place). C(10,3) = 120 committee options versus P(10,3) = 720 ranked arrangements. Permutation counts are always larger.

C(n,r) = n! / (r!(n-r)!). The factorial formula grows extremely fast. C(52,5) = 2,598,960 possible poker hands. C(45,6) = 8,145,060 possible lottery draws. These numbers help you understand just how unlikely specific hands or draws are. See our Probability Calculator for odds.

Combinations with repetition use a different formula. If items can be chosen more than once (like scoops of ice cream where you can pick the same flavor twice), use C(n+r-1, r) instead. Choosing 3 scoops from 5 flavors with repetition gives C(7,3) = 35 options.

Pascal's Triangle encodes all combinations. Row n of Pascal's Triangle contains C(n,0), C(n,1), ..., C(n,n). Each number is the sum of the two above it. This connects combinations to binomial coefficients and probability distributions. See our Binomial Probability Calculator.

See also: Permutation Calculator · Probability Calculator · Factorial Calculator · Binomial Probability

📚 Sources & References
  1. [1] Khan Academy. Combinations and Permutations. KhanAcademy.org
  2. [2] NIST. Combinatorial Analysis. NIST.gov
  3. [3] Wolfram MathWorld. Combination. MathWorld
  4. [4] OpenStax. Counting Principles. OpenStax.org
Editorial Standards — Every calculator is built from peer-reviewed formulas and official data sources, editorially reviewed for accuracy, and updated regularly. Read our full methodology · About the author