No repetition, order does not matter: C(5,2)
- Input
- n=5, r=2
- Expected output
- C(5,2) = 10
Choosing 2 letters out of A,B,C,D,E with no repeats and order ignored gives 10 possible pairs: AB, AC, AD, AE, BC, BD, BE, CD, CE, DE.
combinations and combinatorics
A combination counts how many subsets of size r exist inside a set of n items, without caring about order. This page shows the formula, compares it side by side with permutation (where order matters), and covers the case where repetition is allowed.
Choosing 2 letters out of A,B,C,D,E with no repeats and order ignored gives 10 possible pairs: AB, AC, AD, AE, BC, BD, BE, CD, CE, DE.
The same 5 letters, but now AB and BA count as different results; the total doubles from 10 to 20 because each pair has 2! = 2 possible orders.
Choosing 3 flavors out of 5, repeats allowed (like 2 scoops of chocolate and 1 of strawberry), adds up to 35 possible combinations, 3.5 times more than the 10 combinations without repetition for the same n and r.
A combination is a selection of r elements from a set of n where the order of the chosen elements does not matter. For example, choosing 2 fruits from {apple, pear, grape} gives 3 combinations: {apple, pear}, {apple, grape}, and {pear, grape}. The count is given by C(n, r) = n! / (r! · (n − r)!).
Ask whether reordering the chosen items produces a different outcome: ranking a podium (1st, 2nd, 3rd place) is permutation, because position matters; forming a 3-person committee out of 10 candidates is combination, because only the final group matters, not who was picked first.
Because choosing r items to include is the same as choosing n-r items to leave out; C(5,2)=10 equals C(5,3)=10 by that symmetry, and the tool uses this property to simplify the calculation, always multiplying using the smaller of r and n-r.
It happens when r is greater than n: there is no way to choose, say, 7 items from a set of 5 without repetition, so the combination (and permutation) result without repetition is zero by definition, a different case from an input error.
Up to n=1000 and r=1000, with the result capped at 10^100 to keep the display practical; combinations with both n and r large at once (like C(1000,500), which has 300 digits) already exceed that ceiling and come back flagged as overflow instead of the full number.
C(n, r) = n! / (r! × (n−r)!)
All calculations stay in your browser. No data is sent to any server.