The Permutation Calculator on FreeToolZones counts how many ways you can arrange r items chosen from n items when the order matters, using exact integer arithmetic for n up to 1000. Permutations answer questions such as: in how many orders can 3 runners finish a race, how many 4-digit codes can be formed from 10 digits without repetition, and in how many ways can 5 books be arranged on a shelf? In each case, swapping two items creates a different outcome, so every ordering counts separately. That is what makes permutation counts larger than combination counts for the same n and r, by a factor of r factorial.
The formula is P(n, r) equals n factorial divided by n minus r factorial. It can also be read as a product of r terms: n times n minus 1 times n minus 2, down to n minus r plus 1. For P(10, 3), the product is 10 times 9 times 8, which is 720. The reasoning is direct: there are 10 choices for the first position, 9 remaining choices for the second, and 8 for the third. Multiplying gives the total number of ordered arrangements. The Permutation Calculator computes that product exactly, shows the full integer, the digit count, and the formula, and states the result as a sentence about arranging items.
What Is the Permutation Calculator?
The Permutation Calculator takes two whole numbers, n for the total items and r for the items arranged, and returns P(n, r), the number of ordered arrangements of r distinct items chosen from n. It requires n and r to be 0 or greater, r no greater than n, and n no greater than 1000, the same limits as the Combination Calculator. The computation multiplies the r terms from n down to n minus r plus 1, using exact integer arithmetic, so the result is exact even when it has hundreds of digits.
The relationship to factorials and combinations is exact and useful. P(n, r) equals C(n, r) times r factorial, because you can first choose the r items, in C(n, r) ways, and then arrange them, in r factorial ways. For n equal to 10 and r equal to 3, C(10, 3) is 120, 3 factorial is 6, and their product is 720, which matches P(10, 3). When r equals n, P(n, n) equals n factorial, the number of ways to arrange all n items. When r is 0, P(n, 0) is 1, the empty arrangement, consistent with the factorial formula since 0 factorial is 1.
The display shows the result as a full integer, the number of digits, the formula P(n, r) equals n factorial divided by n minus r factorial, and a sentence stating how many ways there are to arrange r items chosen from n. That sentence is the key to using the tool correctly: if your problem is about arranging, ordering, ranking, or sequencing, permutations apply. If it is about selecting a set where order is irrelevant, combinations apply instead, and the Combination Calculator is the right tool.
How to Use the Permutation Calculator
- Enter the total number of items n in the n field. The tool starts with 10 as an example.
- Enter the number of items arranged r in the r field, labelled items arranged to distinguish it from the combination tool’s items chosen. The tool starts with 3 as an example.
- Press Calculate, or change either field, because the result updates automatically as you type.
- Read the large display, which shows P(n, r) and the full integer result, then check the number of digits, the formula, and the explanatory sentence.
With the defaults, P(10, 3) is 720, with 3 digits. Try P(5, 2) to get 20: 5 times 4 is 20. Try P(8, 3) to get 336: 8 times 7 times 6 is 336. Try P(5, 5) to get 120, which is 5 factorial, the number of ways to arrange all 5 items. Try P(10, 2) to get 90. Try P(10, 0) to get 1, and P(10, 1) to get 10, since there are 10 choices for a single arranged item. Each of these can be verified by the product reading: multiply r consecutive descending numbers starting from n.
If r is greater than n, the tool reports that r cannot be greater than n. If either input is negative, decimal, or missing, it reports the whole-number requirement. If n exceeds 1000, it reports the limit. Entering n and r in the wrong order is the most common mistake: P(3, 10) is impossible, while P(10, 3) is 720. If you see the r-greater-than-n message, check whether you swapped the fields.
Key Features of the Permutation Calculator
- Exact results: Permutation counts are computed with exact integer arithmetic, so large results show every digit correctly.
- Order-sensitive counting: Implements the permutation definition, where different orders of the same items count separately.
- Product computation: Multiplies the descending terms directly, which is efficient and exact for n up to 1000.
- Digit count: Shows the number of digits in the result, giving an immediate sense of the size of the count.
- Formula display: Shows P(n, r) equals n factorial divided by n minus r factorial, so the method is visible.
- Plain-language result: States the count as a sentence about arranging items, helping learners connect the number to the problem.
- Live updates: Results recalculate as you type, making it easy to explore how P(n, r) grows with n and r.
Permutation counts grow very quickly, faster than combination counts, because each additional arranged position multiplies by a large factor. P(20, 5) is 1860480, while C(20, 5) is 15504: the ratio is 120, which is 5 factorial, as expected. P(52, 5) is 311875200, the number of ordered 5-card sequences from a deck, compared with 2598960 unordered hands. That factor of 120 is the number of orders of 5 cards. Understanding the factor r factorial lets you convert between the two counts in either direction, and it explains why the two calculators, which share input limits and validation, give such different answers for the same inputs.
Practical Use Cases and Worked Examples
Example 1: Race finishes and rankings
Ten runners compete, and you want the number of possible top-3 finishes, gold, silver, and bronze. The answer is P(10, 3), which is 720. Order matters, because first place differs from third place. If you only cared which 3 runners medalled, without distinguishing places, the answer would be C(10, 3), which is 120. The factor of 6 between them is the number of orders of 3 medallists. For a class of 30 students electing a president, vice-president, and secretary, with distinct offices, the count is P(30, 3), which is 30 times 29 times 28, which is 24360.
Example 2: Codes and passwords without repetition
How many 4-digit codes can be formed from the digits 0 through 9 without repeating a digit? The answer is P(10, 4), which is 10 times 9 times 8 times 7, which is 5040. The first digit has 10 choices, the second 9, the third 8, and the fourth 7. Note that codes allowing repetition, where each digit can be reused, follow a different count: 10 to the power of 4, which is 10000. The Permutation Calculator counts arrangements without repetition, where each item is used at most once. If your code allows repeats, use the Exponent Calculator instead.
Example 3: Arranging books and seating
Five distinct books can be arranged on a shelf in P(5, 5) ways, which is 120, equal to 5 factorial. Choosing and arranging 3 books from 10 on a display shelf gives P(10, 3), which is 720. Seating 8 people in 8 chairs gives P(8, 8), which is 40320. Seating 4 people chosen from 12 in 4 specific chairs gives P(12, 4), which is 12 times 11 times 10 times 9, which is 11880. In each case, swapping two items creates a different arrangement, so permutations apply. If the chairs were identical and only the set of seated people mattered, combinations would apply instead.
Example 4: Ordered card sequences
Dealing 3 cards in order from a 52-card deck gives P(52, 3) possible sequences, which is 52 times 51 times 50, which is 132600. The unordered count, C(52, 3), is 22100, and the ratio is 6, which is 3 factorial, the number of orders of 3 cards. Card games that care about the order of dealing, such as certain trick-taking or sequencing games, use permutations. Games that care only about the hand use combinations. The distinction is in the rules of the game, not in the cards themselves.
Example 5: Schedules and itineraries
You plan to visit 4 cities chosen from 9, in a specific order. The number of itineraries is P(9, 4), which is 9 times 8 times 7 times 6, which is 3024. Visiting the same 4 cities in a different order is a different trip, with different travel legs, so order matters. Scheduling 6 tasks in a day, where the order affects the outcome, gives 6 factorial, which is 720, possible schedules. If two tasks are interchangeable, the count is smaller, and you would divide by the factorial of the repeat count, a refinement the tool does not perform directly.
Example 6: Large counts and digit growth
Enter n as 100 and r as 10 to see P(100, 10), which is a 20-digit number: 100 times 99 times 98 and so on down to 91. The digit count is shown alongside the full integer. Enter n as 1000 and r as 3 to get 997002000, which is 1000 times 999 times 998. Enter n as 52 and r as 52 to get 52 factorial, an enormous 68-digit number, the number of possible orderings of a full deck. The exact integer arithmetic handles these sizes without rounding, which is essential when the count will be used in a probability denominator.
Tips and Best Practices
First, ask the order question: does swapping two items change the outcome? If yes, use permutations. If no, use combinations. Second, verify small cases by listing: P(4, 2) is 12, and the ordered pairs from A, B, C, D are AB, AC, AD, BA, BC, BD, CA, CB, CD, DA, DB, DC, which is 12, twice the 6 unordered pairs, because each pair has 2 orders. Third, use the product reading to check: P(n, r) is r terms multiplied, starting at n and descending. If your product has the wrong number of terms, r was misread.
Fourth, remember that permutations here are without repetition: each item is used at most once. Problems allowing reuse need powers, not permutations. Fifth, for full arrangements, P(n, n) equals n factorial, so you can cross-check with the Factorial Calculator. Sixth, convert between permutations and combinations with the factor r factorial: P(n, r) divided by r factorial is C(n, r). Finally, keep n and r in the correct fields, and check the digit count: a surprisingly large digit count usually means n or r is larger than intended.
Limitations
The Permutation Calculator computes P(n, r) for whole numbers with n from 0 to 1000 and r from 0 to n, without repetition. It does not compute permutations with repetition, circular permutations, permutations of multisets with repeated items, or derangements. It does not list the arrangements themselves, only the count. It does not compute probabilities directly, although the count can be used as a numerator or denominator in a probability.
Inputs must be whole numbers. The result is shown as a full integer, which may be very long for n near 1000 and r large. The tool does not show the step-by-step product or the factorial values, although the formula is displayed. It does not handle non-integer or negative inputs, and it does not compute the gamma-function generalization.
Frequently Asked Questions
What is a permutation?
It is an ordered arrangement of items. The arrangements ABC and CBA are different permutations, even though they contain the same items. The count is given by P(n, r).
What is P(10, 3)?
It is 720, computed as 10 times 9 times 8. There are 720 ways to arrange 3 items chosen from 10 when order matters.
What is the difference between permutations and combinations?
In permutations, order matters, so each ordering counts separately. In combinations, order does not matter, so each set counts once. P(10, 3) is 720, while C(10, 3) is 120, differing by a factor of 6, which is 3 factorial.
What is P(n, n)?
It is n factorial, the number of ways to arrange all n items. For example, P(5, 5) is 120.
Can items repeat in a permutation?
Not in this tool. Each item is used at most once. Arrangements allowing repetition are counted with powers: for example, 4-digit codes with repeats allowed number 10 to the power of 4, which is 10000.
What is the largest n supported?
One thousand. The limit keeps results manageable while covering all practical arrangement problems.
Related Tools
Continue with the Combination Calculator for counting where order does not matter, the Factorial Calculator for the factorials in the formula, the Probability Calculator for probability work, the Exponent Calculator for arrangements with repetition, and the Scientific Calculator for product checks. You can also return to the FreeToolZones home page to browse the full tool collection.