Pick a mode
Without repetition counts distinct items — committees, card hands, lottery draws. With repetition counts multisets where repeats are allowed, like 3 scoops from 12 flavours (double chocolate very much permitted).
COMBINATORICS · nCr
Work out n choose r with or without repetition — every step of the working shown, and answers exact to the final digit, even when they run thousands of digits long.
FREE · NO SIGN-UP · RUNS IN YOUR BROWSEREnter n and r, choose whether items may repeat, and get the exact answer with the full working — computed with big-integer math, so nothing ever gets rounded.
Every item is distinct and can be picked at most once — the classic nCr from textbooks.
Runs entirely in your browser — nothing you type leaves this page. Whole numbers from 0 to 10,000 for both n and r.
Without repetition counts distinct items — committees, card hands, lottery draws. With repetition counts multisets where repeats are allowed, like 3 scoops from 12 flavours (double chocolate very much permitted).
n is how many items exist, r is how many you’re choosing. Whole numbers from 0 to 10,000. The engine is exact big-integer math — even C(10000, 5000) comes out correct, all ~3,000 digits of it.
The exact value leads, the full working follows, and a permutation comparison puts the number in context. One tap on the copy icon and “C(52, 5) = 2598960” is on its way wherever you need it.
A combination counts the ways to choose r things out of n when order doesn’t matter. Grab 2 books off a shelf of 5 — Moby-Dick then Gilgamesh is the same pair as Gilgamesh then Moby-Dick, so it counts once. That shelf gives C(5, 2) = 10 pairs.
Divide the over-count away and what survives is pure selection: the number of distinct r-item subsets. When repeats are allowed, the same bookkeeping done with stars and bars yields C′(n, r) = C(n + r − 1, r) — the mode this calculator switches to with one tap.
| Combination | Permutation | |
|---|---|---|
| Does order matter? | No | Yes |
| Formula | n!/(r!(n−r)!) | n!/(n−r)! |
| 5 items, choose 2 | 10 | 20 |
| Same 2 items | 1 selection | 2! = 2 orders |
| Feels like | a hand of cards | a finishing order |
Short answers to the questions that come up most — the full working lives in the calculator above.
C(n, r) = n! / (r! × (n − r)!). The numerator n! counts every arrangement of all n items — deliberate over-counting. Dividing by r! collapses the orderings inside your selection, dividing by (n − r)! collapses the orderings of what’s left, and what remains is pure choice. Worked example: C(5, 2) = 120 / (2 × 6) = 10.P(n, r) = C(n, r) × r! — every combination supports r! orderings — and why permutation counts are always the bigger (or equal) number. Choose 2 of 5: 10 combinations, 20 permutations.C′(n, r) = C(n + r − 1, r). Three flavours, two scoops: C(4, 2) = 6 — chocolate-chocolate, chocolate-vanilla, chocolate-strawberry, vanilla-vanilla, vanilla-strawberry, strawberry-strawberry.C(n, r) = C(n, n − r), since choosing r to keep is the same as choosing n − r to leave behind.C(52, 5) = 2,598,960 — every possible 5-card hand from a standard deck, which is why the 4 royal flushes feel like unicorns. Lotteries work the same way: Powerball’s white balls give C(69, 5) = 11,238,513 combinations, and your jackpot odds are 1 in that × 26.