Permutation Calculator (nPr)
Calculate P(n,r) — ordered arrangements of r items chosen from n items.
Results
Permutations: When Order Matters
A permutation is an ordered arrangement of items. Unlike combinations, in a permutation the order of selection makes a difference — placing Alice in 1st and Bob in 2nd is different from placing Bob in 1st and Alice in 2nd.
The Formula
P(n, r) = n! / (n − r)!. This counts the number of ways to choose r items from n and arrange them in a specific order. For n=5, r=2: P(5,2) = 5!/(5−2)! = 5!/3! = 5×4 = 20. You can verify: 5 choices for position 1, then 4 remaining choices for position 2 = 20.
Permutations vs Combinations
P(n,r) = C(n,r) × r! — permutations equal combinations multiplied by the number of ways to order the selected items. For n=5, r=2: C(5,2)=10 combinations, each with 2! = 2 orderings, giving P(5,2)=20. Use permutations when the arrangement sequence matters; combinations when only the set matters.
Full Arrangements: P(n,n)
When r = n, you're arranging all items: P(n,n) = n!. The number of ways to arrange 5 books on a shelf = 5! = 120. The number of ways to arrange 10 runners finishing a race = 10! = 3,628,800.
Real-World Examples
4-digit PIN from 10 digits (with repetition = 10⁴ = 10,000; without = P(10,4) = 5,040). Race podium top 3 from 8 runners: P(8,3) = 336. Arranging 7 books in a row: P(7,7) = 7! = 5,040.
Worked Example: P(8,3) — Olympic Podium
Eight sprinters compete. How many different ways can gold, silver, and bronze medals be awarded?
P(8, 3) = 8! / (8 − 3)! = 8! / 5! = (8 × 7 × 6 × 5!) / 5! = 8 × 7 × 6 = 336.
There are 336 possible podium arrangements. This makes sense: 8 choices for gold, then 7 remaining for silver, then 6 remaining for bronze = 8 × 7 × 6 = 336.
Permutation vs Combination Comparison
| n | r | P(n,r) | C(n,r) | Ratio P/C |
|---|---|---|---|---|
| 5 | 2 | 20 | 10 | 2 (= 2!) |
| 6 | 3 | 120 | 20 | 6 (= 3!) |
| 8 | 3 | 336 | 56 | 6 (= 3!) |
| 10 | 4 | 5,040 | 210 | 24 (= 4!) |
Frequently Asked Questions
A permutation is an ordered arrangement. P(n,r) counts the ways to choose r items from n and place them in order. AB and BA are different permutations but the same combination.
P(5,2) = 5!/(5−2)! = 5!/3! = 5×4 = 20. There are 20 ways to pick 2 items from 5 and arrange them in order.
Order matters in permutations (AB ≠ BA); order doesn't matter in combinations (AB = BA). P(n,r) = C(n,r) × r!. Permutations always ≥ combinations for r ≥ 2.
P(n,n) = n! — all possible orderings of n items. P(4,4) = 4! = 24 means 4 items can be arranged in 24 different sequences.
Use permutations when the order/sequence matters: ranking results, creating codes, assigning positions, arranging objects in a row. Use combinations when selecting a group where position doesn't matter.
P(4,4) = 4! = 24 ways. The first seat has 4 choices, the second has 3, the third has 2, and the last has 1 choice. 4 × 3 × 2 × 1 = 24. This is the full arrangement of all n items.
When items can be repeated, the formula is nʳ instead of P(n,r). A 4-digit PIN using digits 0–9 with repetition: 10⁴ = 10,000 possibilities. Without repetition: P(10,4) = 10×9×8×7 = 5,040 possibilities — fewer because digits cannot repeat.