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.
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 . Cancelling 47! leaves 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 different cups.
Pascal's triangle
Binomial coefficients C(n, r) for n up to 10
| n \ r | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | ||||||||||
| 1 | 1 | 1 | |||||||||
| 2 | 1 | 2 | 1 | ||||||||
| 3 | 1 | 3 | 3 | 1 | |||||||
| 4 | 1 | 4 | 6 | 4 | 1 | ||||||
| 5 | 1 | 5 | 10 | 10 | 5 | 1 | |||||
| 6 | 1 | 6 | 15 | 20 | 15 | 6 | 1 | ||||
| 7 | 1 | 7 | 21 | 35 | 35 | 21 | 7 | 1 | |||
| 8 | 1 | 8 | 28 | 56 | 70 | 56 | 28 | 8 | 1 | ||
| 9 | 1 | 9 | 36 | 84 | 126 | 126 | 84 | 36 | 9 | 1 | |
| 10 | 1 | 10 | 45 | 120 | 210 | 252 | 210 | 120 | 45 | 10 | 1 |
Each entry is the sum of the two entries above it in the previous row: . Each row adds up to .
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 combinations, but choosing a president, a secretary and a treasurer gives permutations, because each team of three can be ordered in 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 and is also the coefficient of in , which is why the numbers form Pascal's triangle.
How do I calculate combinations with repetition?
Use . Picture the r chosen items as stars separated by bars into n flavors: you are choosing positions for r stars among places. For 3 donuts from 5 kinds, that is .
What are the odds of winning a 6/49 lottery?
There are 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 , so . By the same symmetry, .
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.
| Parameter | Value | If omitted |
|---|---|---|
modeRepetition | one of: standard, repetition | default standard |
nTotal items (n) | whole number; allowed 0–10000 | required |
rItems chosen (r) | whole number; allowed 0–10000 | required |
itemsItem names (optional) | text; your own text; Copy link includes it | optional |
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"]