Combination Calculator (nCr)

THE NUMBER OF SELECTIONS
Type how many items you have, and how many you are choosing.
What cancels, what is left, and the check
Your two numbers
Whole numbers only, and r cannot be bigger than n — you cannot choose 5 things out of 3. Commas and spaces are read, so 1,000 and 1 000 both work. Use the key if you have typed them the wrong way round. AC empties the box you are filling, and clears both if that box is already empty; holding deletes one digit after another.
The same items picked in a different order are one selection, not several — and no item can be taken twice.
Tap a box, then use the keys
The answer counts groups, so ABC and CBA are one and the same. The band also shows what the same two numbers give when the order does start to matter, and when an item may be taken more than once — those are the two questions most often mistaken for this one.
How the combination is worked out

This combination calculator works out nCr — how many ways there are to choose r items from n when the order you pick them in does not matter.

A five-card hand from a standard deck: 52C5 = 2,598,960. Deal the same five cards in a different order and it is still the same hand, which is exactly what makes this a combination rather than an arrangement.

A Combination Is an Arrangement With the Ordering Divided Out

There is no separate machinery for combinations. Count the arrangements first, then divide away the orderings you never wanted.

Five cards can be dealt in 311,875,200 ordered ways. Every hand of five appears in that total once for each way its five cards can be shuffled, and five cards can be shuffled in 5! = 120 ways. So each hand has been counted 120 times over:

2,598,960 × 120 = 311,875,200

That one relationship, nPr = nCr × r!, separates the two ideas completely. What remains is arithmetic.

The Combination Formula, and How to Use It Without the Long Way

Written out in full it is a ratio of three factorials:

nCr = n! ÷ (r! × (n − r)!)

Correct, and nobody works it that way. 52! is a 68-digit number and it is about to be almost entirely cancelled. Take instead five factors from the top and five from the bottom:

(52 × 51 × 50 × 49 × 48) ÷ (5 × 4 × 3 × 2 × 1) = 2,598,960

Same answer, numbers small enough to hold in your head. This combination calculator works the same way, cancelling as it goes, which is why an answer with hundreds of digits comes back without ever building a factorial.

Every Combination Also Decides What You Reject

Pick 97 items from 100 and you have simultaneously decided which 3 to reject. The two acts are the same act, so the two counts must be equal:

nCr = nC(n − r)

By hand that is not a curiosity, it is the shortcut. 100C97 written as a fraction is unpleasant; 100C3 is 161,700 in one line. This calculator always takes the shorter road on its own and says so in the working when it does.

nCr Is the Binomial Coefficient

The same number turns up in a place that looks unrelated. When a bracket is raised to a power, the figure multiplying each term is exactly nCr — written in brackets as n over r and read as the binomial coefficient.

The reason is the same counting argument. Expanding a bracket multiplied by itself n times means choosing, from each of the n brackets, which of the two terms to take. The number of ways to pick the second term exactly r times is nCr. Selection and expansion are one idea in two costumes, which is why a calculator built for one answers the other.

Repeats Need a Different Formula, Not a Different Answer

Three scoops from ten flavours, and three scoops of pistachio is allowed. Nothing leaves the pool, so the plain combination formula does not apply.

The count is not ten cubed either — that would treat vanilla-then-chocolate as different from chocolate-then-vanilla, and a bowl has no order. The right figure is (n + r − 1) choose r, which is 12C3 = 220 against the no-repeats 10C3 = 120. The band shows both from the two numbers you typed, because several well-known calculators simply refuse this case and leave you to find the formula yourself.

The situationWhat it countsFormula
a hand of cards, a committee, a lottery line groups, no repeats nCr
a podium, a ranked shortlist, seats in a row groups in order nPr
scoops of ice cream, coins from a jar groups, repeats allowed (n+r−1)Cr

Two Combination Answers That Look Wrong

nC0 = 1. Zero feels like the right answer here, yet taking nothing is itself a way of choosing, and no other way exists. That is where 0! = 1 comes from rather than being a rule invented to make formulas behave.

nCn = 1. Take the whole set and there was never a choice to make. Compare that with arranging the whole set, which gives n! — the contrast between 7C7 = 1 and 7P7 = 5,040 is the sharpest illustration of what "order does not matter" costs.

Between those two ends the number of combinations rises to a peak in the middle and falls away symmetrically. 30C15 = 155,117,520 is the largest value anywhere in its row, and the page says so when you land on it.

Reading the Answer as Odds

A lottery drawing 6 balls from 49 has 49C6 = 13,983,816 possible combinations, so one ticket is one chance in 13,983,816.

The order the balls come out in is irrelevant and no ball returns to the machine, which is precisely the combination situation. The working panel prints the odds reading alongside the count, because for most people the chance is the thing they actually came to find out.

How to Use This Combination Calculator

First box: how many there are. Second box: how many you want. Then =. The keys are part of the page rather than your phone's keyboard, exchanges the two boxes when they go in back to front, AC wipes only the box you are working in, and a held keeps deleting.

Behind Show the working sit the cancellation, the leftover factors set out as a fraction, the odds reading, and what those same two numbers mean under the other two questions. Answers are exact whole numbers however long they get: 100C50 is 100,891,344,545,564,193,334,812,497,256, printed in full rather than as a rounded decimal in shorthand.

Before anything is shown, the result is put back through the mathematics: the symmetry, Pascal's rule, and the identity nCr × r! × (n − r)! = n!. The number of checks that passed is printed with the working. Monkza's scientific calculator carries an nCr key for when you only want the figure inside a longer sum; this page is for when you want to see where it came from.

Combination Calculator FAQ

What does nCr mean?
nCr is the number of ways to choose r items from n when the order of the chosen items does not matter. It is also written C(n, r) or n choose r. For example 52C5 is 2,598,960.
What is the formula for nCr?
nCr = n! divided by r!(n − r)!. In practice you take r factors counting down from n and divide by r factors counting down from r: 52C5 = (52 × 51 × 50 × 49 × 48) / (5 × 4 × 3 × 2 × 1) = 2,598,960.
Is nCr the same as the binomial coefficient?
Yes. The binomial coefficient written as n over r in brackets is the same number as nCr, and it is what multiplies each term when a bracket is raised to a power. Counting selections and expanding a bracket give the same figures for the same reason.
What is the difference between nCr and nPr?
nPr counts arrangements and nCr counts groups. They are linked by nPr = nCr × r!, because each group of r can itself be ordered in r! ways. For 52 and 5 the two figures are 311,875,200 and 2,598,960.
Why is nC0 equal to 1?
Choosing nothing can be done in exactly one way, which is to take nothing. The same reasoning gives nCn = 1, since taking the whole set is also a single selection.
Why does nCr equal nC(n−r)?
Every selection you take decides the selection you leave behind, so choosing r items and choosing which n − r to reject are the same act counted twice. It is also the fastest shortcut by hand: 100C97 is really 100C3.
How do you calculate combinations with repetition?
Use (n + r − 1) choose r. Three scoops from ten flavours with repeats allowed is 12C3 = 220, not 10C3 = 120. This page shows both figures from the same two numbers.
What are the odds of winning a 6 from 49 lottery?
49C6 = 13,983,816, so a single ticket has one chance in 13,983,816. That figure is a plain combination: the balls are drawn without repeats and the order they come out in does not matter.

Count the groups, not the orderings — a combination is what is left when you divide the orderings back out.