
Permutation Calculator
Free permutation calculator: find nPr with the formula nPr = n!/(n-r)!, plus worked examples and how permutations differ from combinations.
There was an error with your calculation.
Permutation
6720
Permutation calculator at a glance#
A permutation calculator works out how many ordered arrangements you can make by choosing r items from a set of n, written nPr. The formula is nPr = n! / (n - r)!, where n! is the factorial of n. Order matters, so AB and BA count as two different permutations.
For example, 5P2 picks 2 items from 5 in order: 5P2 = 5! / 3! = 120 / 6 = 20. There are 20 ways to arrange 2 of the 5 in order.
| N | R | Npr |
|---|---|---|
| 5 | 2 | 20 |
| 5 | 3 | 60 |
| 6 | 2 | 30 |
| 6 | 3 | 120 |
| 10 | 2 | 90 |
| 10 | 3 | 720 |
To work it out by hand, take the factorial of n, divide by the factorial of (n - r), and the result is the number of ordered selections. Permutations differ from combinations: combinations ignore order and use nCr = n! / (r!(n - r)!), so 5C2 = 10, which is half of 5P2 because each unordered pair has 2 orderings.
Enter your n and r in the calculator above for the exact number of permutations. For very large values the result grows fast, since factorials increase quickly.
Factorials, the building block#
A factorial, written n!, is the product of every positive integer up to n. So 3! = 3 times 2 times 1 = 6, and 5! = 120. Factorials count the full orderings of a set: there are 6 ways to arrange the letters A, B, C (ABC, ACB, BAC, BCA, CAB, CBA), which is 3!. Arranging all n items is the special case nPr where r equals n, so nPn = n!. By definition 0! = 1.
Permutations of a subset#
When you arrange only some of the items, use nPr = n! / (n - r)!. Picking and ordering 3 items from 6 gives 6P3 = 6! / 3! = 720 / 6 = 120. A faster way by hand is to multiply r descending factors starting at n: 6P3 = 6 times 5 times 4 = 120. The two methods always agree.
Permutations vs combinations#
Use a permutation when order matters and a combination when it does not. A 3-digit code where 1-2-3 differs from 3-2-1 is a permutation. Choosing 3 pizza toppings, where the order you list them changes nothing, is a combination. Combinations use nCr = n! / (r! (n - r)!), which is always smaller: 5C2 = 10 while 5P2 = 20, because each unordered pair of 2 has 2! = 2 orderings.
When items repeat#
The nPr formula assumes distinct items chosen without reuse. Two other cases come up. If each position can reuse any item (like a PIN where digits can repeat), the count is n to the power r: a 4-digit PIN from 10 digits is 10 to the 4th = 10,000. If the set itself contains identical items, divide n! by the factorial of each repeated group: the arrangements of the letters in LEVEL are 5! / (2! times 2!) = 30, because there are two Ls and two Es.
Frequently asked questions#
What is a permutation?#
A permutation is an ordered arrangement of items. Order is what defines it: ABC and CAB use the same letters but are two different permutations.
How do you calculate the number of permutations?#
Use nPr = n! / (n - r)!, where n is the total number of items and r is how many you arrange. For example, 5P2 = 5! / 3! = 120 / 6 = 20.
What is the difference between a permutation and a combination?#
Permutations count ordered arrangements; combinations count unordered selections. For the same n and r, nPr is always r! times larger than nCr, because each combination can be ordered r! ways.
Can the formula handle repeating elements?#
Not directly. The nPr formula is for distinct items used once. If positions may reuse items, use n to the power r. If the set has identical items, divide n! by the factorial of each repeated group.
How does the permutation calculator work?#
Enter n (total items) and r (items to arrange). The calculator applies nPr = n! / (n - r)! and returns the exact count. Factorials grow fast, so large inputs produce very large results.