Calculate permutations P(n, r): the number of ways to choose r items from n and arrange them in order. Covers n up to 20.
Inputs
Permutations (nPr)
P(n,\, r) = \dfrac{n!}{(n - r)!}
nrP(n,r)
Results
Number of ordered arrangements of r items chosen from n: n! / (n − r)!.
P(n, j)0
Definition
A permutation counts the number of ways to choose items from a set of distinct items and arrange them in a specific order. Because the sequence matters, selecting {A, B} is a different outcome from {B, A}.
The formula is:
P(n,r)=(n−r)!n!=n×(n−1)×⋯×(n−r+1)
Worked example
How many 3-letter codes can be formed from the letters {A, B, C, D, E} without repeating any letter?
P(5,3)=(5−3)!5!=2120=60
Intuitively: 5 choices for the first position, 4 for the second (one letter is gone), 3 for the third — giving .
Permutation vs. combination
The distinction comes down to whether order matters.
Scenario
Tool
Reason
3 medalists (gold / silver / bronze) from 10 athletes
$P(10, 3)$
Different medals → different outcomes
3-person committee from 10 candidates
$C(10, 3)$
Only membership matters
4-digit PIN, no repeated digit
$P(10, 4)$
Sequence of digits defines the PIN
4-number lottery from 1–40
$C(40, 4)$
Only which numbers, not drawn order
The relationship between the two: . Each combination corresponds to permutations — all the orderings of the same selected group. Use the Combination Calculator — C(n, r) to compute directly.
Special cases
$r = 0$: $P(n, 0) = 1$ for any . There is exactly one way to arrange zero items.
: . This is the total number of arrangements of all items (see the Factorial Calculator for large values).
: Undefined — you cannot select more items than exist. The calculator reports an error.
Common applications
Race results: finishing positions in a race (order determines 1st/2nd/3rd)
Passwords and PINs: sequences where each character position is distinct
Scheduling: assigning tasks to time slots in sequence
Seating arrangements: placing people in numbered chairs
Practical notes
Large results. $P(20, 10) = 670{,}442{,}572{,}800$ — over 670 billion. Even within the limit, results can be very large. This calculator returns exact integer values throughout.
With repetition. The formula above assumes without replacement: no item appears twice. If repetition is allowed (e.g., a PIN where the same digit can repeat), the count is simply .
Frequently Asked Questions (FAQ)
What is a permutation?
A permutation P(n, r) is the number of ways to select r items from a set of n distinct items and arrange them in a specific order. Because the sequence matters, choosing {A, B} is different from choosing {B, A}. The formula is P(n, r) = n! / (n − r)!.
What is the difference between a permutation and a combination?
Use a permutation when order matters (seating arrangements, race rankings, lock codes). Use a combination when order does not matter (selecting a committee, choosing lottery numbers). For the same n and r, P(n, r) = C(n, r) × r!, so permutations are always at least as large as combinations.
How is P(n, r) calculated?
P(n, r) = n! / (n − r)!. Equivalently, it is the product n × (n−1) × … × (n−r+1) — a descending chain of r factors starting from n. Example: P(5, 3) = 5 × 4 × 3 = 60.