Permutation Calculator (nPr)
Counts the ways to choose and arrange r items from a set of n when the order matters, written P(n, r) or nPr. Choose whether items can repeat (like digits in a PIN) or not (like runners on a podium) and get the exact answer with the formula filled in. For small sets the calculator also lists the actual arrangements using letters A, B, C…, and shows the matching number of combinations where order does not matter.
- All n objects are distinct; n and r are whole numbers up to 1,000.
Formula
P(n, r) = n! ÷ (n − r)!; with repetition nʳ
- Order matters: AB and BA are different permutations.
- P(n, n) = n!, the number of ways to arrange all n objects.
- Each combination of r items can be ordered in r! ways, so P(n, r) = C(n, r) × r!.
- Arrangements are listed when there are at most 300 of them.
Arrange 3 of 5 objects
Inputs
- Total number of objects (n): 5
- Sample size (r): 3
- Can an object be used more than once?: no
P(5, 3) = 5! ÷ 2! = 5 × 4 × 3 = 60 ordered arrangements. As combinations (order ignored) there are 60 ÷ 3! = 10.
Sources & references
Frequently asked questions
When should I use permutations instead of combinations?
Use permutations when the order or position matters, such as passwords, seating plans or race finishes. Use combinations when only the group matters, such as a lottery ticket.
How many 4-digit PINs are there?
Digits can repeat, so it is 10⁴ = 10,000. Without repeated digits it would be P(10, 4) = 5,040.
How many ways can 8 runners finish first, second and third?
P(8, 3) = 8 × 7 × 6 = 336.
Related calculators
Combination Calculator (nCr) Counts the number of ways to choose r items from a set of n when the order does not matter, written C(n, r), nCr or 'n choose r'. Choose whether an item can be picked more than once (combinations with repetition) and see the exact answer, even for large numbers, with the formula filled in. Use it for lottery odds, choosing a team or committee, card hands and binomial coefficients. The matching number of permutations, where order matters, is shown for comparison. Factorial Calculator Calculates n! (n factorial), the product of all whole numbers from 1 to n, exactly, for any n from 0 to 5,000. Factorials grow extremely fast, so alongside the exact value you get the result in scientific notation, how many digits it has and how many zeros it ends with. Factorials count the ways to arrange n distinct objects in order and appear throughout probability, combinations and permutations. Standard Deviation Calculator Calculates the standard deviation of a list of numbers, the most common measure of how spread out data are around their mean. Paste or type your values separated by commas, spaces or new lines, and choose whether they are a sample from a larger group (dividing by n − 1) or the whole population (dividing by n). You also get the variance, mean, count, sum, sum of squared deviations, standard error of the mean, minimum, maximum and range.