Permutation Calculator
Count ordered arrangements when changing positions makes a different outcome. Enter the number of available items and positions, then choose whether each item can be used again.
Permutations
- nPr = n! ÷ (n − r)!: the number of ordered arrangements of r items from n.
- Order matters: ABC and CBA count as different.
- Example: 1st, 2nd and 3rd place from 10 runners = 10 × 9 × 8 = 720.
- With repetition allowed, it is nʳ instead.
How to use the Permutation Calculator
- Enter the total number of available items n.
- Enter how many items r will be selected or arranged.
- Choose whether repetition is allowed.
- Without repetition, the calculator uses n! divided by (n − r)!.
- With repetition, the number of ordered sequences is n raised to the power r.
Repetition changes the count a lot
Permutations count ordered arrangements. Without repetition, each item can be used once, so the number of choices drops by one at each position: nPr = n! ÷ (n − r)!. With repetition, every position has all n choices again, giving nʳ.
The difference matters for codes and passwords. A 4-digit PIN allows repeated digits (1123 is fine), so there are 10⁴ = 10,000 possible PINs, not 10P4 = 5,040. For races, prizes and seating, each person can only appear once, so nPr is the right formula.
Order, repetition and empty arrangements
Both counts must be whole numbers from 0 to 1000. Without repetition r cannot exceed n and the count is the falling product n×(n−1)×… . With repetition it is n^r. Results use exact BigInt arithmetic.
Examples
10 choose 3 where order matters
10P3 = 10 × 9 × 8 = 720 possible ordered arrangements.
PIN-style arrangement
If 10 possible digits can be used in each of 4 positions with repetition, there are 10⁴ = 10,000 ordered sequences.
Permutation versus combination
ABC and CBA count as different permutations because their order is different.
Podium finishes
8 runners compete for gold, silver and bronze. The number of possible podiums is 8P3 = 8 × 7 × 6 = 336, because order matters and a runner can't take two medals.
Arranging every item
5 books on a shelf can be arranged in 5P5 = 5! = 120 ways. When r equals n, the permutation count is simply n factorial.
Check the result in context
Positions matter: choosing and ordering 3 of 10 gives 10×9×8 = 720. Allowing repetition gives 10³ = 1000.
nPr values
| n | r = 2 | r = 3 | r = 4 |
|---|---|---|---|
| 4 | 12 | 24 | 24 |
| 5 | 20 | 60 | 120 |
| 6 | 30 | 120 | 360 |
| 7 | 42 | 210 | 840 |
| 8 | 56 | 336 | 1,680 |
| 9 | 72 | 504 | 3,024 |
| 10 | 90 | 720 | 5,040 |
With and without repetition
| Situation | With repetition (nʳ) | Without repetition (nPr) |
|---|---|---|
| 4-digit PIN (digits 0–9) | 10,000 | 5,040 |
| 3 capital letters | 17,576 | 15,600 |
| 6 characters from a–z and 0–9 | 2,176,782,336 | 1,402,410,240 |
| Top 3 finishers from 8 runners | 512 | 336 |
Frequently asked questions
What is a permutation?
A permutation is an arrangement where order matters. Changing the order creates a different outcome.
What is nPr?
nPr represents the number of ways to arrange r items selected from n distinct items without repetition.
What is the difference between a permutation and combination?
Permutations treat different orders as different outcomes. Combinations count only which items are selected, regardless of order.
Can permutations allow repetition?
Yes. When repetition is allowed and there are n choices for each of r positions, the count is n raised to r.
Why is 0! equal to 1?
There is exactly one way to arrange nothing: the empty arrangement. Defining 0! = 1 also keeps formulas like nPn = n! ÷ 0! working.
What is nPn?
The number of ways to arrange all n items in order, which equals n!. For example, 4P4 = 24.
How many ways are there to select zero items?
Exactly one empty arrangement, including from an empty set. Thus nP0 = 1 and the repeated-choice count for zero positions is also 1.
More math tools
Combination Calculator
Calculate nCr combinations with or without repetition.
Open tool →Probability Calculator
Calculate simple and independent-event probabilities.
Open tool →Factor Calculator
Find factors, factor pairs and prime factorization for a whole number.
Open tool →Scientific Calculator
Advanced calculator for trig, logs, roots, powers, factorials and more.
Open tool →Decimal to Fraction Calculator
Convert decimals and repeating decimals to simplified fractions and mixed numbers.
Open tool →Mean Median Mode Range Calculator
Calculate mean, median, mode, range, quartiles and IQR.
Open tool →