Search
Search for a symbol or emoji...
Permutation and Combination Calculator
Compute permutations (nPr) and combinations (nCr) for a set of n items taken r at a time.
Permutation and combination calculator guide
Permutations and combinations are two of the most common operations in counting and probability. They describe how many ways you can select r items from a set of n items, with or without caring about the order of selection.
A permutation counts ordered arrangements. The formula is nPr = n! / (n − r)! where n! is the factorial of n. Permutations are used when order matters, for example when selecting a president, vice-president, and secretary from the same group.
A combination counts unordered selections. The formula is nCr = n! / (r! × (n − r)!). Combinations are used when order does not matter, for example when choosing a team of r players from a roster of n.
The calculator accepts integer inputs for n and r with r less than or equal to n. It uses arbitrary-precision integers, so very large factorials do not lose precision the way floating-point numbers would.
Typical applications include probability puzzles, lottery calculations, lineup scheduling, binomial expansions, poker hand counts, genetic combinations, and combinatorial enumeration in computer science.
The tool also displays the factorial expansion used so you can check your work or compare with a hand calculation.
How to use
- Enter n, the total number of items in the set.
- Enter r, the number of items to pick. r must be ≤ n.
- Click Calculate to see both the permutation and combination counts.
- Read the formula line to review how each result was derived.
Core formulas
Permutation: nPr = n! / (n − r)!. Combination: nCr = n! / (r! × (n − r)!). Relationship: nCr = nPr / r!. Special cases: nP0 = nC0 = 1; nPn = n!; nCn = 1.
Notes and limitations
- n and r must be non-negative integers with r ≤ n.
- Very large n values (over a few thousand) may slow down or return extremely long digit strings.
- Results are exact integers; no rounding is applied.
- This calculator assumes each item is distinct and sampling is without replacement.
FAQ
When should I use permutations?
When the order of selection matters, such as assigning ranked positions or arranging a sequence.
When should I use combinations?
When order does not matter, such as selecting a committee or a team from a larger group.
What is the relationship between nPr and nCr?
nCr = nPr / r!, because combinations ignore order while permutations count every ordering.
What if r is zero?
There is exactly one way to pick zero items, so nP0 = nC0 = 1.