Skip to content
Calculator Collection

Permutation Calculator

Calculate the number of ordered arrangements of r items chosen from n distinct items, where the order of selection matters. Ideal for rankings, sequences, and any selection where position counts.

Last updated: May 2026

Fill in the required fields to see your result.

Compare with similar

About this calculator

A permutation counts the number of ways to arrange r items selected from a set of n distinct items when the order matters. The formula is P(n, r) = n! / (n − r)!, where n! (n factorial) is the product of all positive integers up to n. Intuitively, you have n choices for the first position, n − 1 for the second, n − 2 for the third, and so on for r positions, which the factorial ratio captures exactly. Order is the defining feature: arranging the same items in a different sequence counts as a different permutation, so selecting gold-silver-bronze medalists from a race is a permutation because finishing first is different from finishing third. This distinguishes permutations from combinations, which ignore order and are always fewer in number — specifically, P(n, r) = C(n, r) × r!, since each unordered selection can be ordered in r! ways. Permutations appear in probability, scheduling, cryptography, and any counting problem involving sequences, rankings, passwords, or routes. Edge cases: P(n, n) = n! (arranging all items), P(n, 0) = 1 (one way to arrange nothing, the empty arrangement), and P(n, r) is undefined or zero when r exceeds n, because you cannot arrange more items than you have. The numbers grow extremely fast because of the factorial, so even modest values of n and r can produce very large results.

How to use

Example 1 — arranging 3 of 10 items in order. Enter n = 10, r = 3. P(10, 3) = 10! / 7! = 10 × 9 × 8 = 720. Verify: there are 10 choices for the first position, 9 for the second, and 8 for the third, and 10 × 9 × 8 = 720, matching the formula. Example 2 — arranging 2 of 5 items. Enter n = 5, r = 2. P(5, 2) = 5! / 3! = 5 × 4 = 20. Verify: 5 choices for the first slot and 4 for the second gives 5 × 4 = 20 ordered pairs, such as selecting and ranking 2 finalists from 5 candidates.

Frequently asked questions

What is the difference between a permutation and a combination?

The key difference is whether order matters. A permutation counts ordered arrangements, so ABC and CBA are different, while a combination counts unordered selections, so ABC and CBA are the same. As a result, there are always more permutations than combinations for the same n and r — specifically r! times more, since each combination can be arranged in r! orders. Use permutations for rankings, sequences, passwords, and races where position matters; use combinations for committees, lottery draws, and hands of cards where only the group matters. Choosing the wrong one is the most common counting mistake. Always ask yourself: does rearranging the chosen items create a genuinely different outcome?

Why does order matter in a permutation?

Order matters whenever rearranging the same items produces a meaningfully different result. In a race, awarding gold, silver, and bronze to three runners is a permutation because first place is distinct from third — swapping two runners changes the outcome. The same applies to assigning people to specific roles, creating a sequence of digits in a PIN, or scheduling tasks in a particular order. Each of the r positions is treated as distinct, which is why you multiply n by progressively smaller numbers. If swapping two selections would not change anything meaningful, you actually want a combination, not a permutation.

What does P(n, 0) equal and why?

P(n, 0) equals 1, because there is exactly one way to arrange zero items: the empty arrangement, where you select and order nothing. This follows from the formula P(n, 0) = n! / n! = 1, and it mirrors the convention that 0! = 1. While it may seem like a trivial or strange case, defining it as 1 keeps counting formulas consistent, especially in probability and combinatorics where empty selections arise naturally. It is the analog of the fact that there is one way to do nothing. Recognizing this edge case prevents errors when r happens to be zero in a larger calculation.

Why do permutations grow so quickly?

Permutations grow rapidly because they are based on factorials, which increase faster than any exponential function. Each additional position multiplies the count by another factor, so the numbers explode: arranging just 10 items in full produces over 3.6 million permutations, and 13 items exceed 6 billion. This is why even small increases in n or r dramatically enlarge the result, and why permutation counts quickly exceed what standard number types can hold exactly. It also explains why brute-force approaches that try every ordering become infeasible fast — a key idea in computer science. Expect very large outputs even for modest inputs.

When should I NOT use a permutation calculator?

Do not use it when order does not matter — for selecting an unordered group, such as a committee, a poker hand, or lottery numbers, you need a combination calculator instead, which gives a smaller count. It also assumes the items are distinct and that none are repeated; if some items are identical or repetition is allowed, you need a different formula (permutations with repetition or with identical items). It is undefined when r exceeds n, since you cannot arrange more items than you have. For very large n and r, be aware the exact result may overflow standard precision. Always confirm that order is genuinely significant before choosing permutations.

Sources & references