What This Calculator Does
This tool computes two fundamental quantities from combinatorics: permutations (nPr) and combinations (nCr). You provide the total number of distinct items, n, and how many of them you want to select or arrange, r. The calculator returns how many different outcomes are possible in each case. Permutations count arrangements where the order matters, while combinations count selections where the order does not matter.
How to Use It
Enter the total number of items (n) and the number you are choosing (r), then read the results. The hero box shows the number of permutations, and the table below shows the number of combinations. Note that r must be less than or equal to n; if r is larger than n, there are zero ways to choose, so the result is 0.
The Formulas Explained
Both formulas are built on the factorial function, where \(n! = n \times (n-1) \times \ldots \times 2 \times 1\), and \(0! = 1\). The permutation formula $$nPr = \frac{n!}{(n-r)!}$$ divides out the arrangements of the items you did not pick. The combination formula $$nCr = \frac{n!}{r!(n-r)!}$$ additionally divides by \(r!\) to remove duplicate orderings of the chosen items, since order is irrelevant.
Worked Example
Suppose you have 5 books and want to know how many ways you can fill 3 spots on a shelf. Permutations: $$\frac{5!}{(5-3)!} = \frac{120}{2} = \mathbf{60}$$ ordered arrangements. If you only care which 3 books you pick (not their order), combinations: $$\frac{5!}{3! \cdot 2!} = \frac{120}{6 \cdot 2} = \mathbf{10}$$ selections.
FAQ
When should I use permutations vs combinations? Use permutations when order matters (passwords, race finishes, seating), and combinations when it doesn't (lottery picks, committees, choosing toppings).
Why is nCr always smaller than or equal to nPr? Every combination corresponds to \(r!\) permutations, so combinations are the permutations count divided by \(r!\).
What about very large n? Factorials grow extremely fast. This calculator handles values up to about \(n = 170\) before exceeding the range of standard double-precision numbers.