Combination Calculator (nCr)

Your values

Repetition

Each item can be picked at most once, like cards from a deck.

Up to 10,000

How many you pick

Separate names with commas to list the results with them. Typing names updates n.

Order does not matter: picking A then B is the same as B then A.

Result

Combinations C(52, 5)

Number of digits
7
Scientific notation
2.59896 × 10⁶
Chance of one specific selection
1 in 2,598,960

Step by step

  1. Combinations without repetition:
    C(n,r)=(nr)=n!r! (n−r)!C(n,r)=\binom{n}{r}=\frac{n!}{r!\,(n-r)!}
  2. Substitute the values:
    (525)=52!5! (52−5)!=52!5!⋅47!\binom{52}{5}=\frac{52!}{5!\,(52-5)!}=\frac{52!}{5!\cdot47!}
  3. Cancel the larger factorial, leaving a short product over a factorial:
    (525)=52⋅51⋅50⋅49⋅485⋅4⋅3⋅2⋅1\binom{52}{5}=\frac{52\cdot51\cdot50\cdot49\cdot48}{5\cdot4\cdot3\cdot2\cdot1}
  4. Multiply and divide:
    (525)=311875200120=2598960\binom{52}{5}=\frac{311875200}{120}=2598960

There are more than 1,000 results, too many to list. Lower n or r to see them all.

About this tool

A combination is a selection where order does not matter: a poker hand, a lottery ticket, a committee or a pizza with three toppings. The count is written C(n, r), nCr or "n choose r", and it equals the binomial coefficient. This calculator works with exact whole-number arithmetic, so it gives every digit of the answer, along with the number of digits, a scientific-notation summary, the chance of one particular selection and a worked solution.

How it works

Enter the total number of items n and how many you choose, r. Pick "Without repetition" when each item can be chosen at most once, as with cards dealt from a deck or lottery balls. Pick "With repetition" when the same item can be chosen again, as with scoops of ice cream or donuts from a shop with several flavors.

The result is exact, even when it has thousands of digits, and the steps show how the factorials cancel. For small sets you can list every combination, using letters or your own item names.

C(n,r)=(nr)=n!r! (n−r)!( ⁣(nr) ⁣)=(n+r−1r)\begin{gathered}C(n,r)=\binom{n}{r}=\frac{n!}{r!\,(n-r)!}\\[0.6em]\left(\!\binom{n}{r}\!\right)=\binom{n+r-1}{r}\end{gathered}

Example

How many five-card poker hands can be dealt from a 52-card deck? Order does not matter and a card cannot appear twice, so C(52,5)=52!5!⋅47!C(52,5)=\frac{52!}{5!\cdot47!}. Cancelling 47! leaves 52⋅51⋅50⋅49⋅485⋅4⋅3⋅2⋅1=311875200120=2598960\frac{52\cdot51\cdot50\cdot49\cdot48}{5\cdot4\cdot3\cdot2\cdot1}=\frac{311875200}{120}=2598960 hands, so the chance of being dealt one specific hand is 1 in 2,598,960.

With repetition: choosing 3 scoops from 31 flavors, where a flavor may repeat, gives (31+3−13)=(333)=5456\binom{31+3-1}{3}=\binom{33}{3}=5456 different cups.

Pascal's triangle

Binomial coefficients C(n, r) for n up to 10

n \ r012345678910
01
111
2121
31331
414641
515101051
61615201561
7172135352171
818285670562881
9193684126126843691
101104512021025221012045101

Each entry is the sum of the two entries above it in the previous row: (nr)=(n−1r−1)+(n−1r)\binom{n}{r}=\binom{n-1}{r-1}+\binom{n-1}{r}. Each row adds up to 2n2^n.

Assumptions and limits

n and r can be any whole numbers up to 10,000. Without repetition, r cannot exceed n. Results are exact; numbers with more than 30 digits are summarized in scientific notation, and all digits can be expanded. Combinations are listed only when there are at most 1,000 of them.

Frequently asked questions

What is the difference between a combination and a permutation?

In a combination order does not matter; in a permutation it does. Choosing 3 people out of 10 for a team gives C(10,3)=120C(10,3)=120 combinations, but choosing a president, a secretary and a treasurer gives P(10,3)=720P(10,3)=720 permutations, because each team of three can be ordered in 3!=63!=6 ways.

What does n choose r mean?

"n choose r" is the number of ways to pick r items from n distinct items when order does not matter. It is written (nr)\binom{n}{r} and is also the coefficient of xrx^r in (1+x)n(1+x)^n, which is why the numbers form Pascal's triangle.

How do I calculate combinations with repetition?

Use (n+r−1r)\binom{n+r-1}{r}. Picture the r chosen items as stars separated by n−1n-1 bars into n flavors: you are choosing positions for r stars among n+r−1n+r-1 places. For 3 donuts from 5 kinds, that is (73)=35\binom{7}{3}=35.

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

There are C(49,6)=13983816C(49,6)=13983816 ways to choose 6 numbers out of 49, so one ticket has a 1 in 13,983,816 chance of matching all six.

Why is C(n, 0) equal to 1?

There is exactly one way to choose nothing: the empty selection. The formula agrees because 0!=10!=1, so (n0)=n!0! n!=1\binom{n}{0}=\frac{n!}{0!\,n!}=1. By the same symmetry, (nr)=(nn−r)\binom{n}{r}=\binom{n}{n-r}.

Link with your values

Add these parameters to this page’s address to open it with the values filled in, for example to share a calculation or to link to it from an AI assistant. The result is calculated in the browser: the page HTML shows an example for the default values, and the tool sets the data-url-params attribute once the link’s values are applied.

ParameterValueIf omitted
modeRepetitionone of: standard, repetitiondefault standard
nTotal items (n)whole number; allowed 0–10000required
rItems chosen (r)whole number; allowed 0–10000required
itemsItem names (optional)text; your own text; Copy link includes itoptional

Examples

  • ?n=49&r=6
  • ?mode=repetition&n=10&r=3
  • ?items=Alice,Bob,Carol,Dan&r=2

Write decimals with a point. Encode a space as %20, + as %2B, # as %23 and & as %26.

Result elements: [data-result-block="combination_calculator"]