A permutation is an arrangement in which order matters: gold, silver and bronze going to Ann, Ben and Cara is different from Ben, Ann and Cara. The number of ways to fill r ordered positions from n distinct objects is n × (n − 1) × … × (n − r + 1), written nPr or P(n, r). Arranging all n objects gives n! permutations: 3,628,800 ways to line up 10 books.
When the same object may be used repeatedly, every position has n choices and the count is nʳ. That is how PIN codes, licence plates and passwords are counted: a 4-digit PIN has 10⁴ = 10,000 possibilities, a 10-character password using 62 letters and digits has 62¹⁰ ≈ 8.39 × 10¹⁷.
Choose the type, enter n and r, and the calculator returns the exact count (with every digit for numbers up to 24 digits), the combination count for comparison and the odds of guessing one arrangement. Type your own objects to see the arrangements listed (up to 300 of them), which helps when checking a schedule, a seating plan or a homework answer.
How to use the Permutation Calculator
- Number of objects to choose from (n): Ignored when you type the objects themselves below.
- Number chosen (r)
- Type of selection
- Objects to list (optional, comma-separated): If you type names here, n is taken from how many you entered and the list below uses them.
- List the selections
Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.
How it works
Without repetition the calculator multiplies the r largest factors n, n − 1, …, n − r + 1. With repetition it multiplies n by itself r times. All arithmetic is exact. Listing follows dictionary order and stops at 300 entries.
Worked example
Nine cards numbered 1 to 9; how many ordered 3-card sequences can be dealt? P(9, 3) = 9 × 8 × 7 = 504. Each set of 3 cards can be ordered 3! = 6 ways, so there are 504 ÷ 6 = 84 combinations. If each card were returned before the next draw there would be 9³ = 729 sequences.
Permutation counts at a glance
| Situation | Formula | Count |
|---|---|---|
| Podium places from 10 runners | P(10, 3) | 720 |
| Arrange 5 books on a shelf | 5! | 120 |
| 4-digit PIN | 10⁴ | 10,000 |
| Licence plate: 3 letters + 3 digits | 26³ × 10³ | 17,576,000 |
| Batting order of 9 players | 9! | 362,880 |
Formula
P(n, r) = n! ÷ (n − r)!
With repetition: nʳ
P(n, r) = C(n, r) × r!
Worked example
Inputs: Number of objects to choose from (n): 10; Number chosen (r): 3; Type of selection: Permutations – order matters, no repeats; Objects to list (optional, comma-separated): ; List the selections: Yes – show up to 300.
Results: Number of permutations = 720; Permutations without repetition P(n, r) = 720; Permutations with repetition nʳ = 1,000; Combinations C(n, r) (if order did not matter) = 120; Chance of guessing one particular arrangement = 1 in 720 (0.138889%); Orderings of r items (r!) = 6.
Key terms
- Permutation
- An ordered arrangement of objects.
- nPr
- The number of permutations of r objects taken from n, n!/(n − r)!.
- Permutation with repetition
- An arrangement where objects may be reused, counted as nʳ.
Frequently asked questions
How many ways can 3 medals go to 10 runners?
P(10, 3) = 10 × 9 × 8 = 720.
How many 4-digit PINs are there?
With repetition 10⁴ = 10,000; with all digits different, P(10, 4) = 5,040.
What is the difference between nPr and nCr?
nPr counts ordered arrangements, nCr unordered selections. nPr = nCr × r!, so P(10, 3) = 120 × 6.
How many ways can the letters of a word be arranged?
n! for distinct letters (WORD: 4! = 24). With repeated letters divide by the factorial of each repeat count (LETTER: 6! ÷ (2! × 2!) = 180).
What is P(n, n)?
n!, the number of ways to arrange all n objects. P(n, 0) = 1.
How many 3-digit numbers can be made from the cards 0–8 with no repeats?
8 × 8 × 7 = 448, because the first digit cannot be 0.
Why does the count grow so fast?
Factorials grow faster than any power: 20! already exceeds 2.4 × 10¹⁸.