CalcFolio

Combination Calculator

This combination calculator counts how many ways you can choose r items from n when order doesn't matter, written C(n, r) or "n choose r." It returns the exact whole number even when it runs to hundreds of digits, the odds of hitting one specific combination, and the permutation count P(n, r) so you can see how much order changes the answer.

Updated

Size of the pool, 0 to 1,000

How many you pick

How to use the calculator

  1. Total items (n): the size of the pool, such as 69 lottery balls or 52 cards. Whole numbers from 0 to 1,000.
  2. Items chosen (r): how many you pick. Without repetition, r can't exceed n.
  3. Allow repetition: check it when the same item can be chosen more than once, like scoops of the same ice cream flavor.

The main result is the exact count, with digits grouped by spaces. When it has more than 15 digits, a rounded scientific-notation version appears too. You also get the odds of one particular combination, shown as 1 : C, and its probability as a percentage.

Formulas used

Without repetition, the number of combinations is the binomial coefficient:

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

With repetition allowed, you are counting multisets, and the formula becomes:

C(n + r − 1, r)

For comparison, the calculator also shows permutations, where order matters: P(n, r) = n! / (n − r)! without repetition and n^r with repetition. Every ordered list of r items corresponds to r! orderings of the same group, which is why P(n, r) = C(n, r) × r!.

The arithmetic uses arbitrary-precision integers, so results are exact, not floating-point estimates. To keep the numbers small along the way, the calculator multiplies and divides step by step instead of computing full factorials. The probability is simply 1 ÷ C(n, r), assuming every combination is equally likely.

Worked examples

1. Powerball jackpot odds

Powerball's official prize chart lists the grand prize odds as 1 in 292,201,338. You can rebuild that number with two runs of this calculator, because the game uses two separate drums. First enter n = 69, r = 5 for the white balls: 11,238,513. Then enter n = 26, r = 1 for the red Powerball: 26. Multiply the two results yourself: 11,238,513 × 26 = 292,201,338.

2. Poker hands

A 5-card hand from a standard 52-card deck: C(52, 5) = 2,598,960 possible hands. If the order in which the cards were dealt mattered, there would be P(52, 5) = 311,875,200 sequences, exactly 120 (5!) times more.

3. Choosing with and without repetition

SituationInputResult
Pick a 3-person committee from 10 peoplen = 10, r = 3120
Rank a president, VP and treasurer from 10P(10, 3)720
3 scoops from 31 flavors, repeats allowedn = 31, r = 3, repetition5,456
3 scoops from 10 flavors, repeats allowedn = 10, r = 3, repetition220

Huge counts are no problem: C(100, 50) has 30 digits and is shown as about 1.00891 × 10^29.

Reading the results

Start with order. If ABC and CBA count as the same outcome, the combinations line is your answer; for rankings, PIN codes or race finishes, read the permutation line. Next, reuse: lottery balls and cards can't repeat, pizza toppings in a "double cheese" world can.

The odds and probability lines describe a single pool. For a game with two drums, such as Powerball, the odds shown for n = 69, r = 5 (1 in 11,238,513, about 0.0000089%) cover the white balls only; multiply by the second drum's count to get the jackpot odds. Either way, the figures assume a fair draw and refer to one ticket in one drawing.

Frequently asked questions

What is the difference between a combination and a permutation?

A combination is a selection where order doesn't matter; a permutation is an arrangement where it does. Choosing 3 people from 10 for a committee gives 120 combinations, but filling three distinct offices from the same 10 gives 720 permutations.

What does nCr mean on a calculator?

nCr is the button or function for C(n, r), the number of combinations of r items from n. On a handheld calculator, large results switch to rounded scientific notation; this tool keeps every digit, using exact integer arithmetic up to n = 1,000.

What are the odds of winning a 6/49 lottery?

For any game where you match 6 numbers drawn from 49, C(49, 6) = 13,983,816, so one ticket has odds of 1 in 13,983,816, a probability of about 0.0000072%. A game with a second drum multiplies that count by the second drum's result, as in the Powerball example.

How many poker hands are a flush?

Pick the suit, then the five cards of that suit: C(4, 1) = 4 and C(13, 5) = 1,287, both straight from the calculator. Multiplied, that is 5,148 of the 2,598,960 possible hands, straight and royal flushes included.

Why do I get an error when r is larger than n?

You can't draw 6 different cards from a 4-card pile, so without repetition the count would be zero and the calculator flags it instead. If items can be reused, such as 6 scoops from 4 flavors, check "Allow repetition" and r may exceed n.

Does buying more tickets change the math?

Each different combination you hold adds one favorable outcome. Ten distinct tickets in a 6/49 game give 10 chances in 13,983,816, still a very small probability. This is arithmetic, not a strategy or gambling advice.

Sources

  1. NIST Digital Library of Mathematical Functions, §26.3 Binomial Coefficients
  2. Powerball — Prize chart and odds
  3. NIST DLMF, Chapter 26 Combinatorial Analysis

Results are exact mathematical counts and assume every outcome is equally likely. Odds shown for lotteries are for information only and are not gambling advice; check the official game rules before playing.