Permutations Calculator 

Permutations Calculator nPr and With Replacement

Permutations Calculator nPr and With Replacement

Calculate ordered arrangements instantly. Choose standard nPr or permutations with replacement. Accurate formulas, step by step results.

P(n, r) = n! ÷ (n − r)!
Result
P(n,r)
StepExpressionValue

Quick Reference: Common Permutation Values

Permutation values below use standard nPr without replacement. Use this table as a fast lookup for small sets.

n (objects)r (chosen)P(n,r)PR(n,r) = nr

What Is a Permutation?

A permutation is an ordered arrangement of elements taken from a set. When calculating permutations, the order of selection matters. Choosing item A then item B is treated as a different outcome than choosing B then A.

Permutations appear in everyday situations including race finishing positions, password sequences, seating arrangements, and task scheduling. Any time the sequence of choices changes the meaning of the result, you are working with a permutation.

Permutations Without Replacement (nPr)

Standard nPr permutations assume each element can only be chosen once. Once an item is selected, it is removed from the available pool. The formula is:

P(n, r) = n! / (n − r)!
Where n is the total number of objects and r is the size of the ordered sample.

Permutations With Replacement PR(n,r)

Permutations with replacement allow each element to be selected more than once. The set size stays constant for every selection. The formula is much simpler:

PR(n, r) = nr
Each of the r positions can independently hold any of the n values.

How the Permutation Formulas Work

Understanding these formulas helps you apply them to real problems without guessing which one to use.

Breaking Down P(n,r) = n! / (n-r)!

The factorial n! counts every possible ordering of all n items. Dividing by (n-r)! removes the orderings of the items that were never selected. What remains is the count of ordered arrangements of exactly r items from n.

Example: Selecting 3 podium finishers from 10 runners in order.
P(10, 3) = 10! / (10 − 3)! = 3,628,800 / 5,040 = 720 arrangements

Breaking Down PR(n,r) = nr

Because each of the r positions can hold any of the n items independently, the total count is n multiplied by itself r times. This grows very rapidly as r increases.

Example: A 4-digit PIN using digits 0 through 9.
PR(10, 4) = 104 = 10,000 possible PINs

Factorial Notation Explained

The factorial of a number n, written n!, is the product of all positive integers from 1 to n. For example, 5! = 5 x 4 x 3 x 2 x 1 = 120. By convention, 0! = 1. Factorials grow extremely fast, which is why permutation counts for large n can be astronomically large.


Permutations vs Combinations at a Glance

Permutations and combinations are closely related, but the key distinction is whether order matters. This comparison table clarifies when to use each method.

MethodOrder Matters?Replacement?FormulaExample
Permutation nPr Yes No n! / (n-r)! Race finishing positions
Permutation PR(n,r) Yes Yes nr PIN codes, passwords
Combination nCr No No n! / (r! x (n-r)!) Lottery ticket numbers
Combination with Replacement No Yes (n+r-1)! / (r! x (n-1)!) Choosing flavors with repeats

Worked Examples for Every Case

Worked examples make abstract permutation formulas concrete and easy to apply.

Horses in a Race (nPr)

You are predicting the top 3 finishers from a field of 8 horses. The positions (1st, 2nd, 3rd) matter. You need P(8, 3).

P(8, 3) = 8! / (8 − 3)! = 40,320 / 120 = 336 possible finishing orders

Rolling Dice in Sequence (Replacement)

You roll a standard 6-sided die 5 times and record the full sequence of results. Each roll is independent, so this is permutations with replacement.

PR(6, 5) = 65 = 7,776 possible sequences

Letters in a Word (nPr)

From the 26 letters of the alphabet, how many distinct 5-letter sequences can be made if no letter repeats?

P(26, 5) = 26! / (26 − 5)! = 26 x 25 x 24 x 23 x 22 = 7,893,600 sequences

Digital Lock Codes (Replacement)

A digital padlock has 3 dials each showing digits 0 through 9. How many total combinations exist?

PR(10, 3) = 103 = 1,000 possible codes

Real World Uses of Permutation Calculations

Real world uses of permutation calculations appear across technology, sports, security, and science.

Cybersecurity and Passwords

Password strength is directly related to permutation counts. An 8-character password using 94 printable ASCII characters gives PR(94, 8) = 948 which is over 6 quadrillion possibilities. This is why length and character variety dramatically increase password security.

Sports and Competitions

Tournament brackets, race finish positions, and playoff seedings all involve permutations. Betting markets use permutation counts to calculate the total number of possible outcomes, which in turn determines odds pricing.

Genetics and Biology

Protein sequences are ordered chains of amino acids. With 20 standard amino acids and proteins that can be hundreds of units long, permutation counts become astronomically large. This is why even slight variations in sequence can produce entirely different proteins.

Scheduling and Planning

Assigning tasks to time slots, routing delivery vehicles, and scheduling staff shifts all require calculating ordered arrangements. Operations research software uses permutation-based algorithms to find optimal solutions among vast possibility spaces.


Frequently Asked Questions

Frequently asked questions about permutations cover the most common points of confusion between formulas, methods, and use cases.

A permutation is an ordered arrangement of elements selected from a set. The order in which elements are chosen matters: selecting A then B is counted as a different result from selecting B then A. Permutations count every unique sequence, not just every unique group.
The nPr permutations formula is P(n, r) = n! / (n − r)! where n is the total number of objects and r is the number of objects being chosen. This formula counts ordered subsets without replacement, meaning each item can only be selected once.
Permutation with replacement means each element can be chosen more than once. The formula is PR(n, r) = nr. For example, 3-digit codes from digits 0 to 9 give PR(10, 3) = 103 = 1,000 possible codes, since each digit position can independently hold any of the 10 values.
In a permutation, order matters. In a combination, order does not matter. Selecting 3 podium finishers from 10 athletes where their positions (1st, 2nd, 3rd) matter is a permutation. Selecting 3 people to form a committee where no one holds a specific role is a combination.
Use permutations with replacement when the same element can appear more than once and the sequence order matters. Common examples include PIN codes, passwords, dice rolls recorded as a sequence, and number plates where a digit can repeat. If repetition is not allowed, use standard nPr instead.
In permutations, n is the total number of distinct objects in the set or population, and r is the size of the ordered subset being selected. For standard nPr, r must be less than or equal to n. For permutations with replacement, r can be any non-negative integer regardless of n.
5P3 means selecting 3 items from 5 in order without replacement. Using the formula: P(5, 3) = 5! / (5 − 3)! = 120 / 2 = 60. There are 60 possible ordered arrangements when choosing 3 items from a set of 5.
For standard nPr permutations without replacement, r cannot be larger than n. Selecting more items than exist in the set is impossible, so P(n, r) is undefined when r exceeds n. However, for permutations with replacement, r can be any size because items can be reused. PR(n, r) = nr is valid for any non-negative r.