Permutation Calculator
Calculate nPr — the number of ordered arrangements of r items from n — with exact big-number results and formula steps shown.
About the Permutation Calculator
This permutation calculator computes P(n, r), also written nPr — the number of ways to arrange r items chosen from a set of n, where order matters. Enter n and r and get the exact count instantly, with the matching combination count shown alongside so the effect of ordering is visible.
The formula is P(n, r) = n! / (n − r)!, which expands to the product n × (n−1) × … × (n−r+1): the first position has n choices, the next n−1, and so on. The calculator evaluates this with exact big-integer arithmetic up to n = 5,000, so even results with hundreds of digits are precise, with scientific notation for display and the full value on the copy button.
Permutations answer questions like how many ways can medalists finish, how many PIN codes exist, or how many ways can books be shelved. If reordering the same selection shouldn't count as new (like choosing a committee), you want combinations — shown right next to the result.
How to Use the Permutation Calculator
- 1Enter n, the total number of items.
- 2Enter r, how many positions to fill in order.
- 3Read P(n, r) with formula steps, plus C(n, r) for comparison.
- 4Copy the exact value for very large results.
Frequently Asked Questions
How do I calculate permutations? A worked example
How many ways can gold, silver and bronze go to 10 athletes? P(10, 3) = 10!/(10 − 3)! = 10 × 9 × 8 = 720. Order matters: Alice-Bob-Carol is a different podium than Carol-Bob-Alice.
What is the difference between nPr and nCr?
P(n, r) counts ordered arrangements; C(n, r) counts unordered selections. They differ by exactly r!: P(10, 3) = 720 while C(10, 3) = 120, because each 3-person selection can be ordered 3! = 6 ways. Use P for rankings and codes, C for groups and hands.
How many 4-digit PINs are there?
With repetition allowed (normal PINs), it's 10⁴ = 10,000 — not a permutation problem. If digits cannot repeat, it becomes P(10, 4) = 10 × 9 × 8 × 7 = 5,040. Knowing whether repetition is allowed is the key modelling decision.
What is P(n, n)?
Arranging all n items is n! (since (n − n)! = 0! = 1). Five books on a shelf can be ordered P(5, 5) = 5! = 120 ways. Factorials explode fast — 10! is already 3,628,800 — which is why this tool uses big-integer math.
How do permutations handle duplicate items?
The nPr formula assumes all n items are distinct. With duplicates, divide by the factorial of each repeat count: the letters of MISSISSIPPI (11 letters with I×4, S×4, P×2) can be arranged 11! / (4! × 4! × 2!) = 34,650 ways, far fewer than 11! = 39,916,800.