What This Permutations Calculator Does
This calculator works out the number of permutations — written as nPr or \(P(n, r)\) — for a given set of items. A permutation counts how many ordered arrangements you can make when you select r items from a total of n items. Order matters here, so picking A then B is counted separately from B then A. You only need to supply two whole numbers and the result appears instantly.
The Two Inputs
- Total number of items (n): the size of the full set you are choosing from.
- Number of items to arrange (r): how many of those items you select and place in order.
Both values must be non-negative whole numbers, and n must be greater than or equal to r. The calculator accepts large values — anything up to 100,000 — and uses arbitrary-precision arithmetic (BigInteger) so even huge results are computed exactly without rounding.
The Formula
The calculator applies the standard permutation formula:
$$P(n, r) = \frac{\text{n}!}{\left(\text{n} - \text{r}\right)!}$$Here "!" means factorial — the product of every whole number from 1 up to that value. The tool computes \(n!\) and \((n - r)!\) separately, then divides one by the other to give the exact number of ordered arrangements.
Worked Example
Suppose you want to know how many ways 3 runners can finish first, second and third in a race of 5 athletes. Enter n = 5 and r = 3:
- \(5! = 120\)
- \((5 - 3)! = 2! = 2\)
- $$P(5, 3) = \frac{120}{2} = \mathbf{60}$$
So there are 60 possible ordered finishes for the top three places.
Frequently Asked Questions
How is a permutation different from a combination?
A permutation counts ordered arrangements, while a combination ignores order. This calculator uses the permutation formula, so different orderings of the same items are counted as distinct outcomes.
What happens if r is larger than n?
That is not allowed. The calculator returns an error because you cannot arrange more items than you have. You must keep \(n \geq r\).
Can I use 0 for r?
Yes. \(P(n, 0)\) always equals 1, because there is exactly one way to arrange nothing — the empty arrangement.