Skip to main content

Combinations Without Repetition Calculator

Exact C(n, r) combinations, C(n+r−1, r) combinations with repetition (stars and bars), P(n, r) permutations and nr — with show-your-work steps, a 4-way compare mode, and arbitrary-precision integer math (BigInt), so even C(100, 50) is exact to the last digit. 100% client-side: nothing you type ever leaves your browser.

nCr / nPr Calculator

Pick a mode, enter n and r, and get the exact count — plus every step of the working.

Pascal’s Triangle Table

Every C(n, r) for n up to 12. Tap any value to load it into the calculator.

Multinomial Coefficient

Split n distinct items into groups: n! / (k1! × k2! × …).

Combination vs Permutation: Lottery vs PIN

The only two questions that matter.

Lottery: the ticket 4-8-15-16-23-42 wins however the balls drop — order is irrelevant, so it is a combination: C(49, 6) = 13,983,816 possible tickets.
PIN: 1-2-3-4 unlocks a different account than 4-3-2-1 — order matters and digits repeat, so it is a permutation with repetition: 104 = 10,000 possible codes.
Order does NOT matter → combinationOrder matters → permutation
No repetitionC(n, r) = n! / (r! × (n−r)!)
lottery ticket, poker hand, committee
P(n, r) = n! / (n−r)!
race podium, president/VP/secretary
Repetition allowedC(n+r−1, r) stars and bars
donut box, dice sums
nr
PIN code, password, license plate

Worked Examples

Every number below is computed by the exact integer engine — try them in the calculator.

Lottery 6/49 jackpot odds

One ticket is one unordered 6-number selection from 49: C(49, 6) = 13,983,816. Your odds with a single ticket are 1 in 13,983,816.

Poker hands

A 5-card hand is an unordered selection with no repeats: C(52, 5) = 2,598,960 possible hands.

4-digit PIN

Digits may repeat and order matters: 10^4 = 10,000 possible codes.

Donut box (stars and bars)

3 donuts from 10 flavors, repeats allowed, order irrelevant: C(10+3−1, 3) = C(12, 3) = 220 possible boxes.

The big one: C(100, 50)

Exact integer, all 30 digits: 100891344545564193334812497256.

Frequently Asked Questions

What is the formula for combinations without repetition?
C(n, r) = n! / (r! × (n−r)!). It counts the ways to choose r different items from n when order does not matter. Example: C(10, 3) = 10! / (3! × 7!) = (10 × 9 × 8) / (3 × 2 × 1) = 720 / 6 = 120.
What is the difference between combinations and permutations?
Order matters in permutations, but not in combinations. A lottery ticket is a combination — the numbers 4-8-15-16-23-42 win no matter what order they are drawn in — so a 6/49 lottery has C(49, 6) = 13,983,816 possible tickets. A PIN is a permutation with repetition — 1-2-3-4 is a different code from 4-3-2-1 — so a 4-digit PIN has 10^4 = 10,000 possibilities. Rule of thumb: if rearranging the selection creates a genuinely different outcome, use permutations.
What are combinations with repetition (stars and bars)?
They count selections where each type may be picked more than once and order does not matter. The formula is C(n+r−1, r). Example: choosing 3 donuts from 10 flavors gives C(10+3−1, 3) = C(12, 3) = 220 possible boxes.
How do permutations with repetition work?
Each of the r positions can independently be any of the n options, so the count is n^r. A 4-digit PIN has 10^4 = 10,000 codes, and an 8-character lowercase password has 26^8 = 208,827,064,576 possibilities.
Why do you divide by r! in the combination formula?
P(n, r) counts every ordering separately, so each unordered selection gets counted r! times. Dividing removes the duplicate orderings: C(n, r) = P(n, r) / r!. Check: P(10, 3) = 720, and 3! = 6, so C(10, 3) = 720 / 6 = 120.
Why is C(n, 0) = 1?
There is exactly one way to choose nothing: the empty selection. Mathematically, C(n, 0) = n! / (0! × n!) = 1, because 0! = 1.
Can r be bigger than n?
Not without repetition: you cannot pick 7 different items out of 5, so C(5, 7) is undefined and this calculator shows an honest error instead of a misleading number. With repetition it is allowed — for example, picking 7 donuts from 3 flavors gives C(3+7−1, 7) = C(9, 7) = 36.
Is C(n, r) the same as C(n, n−r)?
Yes — choosing which r items to take is the same act as choosing which n−r items to leave behind. So C(100, 95) = C(100, 5) = 75,287,520. The calculator uses this symmetry internally to keep large computations fast.
How is C(100, 50) computed exactly?
With arbitrary-precision integer arithmetic (BigInt), never floating point: C(100, 50) = 100891344545564193334812497256, all 30 digits exact. A 64-bit float can only print 1.008913445455642e+29 — about 16 significant digits — so the rest are rounded away. The same exact engine evaluates C(10,000, 5,000), a 3,009-digit integer, without losing a single digit.
What is the multinomial coefficient?
It generalizes C(n, r) to more than two groups: n! / (k1! × k2! × ⋯) counts the ways to split n distinct items into groups of sizes k1, k2, and so on. Example: 12! / (4! × 4! × 4!) = 34,650 ways to deal 12 distinct cards into three labeled 4-card hands.
How many 5-card poker hands are possible?
C(52, 5) = 2,598,960. Order does not matter in a poker hand and no card can repeat, so it is a combination without repetition.
What is the stars-and-bars intuition?
Write r stars (the picks) in a row and insert n−1 bars to split them into n groups: for example, ★★|★| means 2 of flavor 1, 1 of flavor 2, 0 of flavor 3. Every arrangement of r stars and n−1 bars is one valid selection, and there are C(r+n−1, r) of them. With 10 donut flavors and 3 donuts: C(12, 3) = 220.
How large can n and r be in this calculator?
n and r can each go up to 100,000, and every result is an exact integer — no floating-point rounding, ever. Past that cap the calculator refuses rather than guessing, because exactness is the whole point.
How do I know whether I need combinations or permutations?
Ask two questions. (1) Does rearranging the selection make a different outcome? A lottery ticket: no → combination. A PIN or password: yes → permutation. (2) Can an item be picked twice? Dealt cards: no → without repetition. Donut flavors or PIN digits: yes → with repetition. The four answers map exactly to the four modes of this calculator: C(n, r), C(n+r−1, r), P(n, r), and n^r.

Looking for factorials only?

This tool computes combinations and permutations — C(n, r), P(n, r), stars and bars, and multinomials. If you only need factorials, double factorials or multifactorials (n!, n!!, n!!!), use the multifactorial calculator.

Free tool by NRTechStudio