How this calculator works
Without repetition, each selected item can appear once. Dividing an ordered selection count by r! removes the different orders of the same set. With repetition, a selection is a multiset; the stars-and-bars argument counts it as a binomial coefficient with n + r - 1 positions. Exact integer arithmetic avoids rounding even for very large counts. Selecting zero items has one outcome: the empty selection.
Formula
Without repetition: C(n,r) = n!/[r!(n - r)!]. With repetition: C(n + r - 1,r), for n > 0. C(n,0) = 1.
Worked example
Choosing two people from five gives C(5,2) = 10 pairs. Choosing two scoops from three flavours, allowing both scoops to match, gives C(4,2) = 6 combinations.
Advertisement
Frequently asked questions
Does AB differ from BA?
No. Order does not matter for combinations. Use permutations when changing order creates a different outcome.
Are the large answers rounded?
No. The count is returned as exact integer text, so it can contain many digits.
Why is selecting nothing counted once?
There is exactly one empty selection. This convention also makes the counting formulas consistent at the boundary.