What this calculator does
This tool answers the core question of combinatorics: how many ways can you select or arrange a sample of r elements from a set of n distinct objects? It covers all four sample-selection cases defined by two yes/no choices — does order matter, and is replacement allowed — plus the standalone counts: factorial, even and odd permutations, and circular permutations. Everything is a dimensionless count, so no units or conversions are involved.
The four sample-selection cases
Combinations (order no, replace no): $$ {}_nC_r = \frac{n!}{r!\,(n-r)!} $$ Permutations (order yes, replace no): $$ {}_nP_r = \frac{n!}{(n-r)!} $$ Combinations with replacement (order no, replace yes): $$ CR(n,r) = C(n+r-1, r) $$ Permutations with replacement (order yes, replace yes): $$ PR(n,r) = n^r $$ For the no-replacement cases, if \(r\) exceeds \(n\) the answer is 0, because you cannot pick more items than exist.
Standalone counts
Factorial $$ n! = n(n-1)\dots 2 \cdot 1 $$ with \(0! = 1\). Even permutations $$ = \frac{n!}{2} $$ for \(n\) greater than or equal to 2 (the size of the alternating group). Odd permutations $$ = \frac{n!}{2} $$ for \(n\) greater than or equal to 2, and 0 otherwise. Circular permutation $$ = (n-1)! $$ the number of distinct arrangements of \(n\) objects around a circle where rotations are considered the same.
How to use it
Enter your set size \(n\) and sample size \(r\), pick a selection type, and read off the number of ways. The modes that ignore \(r\) (factorial, even, odd, circular) use only \(n\).
Worked example
Choose 3 winners from 10 contestants, order not mattering: select Combinations with \(n = 10\), \(r = 3\). The result is $$ C(10,3) = \frac{10 \cdot 9 \cdot 8}{3 \cdot 2 \cdot 1} = \frac{720}{6} = 120 $$ If order mattered (gold, silver, bronze), switch to Permutations and get $$ P(10,3) = 10 \cdot 9 \cdot 8 = 720 $$
FAQ
When do I use combinations vs permutations? Use combinations when the order of selection is irrelevant (a committee), and permutations when order matters (rankings, passwords).
What does "with replacement" mean? After picking an item you put it back, so the same item can be chosen again — useful for sampling with repetition.
Why might very large results lose precision? Counts grow factorially fast and may exceed exact floating-point range; for huge \(n\) and \(r\) treat the displayed integer as a close approximation.