Smekys
Ad Space

Combinations Calculator

Free combinations calculator: how many ways to choose k items from n items when order does not matter. See the n-choose-k formula, examples, and odds.

Enter Values

items

How many items are in the full set you are choosing from (must be a non-negative integer).

items

How many items you actually pick per group. Must be between 0 and n (engine supports k up to 20).

0=No, 1=Yes

0 = combinations (order ignored, e.g. a poker hand). 1 = permutations (order matters, e.g. race podium gold/silver/bronze).

Result

Answer (Combinations or Permutations)
120
Combinations C(n,k)
120
Permutations P(n,k)
720
Probability of One Group
0.83%
Odds (1 in N)
120

A combination is a selection of items where the order does not matter. If you are choosing 3 people out of 10 to form a committee, picking Alice, Bob, and Carol is the same group as picking Bob, Alice, and Carol — so you count it once, not six times. That single number is written as C(n,k), read "n choose k," and it answers the question: how many different groups of size k can I pull from a set of n items?

This calculator computes C(n,k) instantly, then turns that raw count into the two numbers people actually care about: the probability that one randomly chosen group wins, and the "1 in …" odds. Whether you are sizing a lottery jackpot, designing a sample survey, or wondering how many team rosters are possible, the math underneath is always the same factorial formula.

How to Use

  1. Enter Total Items (n) — the size of the full set you are choosing from. For a deck of cards that is 52; for a lottery pool of 69 numbers it is 69.
  2. Enter Items Chosen (k) — how many items each group contains. It must be between 0 and n. Picking 5 cards means k = 5. The engine supports k from 0 to 20.
  3. Set Order Matters? to 0 (the default) for combinations, where rearrangements of the same group count once. Set it to 1 for permutations, where every rearrangement counts separately — for example, a race podium or a 4-digit PIN.
  4. Read the highlighted Answer on the result card. When orderMatters = 0 it equals C(n,k); when orderMatters = 1 it equals P(n,k). The card also shows both C(n,k) and P(n,k) side by side so you can compare.
  5. Check Probability of One Group — the percent chance that a single randomly picked group (or ordered arrangement, if orderMatters = 1) wins.
  6. Read Odds (1 in N) — the same idea written the way people say it: "you have 1 chance in 2,598,960."

Negative n is clamped to 0, and choosing more items than the set contains (k > n) yields 0 by the standard mathematical convention — there are simply no ways to make such a selection.

The Combination Formula

The number of ways to choose k items from n items without regard to order is:

C(n,k) = n! / ( k! × (n − k)! )

Where the exclamation mark means factorial — the product of all positive integers up to that number. The (n − k)! in the denominator cancels the part of n! that overlaps, which is exactly the trick that removes order from the count: if order mattered, you would compute the permutation n! / (n − k)!; dividing by k! afterward collapses all k! orderings of the same group into one.

Worked example: choose 3 from 10.

  • C(10,3) = 10! / ( 3! × 7! ) = (10 × 9 × 8) / (3 × 2 × 1) = 720 / 6 = 120.

That matches Python's exact-integer routine math.comb(10, 3) = 120, the same function CPython ships in its standard library.

Two edge cases fall straight out of the formula:

  • k = 0: C(n,0) = 1. There is exactly one way to choose nothing — the empty group.
  • k = n: C(n,n) = 1. There is exactly one way to take the whole set.
  • C(n,k) = C(n,n−k): choosing 3 to keep is the same as choosing 7 to leave behind. Symmetry keeps the table small.

Combinations vs Permutations: Know the Difference

This is where people most often get the wrong number.

  • Combinations (this calculator): order does not matter. A 3-item committee {Alice, Bob, Carol} counts once. Use it for groups, committees, subsets, cards in a hand, and lottery balls.
  • Permutations: order does matter. The sequence Alice → Bob → Carol is different from Carol → Bob → Alice. Use it for passwords, race podiums, and arranging books on a shelf.

For the same n and k, a permutation is always k! times larger than the matching combination. If your scenario treats rearrangements as distinct, do not use this page — look up a permutations calculator instead. Feeding an order-sensitive question into C(n,k) undercounts by a factor of k! and will silently mislead you.

Examples

Example 1 — A 10-person committee (n = 10, k = 3). Your club has 10 members and you must pick a 3-person steering group. C(10,3) = 120 possible committees. Since order does not matter, every group of three is counted exactly once, and your odds that a particular friend trio is chosen at random are 1 in 120, or about 0.83%.

Example 2 — A 5-card poker hand (n = 52, k = 5). A standard deck dealt 5 cards gives C(52,5) = 2,598,960 distinct hands. That is why the chance of drawing a specific royal flush is so tiny: 1 in 2,598,960, or roughly 0.0000385%. Casino odds tables are built directly on this one number.

Example 3 — A million-choice sample (n = 1,000,000, k = 2). Choosing 2 items out of a million gives C(1,000,000,2) = 499,999,500,000 possible pairs. The exact integer arithmetic never overflows, which is the same reason a lottery jackpot advertised at a near $1 billion still offers a probability so small it rounds to about 0.0000000002% per ticket (1 in ~500 billion).

Example 4 — The empty group (n = 5, k = 0). C(5,0) = 1. There is exactly one combination when you choose nothing at all — the empty set. The probability column shows 100% because that single group is the only possible outcome.

FAQ

What is the difference between a combination and a permutation?

A combination ignores order: {A, B, C} is the same group as {B, A, C}. A permutation treats order as meaningful: ABC, ACB, and BAC are three different arrangements. Use combinations for committees, card hands, and lottery pools; use permutations for passwords, race results, and seating charts.

How do I calculate n choose k by hand?

Use the formula C(n,k) = n! / ( k! × (n − k)! ). In practice you never compute the huge factorials directly — cancel first. For C(10,3), write out (10 × 9 × 8) / (3 × 2 × 1) = 720 / 6 = 120. The top three factors of n! and the bottom k! cancel everything else away.

What does C(n,0) equal?

C(n,0) = 1 for any n ≥ 0. There is exactly one way to choose zero items from a set — the empty combination — so the formula yields 1, and the probability of picking that empty group is 100%.

Can k be larger than n?

Mathematically, no — you cannot choose 5 items from a set that only contains 3. The standard convention is C(n,k) = 0 when k > n, which is what the calculator returns. If you expected a non-zero result, double-check which number is the pool size (n) and which is the group size (k).

Why is the probability so small for big n?

Probability of one winning group = 1 / C(n,k), converted to a percent. As n grows, C(n,k) explodes faster than most people expect — choosing 6 from 69 already yields millions of groups. That is why a lottery ticket advertised with a multi-million-dollar jackpot still carries a chance well below 0.00001% of winning on a single ticket.

Does the order I pick the numbers in matter?

No. Combinations deliberately treat order as irrelevant. If you need order to matter — for example, ranking the top 3 finishers out of 10 runners — compute a permutation instead, because the same 3 people would produce 3! = 6 different finish orders.

Disclaimer

This combinations calculator is provided for informational purposes only and does not constitute mathematical, statistical, financial, or gambling advice. Results are exact integer values of C(n,k) computed from the inputs you enter; probability percentages are derived from those exact counts. Always verify critical decisions — especially those involving probability, risk, or wagers — with a qualified professional before relying on the result.

Related Calculators

Disclaimer

Results are estimates for illustration only. Verify important figures independently.