Permutation Calculator (nPr)
Calculate permutations — arrangements of items
What Is the Permutation Calculator (nPr)?
A permutation counts the number of ways to arrange r items chosen from a set of n distinct items, where the order of selection matters — picking A then B is treated as different from picking B then A. It's one of the two foundational counting tools in combinatorics, alongside combination, and together they underpin most of classical probability theory.
Permutation counting developed alongside factorial notation in the 17th and 18th centuries, as early probabilists worked out ways to count ordered outcomes — like possible orderings of a card deck or ranked race finishes — without listing every arrangement by hand. It's also why "combination locks" are a bit of a misnomer mathematically: since the order you enter the digits matters, they're really permutation locks, not combination locks.
This calculator computes exact nPr values for any valid n and r. For unordered selections where order doesn't matter, see the Combination Calculator; both nPr and nCr are built directly on the Factorial Calculator's underlying operation.
Permutation Calculator (nPr) Formula
nPr = n! / (n − r)!
How Is the Permutation Calculator (nPr) Calculated?
Dividing n! (all possible orderings of n items) by (n−r)! removes the orderings of the items you didn't select, leaving only the count of ways to arrange the r chosen items in sequence.
You can also build the formula directly from the counting principle: there are n choices for the first position, (n−1) remaining choices for the second, (n−2) for the third, and so on down to (n−r+1) choices for the last of the r positions. Multiplying those r shrinking terms together gives the same result as n!/(n−r)! — the factorial version is just a more compact way to write it.
Permutation Calculator (nPr) Example
5P2 = 5! / 3! = 120 / 6 = 20 ways to arrange 2 items chosen from 5.
6P3 = 6! / 3! = 720 / 6 = 120 ways to arrange 3 items chosen from 6 — for example, awarding gold, silver, and bronze among 6 runners.
8P0 = 8! / 8! = 1. Whenever r = 0, nPr always equals 1, no matter how large n is, since there's exactly one way to arrange zero items: do nothing.
How to Use the Permutation Calculator (nPr)
Step 1
Enter the total number of items (n).
Step 2
Enter the number of items being arranged (r).
Step 3
Click Calculate nPr to see the number of possible arrangements.
Step 4
Check the formula substitution shown with your result to see how n! and (n−r)! combine.
Step 5
If order doesn't actually matter for your problem, switch to the Combination calculator instead.
Step 6
Try increasing r toward n to see how quickly the arrangement count grows.
Benefits
- Turns your finished arrangement count into a branded image you can drop straight into a chat instead of typing the number out.
- Instantly computes exact arrangement counts without manual factorial division.
- Shows the formula substitution step for learning purposes.
- Validates inputs to prevent invalid r > n calculations.
- Handles edge cases like r = 0 and r = n correctly without special-case math on your part.
- Free and runs entirely in your browser, with no sign-up needed.
Common Permutation Calculator (nPr) Scenarios
Scenario 1
Counting the number of ways to award 1st, 2nd, and 3rd place in a race.
Scenario 2
Password or PIN arrangement counting problems.
Scenario 3
Probability problems where the order of outcomes matters.
Scenario 4
Scheduling problems, like the number of ways to order a sequence of tasks or presentations.
Scenario 5
Seating arrangement problems where the order of seats matters (like a head table).
Scenario 6
Checking combinatorics homework or exam problems that specifically require ordered counting.
Understanding Your Result
The result is the exact number of distinct ordered arrangements possible when selecting r items from a set of n, where swapping the order of two selected items counts as a different arrangement.
Because nPr is built from factorials, it grows extremely fast as n and r increase — even modest values like 10P5 already produce 30,240 distinct arrangements. If your expected answer seems too small, double-check that your problem really does treat different orderings as different outcomes; if it doesn't, you likely want nCr (combination) instead, which will always give a smaller number for the same n and r.
Tips
- Use permutation when order matters (like rankings); use combination when it does not (like groupings).
- When r = n, nPr simplifies to n! (arranging all items).
- When r = 0, nPr always equals 1 (there's exactly one way to arrange nothing).
- Remember that nPr = nCr × r! — if you already know a combination count, multiply by r! to get the corresponding permutation count.
- For very large n and r, expect the result to grow far faster than you might intuitively expect, since it's built from factorials.
Common Mistakes
- Using permutation when the problem actually describes an unordered selection (that's a combination).
- Entering r greater than n, which describes an impossible selection.
- Forgetting that swapping two items in a permutation creates a distinct arrangement.
- Manually computing n! and (n−r)! separately and making an arithmetic slip instead of letting the calculator divide the exact values.
- Assuming nPr and nCr give the same count — they're only equal when r is 0 or 1, since nPr = nCr × r!.
Frequently Asked Questions
How is permutation different from combination?
Permutation counts arrangements where order matters (like race finish positions), while combination counts selections where order doesn't matter (like choosing a team). For the same n and r, nPr is always at least as large as nCr, since nPr = nCr × r!.
What does nPr mean?
nPr reads as "n permute r" — the number of ways to arrange r items selected from a total of n distinct items, where the order of selection matters.
What happens if r equals n?
When r = n, nPr equals n! — the number of ways to arrange all n items in a sequence, since (n−r)! becomes 0!, which is defined as 1.
What is nPr when r = 0?
nPr equals 1 when r = 0, since there is exactly one way to arrange zero items (doing nothing), regardless of how large n is.
Where are permutations used in real life?
Permutations are used in scheduling, ranking systems, password/lock code counting, and any scenario where the sequence of selection matters, not just which items are chosen.
What's a real-world example of a permutation?
Arranging 3 books out of 10 on a shelf, or assigning 1st, 2nd, and 3rd place in a race from a group of runners, are permutations since the order of arrangement matters.
What is nPr when r equals n?
It equals n! (n factorial), since you're arranging all n items in every possible order — there are no items left over to exclude.
Can permutation values get very large quickly?
Yes — since permutations involve factorials, the count grows extremely fast as n and r increase, similar to how factorials themselves grow rapidly once n passes even single digits.
Is 'arrangement' always required for something to be a permutation?
Yes — the defining feature of a permutation is that different orderings of the same items count as different outcomes, unlike a combination where only which items are selected matters.
Can I share my permutation result as an image?
Yes — tap Share and, on supported devices, your result is shared as a branded image card, not just a text link.
Why does this calculator limit n to 170?
nPr is computed from factorials internally, and 171! exceeds the largest value JavaScript can represent precisely as a floating-point number — the same limit that applies to the Factorial calculator.
How many ways can a full 52-card deck be arranged?
There are 52! possible orderings — an astronomically large number (roughly 8 × 10⁶⁷) that this calculator can't display exactly, since it far exceeds the 170-value precision limit, but it's a classic illustration of how fast permutations grow.
Can r be negative or a fraction?
No — r must be a whole number between 0 and n, since it represents a count of items being arranged; negative or fractional selections aren't meaningful for this formula.
Is nPr always larger than nCr for the same n and r?
Yes, whenever r is greater than 1, since nPr = nCr × r! and r! is greater than 1 for any r ≥ 2. They're equal only when r is 0 or 1.
References
Important Information
Results are exact for n up to 170, limited by JavaScript number precision.
Last updated: July 25, 2026