What is a Permutation Calculator?
A permutation calculator (nPr calculator) counts the ordered arrangements of r items chosen from n. Without repetition it uses the permutation formula P(n, r) = n! / (n − r)!, the product n × (n − 1) × … × (n − r + 1); with repetition it uses nʳ. For example, 10P3 = 10 × 9 × 8 = 720. This calculator returns the exact whole number for n and r up to 10,000, shows the steps and can list every permutation.
What the Permutation Calculator does
Permutations count outcomes where position matters: finishing orders in a race, seat assignments, officer roles, passwords and PIN codes. Swapping two of the chosen items gives a different permutation, which is the key difference from a combination. The count is written nPr, ⁿPᵣ or P(n, r) and read “n permute r”, which is why the same tool is also called an nPr calculator, an n p r calculator or simply a permutations calculator.
Enter how many items you have and how many positions you are filling. The calculator multiplies out the falling factorial with exact integer arithmetic, shows the working, and relates the answer to combinations through P(n, r) = C(n, r) × r!. For n ≤ 15 it lists P(n, r), C(n, r) and r! side by side for every r, and ticking List every permutation writes out each arrangement, using your own item names if you type them in.
How to use the Permutation Calculator
- Enter the Total number of items, n you can choose from.
- Enter the Number arranged, r: how many positions or slots you are filling.
- Tick Allow repetition if an item can be used in more than one position, as with digits in a PIN.
- Tick List every permutation to see each arrangement, and type the item names separated by commas if you want them in the list.
- Read the number of permutations, then open the steps to see the product and the comparison with combinations.
Permutation or combination: which one to use
Ask one question: if you swap two of the chosen items, is it a different outcome? If yes, order matters and you need permutations. If no, you need the Combination Calculator. Then ask whether an item can be used more than once; that decides between the two formulas below.
| Situation | Order matters? | Repeats allowed? | Count |
|---|---|---|---|
| Gold, silver, bronze from 10 runners | Yes | No | P(10, 3) = 720 |
| 4-digit PIN from digits 0–9 | Yes | Yes | 10⁴ = 10,000 |
| Committee of 3 from 10 people | No | No | C(10, 3) = 120 |
| 3 scoops from 8 flavours, repeats allowed | No | Yes | C(10, 3) = 120 |
Permutation formula (nPr formula)
To fill r positions in order, there are n choices for the first position, n − 1 for the second, and so on down to n − r + 1 for the last. Multiplying those choices gives the falling factorial, which is the same as n! divided by (n − r)!, because the factors below n − r + 1 cancel.
| Symbol | Meaning |
|---|---|
| n | number of distinct items available |
| r | number of positions to fill (some books use k) |
| P(n, r) | also written nPr, ⁿPᵣ or P(n, k) |
| n! | n factorial, n × (n − 1) × … × 2 × 1, with 0! = 1 |
Without repetition r cannot exceed n, and P(n, r) = 0 when it does. With repetition any r is allowed.
Definitions follow standard references: Permutation, Wolfram MathWorld and the Python math.perm documentation.
Worked example: medals in a race
How many podiums from 10 runners?
Problem. 10 runners compete for gold, silver and bronze. How many different podiums are possible, and how many different groups of three medallists?
- 01Order matters (gold differs from bronze) and a runner cannot win twice, so use P(10, 3).
- 02P(10, 3) = 10! / 7! = 10 × 9 × 8 = 720.
- 03Each set of three medallists can be arranged in 3! = 6 orders.
- 04Groups of three, ignoring order: C(10, 3) = 720 / 6 = 120.
Answer. There are 720 possible podiums but only 120 different trios of medallists. If the same runner could somehow take every medal, the count would rise to 10³ = 1,000.
Permutations with and without repetition
Permutations with repetition are also called permutations with replacement: after an item is used it goes back into the pool. Without repetition, each position has one fewer option than the previous one, giving the falling product n × (n − 1) × …. With repetition every position has all n options, giving nʳ. The difference grows quickly: a 4-character code from 26 letters has 26⁴ = 456,976 possibilities with repeats, but P(26, 4) = 358,800 if no letter may be reused.
Example with repetition. A bike lock has 3 dials, each showing a digit from 0 to 9, and digits may repeat. Each dial has 10 options, so there are 10 × 10 × 10 = 10³ = 1,000 codes. The same lock without repetition (all three digits different) has P(10, 3) = 10 × 9 × 8 = 720 codes, so banning repeats removes 280 of them.
Arranging every item (r = n) without repetition gives n!, which the Factorial Calculator computes on its own.
Permutation word problems
Team officers. A team of 12 players picks a captain and a vice-captain. The two roles are different, so order matters: P(12, 2) = 12 × 11 = 132 ways. Choosing two co-captains with equal roles would be a combination instead: 132 / 2! = 66.
Horse race. Eight horses run, and a trifecta bet must name the first three in the exact order. P(8, 3) = 8 × 7 × 6 = 336 possible trifectas, so a random pick wins with probability 1 / 336, about 0.30%.
Seating in a row. Five guests can sit in five chairs in P(5, 5) = 5! = 120 orders. Around a round table, where turning everyone one seat gives the same seating, there are (5 − 1)! = 24.
Licence plates. A plate has 3 letters followed by 3 digits, and both may repeat: 26³ × 10³ = 17,576,000 plates. Each block is a permutation with repetition, and the multiplication rule joins them.
Permutations of a word with repeated letters
When some items are identical, swapping two of them does not create a new arrangement, so divide by the factorial of each repeat count: n! / (n₁! × n₂! × …). The letters of BOOK have 4! / 2! = 24 / 2 = 12 distinct arrangements, because the two Os are interchangeable. MISSISSIPPI has 11 letters with I four times, S four times and P twice, giving 11! / (4! × 4! × 2!) = 34,650.
The calculator above treats every item as distinct, so for BOOK it returns 4! = 24. To count arrangements with repeats, find n! and each repeat factorial with the Factorial Calculator, then divide.
Quick answers: 4P2, 5P5 and arranging 1, 2, 3, 4
From A, B, C, D the 12 ordered pairs counted by 4P2 are AB, AC, AD, BA, BC, BD, CA, CB, CD, DA, DB and DC. The 24 arrangements of 1, 2, 3, 4 start 1234, 1243, 1324, 1342, 1423, 1432, followed by three more groups of six that begin with 2, 3 and 4. Tick “List every permutation” to print either list in full.
What is 5 permutation 5? 5P5 = 5! = 120, the number of orders for five different items. Likewise 7P7 = 7! = 5,040.
What is 3P2? 3P2 = 3 × 2 = 6: from three items there are six ordered pairs.
| nPr | Value | nPr | Value |
|---|---|---|---|
| 3P2 | 6 | 7P3 | 210 |
| 4P2 | 12 | 8P3 | 336 |
| 4P3 | 24 | 9P3 | 504 |
| 4P4 | 24 | 10P2 | 90 |
| 5P2 | 20 | 10P3 | 720 |
| 5P3 | 60 | 10P4 | 5,040 |
| 5P5 | 120 | 12P3 | 1,320 |
| 6P2 | 30 | 20P3 | 6,840 |
| 6P3 | 120 | 26P3 | 15,600 |
| 6P4 | 360 | 52P5 | 311,875,200 |
How to do permutations on a calculator, in Excel and in code
The nPr key on a scientific calculator is the permutation function, and nCr is the combination function. On a TI-83 or TI-84, type n, press MATH, move right to the PRB menu, choose nPr, type r and press ENTER: 10 nPr 3 returns 720. On most Casio models nPr sits above the multiplication key and is reached with SHIFT.
| Tool | Without repetition | With repetition |
|---|---|---|
| Excel and Google Sheets | =PERMUT(n, r) | =PERMUTATIONA(n, r) |
| Python | math.perm(n, r) | n ** r |
| R | factorial(n) / factorial(n − r) | n ^ r |
| TI-84 | n nPr r | n ^ r |
Common use cases
- Rankings and races: the number of possible finishing orders for the top r places.
- Codes and passwords: the size of a key space, nʳ, which sets how long a brute-force search would take.
- Scheduling and seating: how many ways to order tasks, speakers or guests, and with the list option, which orders.
- Role assignment: filling distinct positions such as president, vice-president and treasurer from a group.
- Probability: the number of equally likely ordered outcomes, for example in birthday-problem or card-sequence calculations with the Probability Calculator.
Assumptions and limitations
- All items are assumed distinct. For identical items, such as repeated letters in a word, divide by the factorial of each repeat count, as shown in the section on repeated letters above.
- Circular arrangements, where rotations count as the same, have (n − 1)! orders rather than n!.
- n and r are limited to 10,000. Beyond 300 digits the exact value is summarized by its first and last 60 digits.
- The list of permutations is shown only when there are at most 1,000 of them; the count itself has no such limit.
- A count of arrangements is a probability only when every arrangement is equally likely.
Frequently asked questions
How do you calculate permutations?
What is the difference between a permutation and a combination?
What is 4 permutation 2?
How many permutations are there of 1, 2, 3, 4?
How many 4-digit PIN codes are possible?
How do you do permutations on a calculator?
What does P(n, n) equal, and why is P(n, 0) equal to 1?
What happens when r is larger than n?
Cite this page
Statculator. (2026, November 14). Permutation Calculator. Retrieved November 14, 2026, from https://statculator.com/probability/permutation-calculator/