Permutation Calculator
Part of Math & Statistics Calculators
Calculate permutations (nPr) - the number of ways to arrange r items from n total items where order matters.
How to Use This Permutation Calculator
- Enter total items (n): Input the total number of items you have to choose from. This must be a non-negative integer.
- Enter items to arrange (r): Input how many items you want to arrange. This must be less than or equal to n.
- Calculate: Click "Calculate Permutation" to compute nPr - the number of different arrangements.
- View the result: See the permutation count along with the formula, factorial expansion, and step-by-step calculation.
What are Permutations?
A permutation is an arrangement of objects in a specific order. When order matters, we use permutations to count possibilities. The permutation formula nPr (also written as P(n,r) or ⁿPᵣ) calculates how many different ways you can arrange r items selected from a total of n items.
For example, if you have 5 people and want to assign 3 different prizes (1st, 2nd, 3rd place), you use permutations because the order matters - getting 1st place is different from getting 2nd place. The answer is 5P3 = 60 different ways to award the prizes.
Permutation Formula
The permutation formula is: nPr = n! / (n-r)!
Where n is the total number of items, r is the number of items being arranged, and ! denotes factorial (the product of all positive integers up to that number).
For example, 5P3 = 5! / (5-3)! = 5! / 2! = 120 / 2 = 60. This can also be calculated as 5 × 4 × 3 = 60, which is multiplying the top r numbers starting from n.
Permutations vs Combinations
Permutations (nPr): Order matters. Selecting items and arranging them in sequence. Example: Race winners (1st, 2nd, 3rd) - the order is important. Formula: n! / (n-r)!
Combinations (nCr): Order doesn't matter. Selecting items into a group where arrangement is irrelevant. Example: Committee members - who is selected matters, but the order doesn't. Formula: n! / (r! × (n-r)!)
The key difference: nPr is always greater than or equal to nCr for the same n and r. This is because permutations count all different orderings, while combinations count each group only once regardless of order.
Special Cases and Properties
nP0 = 1: There is exactly one way to arrange zero items (do nothing).
nPn = n!: When arranging all n items, it's simply n factorial. For example, 5P5 = 5! = 120.
nP1 = n: When choosing one item from n, there are n possibilities.
Relationship to combinations: nPr = nCr × r! because permutations equal combinations multiplied by the arrangements of the selected items.
Real-World Applications
Scheduling and ordering: Arranging people in a line, scheduling events in a specific order, or determining batting orders in baseball all use permutations.
Passwords and codes: PIN codes, lock combinations (when digits can't repeat), and password strength calculations involve permutations when each position matters.
Racing and rankings: Determining podium finishes, ranking systems, and tournament brackets use permutations because position matters.
Seating arrangements: Arranging guests at a dinner table, organizing classroom seating charts, or planning seat assignments on flights.
Permutations with Repetition
The standard permutation formula assumes all items are distinct. When items can repeat, the formula changes to n^r (n to the power of r). For example, a 4-digit PIN where digits can repeat has 10^4 = 10,000 possibilities.
When some items are identical within the set being arranged, you use the formula: n! / (n₁! × n₂! × ... × nₖ!) where n₁, n₂, etc. are the counts of each identical item. For example, arranging the letters in "MISSISSIPPI" uses this formula because some letters repeat.
Calculating Large Permutations
Permutations grow very rapidly. Even modest values like 20P10 produce enormous numbers (over 670 billion). For computational purposes, you can simplify nPr as the product of r consecutive integers starting from n and counting down: n × (n-1) × (n-2) × ... × (n-r+1). This avoids calculating huge factorials and then dividing them.
When order does not matter, use the Combination Calculator instead. The Factorial Calculator computes the n! values used in permutation formulas. See the Probability Calculator for related probability calculations.