Skip to content
Statculator
Probability & Counting

Permutation Calculator (nPr)

Permutation calculator for nPr: find P(n, r) = n! / (n − r)! exactly, with or without repetition, follow the steps and list every arrangement.

Free, no sign-up Runs in your browserBy Hira Noor, BS MathematicsUpdated

Try

Tick for codes and passwords, where the same digit or letter can be reused.

Shows each arrangement when there are at most 1,000 of them.

Results

Permutations, P(10, 3)
720
3 digits
Scientific notation
7.2 × 10²
Number of digits
3
Chance of one particular arrangement
1 in 720 = 1.3889 × 10⁻³
Combinations, C(10, 3) = P / r!
120
r! = 3!
6
With repetition, nʳ
1,000

Interpretation: There are 720 ordered arrangements of 3 items taken from 10 when each item is used at most once.

Arrangements of r items from 10

rP(10, r)C(10, r)r!
0111
110101
290452
37201206
45,04021024
530,240252120
6151,200210720
7604,8001205,040
81,814,4004540,320
93,628,80010362,880
103,628,80013,628,800

The highlighted row is your r. In every row P(n, r) = C(n, r) × r!.

Step-by-step solution

  1. 1

    Write the permutation formula

    Fill the r positions one at a time: n choices for the first, n − 1 for the second, and so on.

    P(n, r) = n! / (n − r)!
    P(10, 3) = 10! / 7!
  2. 2

    Cancel 7! to leave 3 factors

    P(10, 3) = 10 × 9 × 8
    = 720
  3. 3

    Compare with combinations

    Each group of 3 items can be ordered in 3! ways, so permutations are 3! times as many as combinations.

    3! = 6
    C(10, 3) = P(10, 3) / 3! = 120

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

  1. Enter the Total number of items, n you can choose from.
  2. Enter the Number arranged, r: how many positions or slots you are filling.
  3. Tick Allow repetition if an item can be used in more than one position, as with digits in a PIN.
  4. Tick List every permutation to see each arrangement, and type the item names separated by commas if you want them in the list.
  5. 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.

SituationOrder matters?Repeats allowed?Count
Gold, silver, bronze from 10 runnersYesNoP(10, 3) = 720
4-digit PIN from digits 0–9YesYes10⁴ = 10,000
Committee of 3 from 10 peopleNoNoC(10, 3) = 120
3 scoops from 8 flavours, repeats allowedNoYesC(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.

Without repetition (nPr)
P(n, r) = n! / (n − r)! = n · (n − 1) · … · (n − r + 1)
With repetition
n^r = n · n · … · n (r factors)
All n items
P(n, n) = n!
Link to combinations
P(n, r) = C(n, r) · r!
Formula symbols
SymbolMeaning
nnumber of distinct items available
rnumber 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?

  1. 01Order matters (gold differs from bronze) and a runner cannot win twice, so use P(10, 3).
  2. 02P(10, 3) = 10! / 7! = 10 × 9 × 8 = 720.
  3. 03Each set of three medallists can be arranged in 3! = 6 orders.
  4. 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.

nPrValuenPrValue
3P267P3210
4P2128P3336
4P3249P3504
4P42410P290
5P22010P3720
5P36010P45,040
5P512012P31,320
6P23020P36,840
6P312026P315,600
6P436052P5311,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.

ToolWithout repetitionWith repetition
Excel and Google Sheets=PERMUT(n, r)=PERMUTATIONA(n, r)
Pythonmath.perm(n, r)n ** r
Rfactorial(n) / factorial(n − r)n ^ r
TI-84n nPr rn ^ 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?

Multiply the number of choices for each position. Without repetition that is n × (n − 1) × … × (n − r + 1), which equals n! / (n − r)!. For 10P3 that is 10 × 9 × 8 = 720. With repetition allowed, each position has n choices, so the count is nʳ.

What is the difference between a permutation and a combination?

A permutation counts ordered arrangements; a combination counts unordered selections. ABC and CBA are two permutations but one combination. The two are related by P(n, r) = C(n, r) × r!, because each combination can be ordered in r! ways.

What is 4 permutation 2?

4P2 = 4! / 2! = 4 × 3 = 12. There are 12 ordered pairs that can be made from four different items, such as AB and BA counted separately.

How many permutations are there of 1, 2, 3, 4?

There are 4! = 24 ways to arrange the four numbers 1, 2, 3 and 4 in a row. Enter n = 4, r = 4 and tick “List every permutation” to see all 24.

How many 4-digit PIN codes are possible?

With digits 0–9 and repeats allowed, there are 10⁴ = 10,000 PINs, from 0000 to 9999. If no digit may be repeated, the count drops to P(10, 4) = 10 × 9 × 8 × 7 = 5,040.

How do you do permutations on a calculator?

Use the nPr function. On a TI-84, type n, press MATH, go to PRB, choose nPr, type r and press ENTER. On a Casio, press SHIFT and the nPr key (usually above ×). In Excel use =PERMUT(n, r).

What does P(n, n) equal, and why is P(n, 0) equal to 1?

P(n, n) = n! / 0! = n!, the number of ways to arrange all n items in a row; eight books can be lined up in 8! = 40,320 orders. P(n, 0) = n! / n! = 1, because there is exactly one way to arrange nothing.

What happens when r is larger than n?

Without repetition, P(n, r) = 0 when r > n, because there are not enough different items to fill every position. With repetition the count is nʳ, so 3 positions from 2 symbols give 2³ = 8 arrangements.

Cite this page

Statculator. (2026, November 14). Permutation Calculator. Retrieved November 14, 2026, from https://statculator.com/probability/permutation-calculator/