Understanding Permutations
Permutations represent the number of ways to arrange a subset of items from a larger set where the order of arrangement matters. The notation nPr (read as "n permute r" or "P(n,r)") calculates how many different ordered sequences you can create by selecting r items from a total of n items. For example, if you have 10 athletes competing for gold, silver, and bronze medals, you're looking at 10P3 = 720 different possible podium arrangements because the order — who gets which medal — is significant.
The fundamental difference between permutations and combinations lies in whether order matters. When arranging books on a shelf, selecting race winners, or entering passwords, the sequence is crucial, making these permutation problems. When selecting a committee from a group where roles don't differ, order doesn't matter, making it a combination problem.
How to Use the Permutation Calculator
The calculator requires two numbers:
- n (total items): The size of the set you're choosing from. This must be a positive integer.
- r (items chosen): The number of items you're selecting and arranging. This must be a non-negative integer no larger than n.
The calculator returns nPr, which is the count of distinct ordered arrangements. It also shows the intermediate factorial values so you can see the calculation steps.
Important constraints:
- n must be at least 1
- r must be between 0 and n inclusive
- nP0 = 1 (there is exactly one way to arrange zero items — the empty arrangement)
- nPn = n! (arranging all n items uses n factorial)
For permutations with repetition allowed (like combinations lock codes where digits can repeat), use the formula nʳ instead, since each of the r positions has n independent choices.
Frequently Asked Questions
What is the difference between nPr and nCr? nPr (permutations) counts ordered arrangements — where (A, B, C) is different from (C, A, B). nCr (combinations) counts unordered selections — where {A, B, C} and {C, A, B} count as the same group. The relationship is nPr = nCr × r!. Use permutations when order matters (race positions, passwords, schedules) and combinations when it doesn't (lottery tickets, committees, selections).
What does nP0 equal? nP0 = 1 for any n. There is exactly one way to arrange zero items from n: choose nothing and arrange nothing. The formula confirms this: nP0 = n! / (n−0)! = n! / n! = 1.
What does nPn equal? nPn = n!, the total number of ways to arrange all n items. The formula gives nPn = n! / (n−n)! = n! / 0! = n! / 1 = n!.
How large can permutation numbers get? They grow very quickly. Even 20P10 = 20!/10! = approximately 670 billion. For n > 20 or so, exact integer calculations require arbitrary-precision arithmetic because the numbers exceed standard 64-bit integer limits. Logarithms are used in practice when only the magnitude matters rather than the exact count.
Why do permutations use factorials? Because counting ordered arrangements naturally involves multiplying decreasing sequences. Filling position 1 from n items, position 2 from the remaining n−1 items, position 3 from n−2 items, and so on generates the product n × (n−1) × (n−2) × ... = n! (for all positions) or n!/(n−r)! (for r positions). The factorial is simply a compact notation for this decreasing product.
When should I use permutations with repetition instead of standard permutations? Use n^r (permutation with repetition) when items can be reused across positions. Examples: generating PIN codes where digits repeat, counting possible outcomes of rolling a die multiple times, forming letter sequences where letters can repeat. Use the standard nPr formula when each item can only appear once across the arrangement — like assigning distinct prizes to distinct winners.
Can nPr be larger than nCr? Yes, always (for r ≥ 2). Since nPr = nCr × r!, and r! ≥ 2 for r ≥ 2, permutations are always at least as large as combinations for the same n and r. For r = 0 or r = 1, they're equal (since 0! = 1! = 1). This makes intuitive sense: permutations count more outcomes because they distinguish between orderings that combinations treat as identical.