Permutations Calculator
Calculate the number of permutations P(n, r)
Enter n (total items) and r (items arranged) to find how many ordered arrangements of r items can be made from n, where order matters.
Permutations explained: counting ordered arrangements
A permutation is an arrangement of items where the order in which items are selected or placed matters. If you are arranging 3 books from a shelf of 10 on a display stand where the first, second, and third positions are distinct, each different ordering is counted separately. Moving book A from position one to position two produces a different arrangement even though the same books are present. Permutations count these distinct ordered arrangements.
The formula for permutations is P(n, r) = n! / (n - r)!, where n is the total number of items and r is the number of positions to fill. For example, P(10, 3) = 10! / 7! = 10 x 9 x 8 = 720. There are 720 different ordered arrangements of 3 items chosen from 10. Compare this to C(10, 3) = 120 combinations, which is 720 / 6 (since 3! = 6), because each combination of 3 items can be arranged in 6 different orders.
Permutations arise in many real situations: the number of different podium outcomes in a race (who gets gold, silver, bronze), the number of different four-digit PIN codes that can be formed from digits 0-9 without repetition, the number of ways to seat guests at specific chairs, the number of different batting orders in baseball, and ranking problems in surveys where respondents list their top three choices in order.
This calculator uses logarithms of factorials to handle large values without overflow. For very large n and r, the result may exceed safe integer precision and will be shown in scientific notation. The maximum supported n is 10,000, though results become exponentially large well before that limit for large r values.
When to use permutations versus combinations
The decision between permutations and combinations comes down to whether order matters in your problem. A useful test is to take two arrangements of the same selected items and ask whether they would be considered the same result or different results. If they count as the same (like a committee of the same people regardless of who was named first), use combinations. If they count as different (like first place vs. second place in a competition), use permutations.
Another way to think about it: permutations = combinations x r!. Because each combination of r items can be arranged in r! different orders, the permutation count is always r! times larger than the combination count for the same n and r. When r = 1, combinations and permutations give the same answer (both equal n) because there is only one way to arrange a single item. When r = 2, permutations are twice as large as combinations because each pair can be placed in two orders.
Special cases worth knowing
P(n, 0) = 1 for any n: there is exactly one way to arrange nothing (the empty arrangement). P(n, 1) = n: choosing and placing one item from n gives n possibilities. P(n, n) = n!: arranging all n items gives n factorial arrangements. These edge cases all follow naturally from the formula. The factorial of zero is defined as 1, so P(n, n) = n! / 0! = n! / 1 = n!, which matches the intuitive count of all arrangements of n distinct items.