How this calculation works
Order does not matter: selecting A and B is the same group as B and A. Objects are distinct and selected without replacement. Selecting zero objects gives one empty combination.
C(n, r) = n! ÷ [r! × (n − r)!]A worked example
Choosing 3 objects from 10 gives 120 combinations.
Good to know
Counts become approximate beyond the exact-integer range of JavaScript numbers. Repeated objects and selection with replacement use different formulas.
Ignoring order removes repeated versions of the same group
Choose three people from ten: ordering the selection gives 720 possible sequences, but each group appears in 3! = 6 orders. Dividing by six leaves 120 distinct three-person groups.
The distinction changes the question. A committee without assigned roles uses combinations; president, secretary and treasurer chosen from the same people are ordered roles and use permutations.
Replacement and repeated objects need different formulas
This tool selects distinct objects without replacement. Once an object is chosen, it cannot appear again in the selection. A sequence such as choosing a digit repeatedly for a code does not use this formula.
Selecting zero objects gives one empty group, while choosing all available objects gives one full group. Large counts beyond the safe-integer range are approximate even though the mathematical answer is an integer.
A few questions, answered
Why are choosing 3 of 10 and 7 of 10 equal?
Every chosen three-object group has a unique seven-object complement.
Can r be larger than n?
No. Selection without replacement cannot contain more objects than are available.