Combination Calculator (nCr)
Counts the number of ways to choose r items from a set of n when the order does not matter, written C(n, r), nCr or 'n choose r'. Choose whether an item can be picked more than once (combinations with repetition) and see the exact answer, even for large numbers, with the formula filled in. Use it for lottery odds, choosing a team or committee, card hands and binomial coefficients. The matching number of permutations, where order matters, is shown for comparison.
- n and r are whole numbers up to 1,000.
Formula
C(n, r) = n! ÷ (r! × (n − r)!); with repetition C(n + r − 1, r) = (n + r − 1)! ÷ (r! × (n − 1)!)
- Order does not matter: {A, B} and {B, A} are the same combination.
- C(n, r) = C(n, n − r), and C(n, 0) = C(n, n) = 1.
- Results are exact; numbers longer than 60 digits are shown in scientific notation with their digit count.
- The matching permutation count is P(n, r) = n! ÷ (n − r)!, or nʳ with repetition.
Choose 3 from 10
Inputs
- Number of objects (n): 10
- Objects to choose (r): 3
- Can an object be chosen more than once?: no
C(10, 3) = 10! ÷ (3! × 7!) = (10 × 9 × 8) ÷ (3 × 2 × 1) = 720 ÷ 6 = 120. If order mattered there would be 720 permutations.
Sources & references
Frequently asked questions
What is the difference between a combination and a permutation?
In a combination order does not matter (a hand of cards); in a permutation it does (a race podium). There are r! permutations for every combination of r items.
What are the odds of winning a 6/49 lottery?
C(49, 6) = 13,983,816, so one ticket has a 1 in 13,983,816 chance of matching all six numbers.
What does 'with repetition' mean?
Each item can be chosen more than once, like picking 3 scoops from 5 ice-cream flavours where two scoops can be the same flavour: C(5 + 3 − 1, 3) = 35 ways.
Related calculators
Permutation Calculator (nPr) Counts the ways to choose and arrange r items from a set of n when the order matters, written P(n, r) or nPr. Choose whether items can repeat (like digits in a PIN) or not (like runners on a podium) and get the exact answer with the formula filled in. For small sets the calculator also lists the actual arrangements using letters A, B, C…, and shows the matching number of combinations where order does not matter. Factorial Calculator Calculates n! (n factorial), the product of all whole numbers from 1 to n, exactly, for any n from 0 to 5,000. Factorials grow extremely fast, so alongside the exact value you get the result in scientific notation, how many digits it has and how many zeros it ends with. Factorials count the ways to arrange n distinct objects in order and appear throughout probability, combinations and permutations. Standard Deviation Calculator Calculates the standard deviation of a list of numbers, the most common measure of how spread out data are around their mean. Paste or type your values separated by commas, spaces or new lines, and choose whether they are a sample from a larger group (dividing by n − 1) or the whole population (dividing by n). You also get the variance, mean, count, sum, sum of squared deviations, standard error of the mean, minimum, maximum and range.