A permutation counts arrangements in which order matters. Choosing Ana, Ben, and Cara for three distinct positions is different from assigning Ben, Ana, and Cara to those same positions. The members may be identical as a set, but the arrangement changes because the positions or sequence change.
How to use the Permutation Calculator
Enter n, the total number of distinct available items, and r, the number of ordered positions to fill. Both values must be whole numbers, n must be nonnegative, and r must be between 0 and n. Then select Calculate nPr.
The blue card gives the exact ordered arrangement count. The supporting cards show the corresponding combination count nCr, the order factor r!, and the number of unused items n−r. These supporting results make the distinction between ordered and unordered selection visible rather than treating nPr as an isolated formula.
Use nPr when changing the order, role, rank, seat, position, or sequence creates a different outcome. Examples include awarding first, second, and third place; selecting officers with distinct offices; creating a nonrepeating code from distinct symbols; or assigning selected people to labeled positions.
What does nPr mean?
The notation nPr, P(n,r), or “permutations of n objects taken r at a time” counts ordered selections of r distinct items from n distinct available items, without repetition.
nPr = P(n,r) = ordered selections of r items from nFor example, P(5,2) counts ordered pairs from five distinct items. AB and BA are different permutations because the first and second positions have changed. There are 5 choices for the first position and 4 remaining choices for the second, giving 5 × 4 = 20.
The word ordered is the key. If AB and BA should be treated as the same outcome, the problem is a combination rather than a permutation.
The permutation formula
For integers n ≥ r ≥ 0, the standard formula is:
P(n,r) = n! / (n−r)!The factorial n! is the product n × (n−1) × ... × 2 × 1. Dividing by (n−r)! cancels the factors associated with the items that never reach one of the r selected positions.
After cancellation, the formula becomes a direct descending product:
P(n,r) = n(n−1)(n−2)...(n−r+1)That product is computationally efficient because only r factors are required. It also mirrors the counting logic directly: each filled position leaves one fewer available item for the next position.
Why the descending product works
Suppose 8 runners are eligible for gold, silver, and bronze. There are 8 choices for gold. Once gold is assigned, 7 runners remain for silver. After silver, 6 remain for bronze. By the multiplication principle, the number of possible podiums is 8 × 7 × 6 = 336.
This is exactly P(8,3). The count does not divide by 3! because gold-silver-bronze order matters. A podium of A-B-C is different from B-A-C.
The same logic applies to labeled jobs, numbered seats, sequence positions, and other contexts in which the slots are distinguishable.
Permutation vs combination
Permutations and combinations use the same pool of n distinct items, but they answer different questions. A combination asks which items? A permutation asks which items, and in what order or roles?
P(n,r) = C(n,r) × r!Each unordered group counted by C(n,r) can be arranged in r! orders. That is why the permutation count is r! times the combination count.
For n = 6 and r = 3, C(6,3) = 20 groups, while 3! = 6 orderings exist for each group. Therefore P(6,3) = 20 × 6 = 120.
If the selected members all have equal status and order is irrelevant, use nCr. If they occupy different positions or the sequence itself matters, use nPr.
Roles, rankings, and sequences
Many real problems hide the importance of order behind labels. Selecting three students for an equal committee is a combination. Selecting a president, vice president, and secretary from the same students is a permutation because each office is distinct.
Ranking finalists is also a permutation. Choosing which three athletes qualify is unordered, but assigning first, second, and third produces ordered outcomes.
Sequences are another common case. If a three-symbol sequence cannot repeat symbols, ABC and BAC are distinct arrangements. This matches nPr. If symbols may repeat, however, the count changes to a different model, often n^r when each of r positions can independently use any of n symbols.
This nPr calculator assumes no repetition
The standard formula P(n,r) = n!/(n−r)! assumes that once an item occupies a selected position, the same distinct item cannot be selected again. This is often described as selection without replacement.
If repetition is allowed, the counting rule is different. For example, a four-digit PIN with ten possible digits and unrestricted repetition has 10^4 sequences, not P(10,4). In P(10,4), a digit used once would be unavailable for the remaining positions.
Always decide whether replacement is allowed before choosing a counting formula. This calculator intentionally keeps its nPr interpretation precise: distinct items, ordered positions, no repetition.
0!, r = 0, and r = n
By convention and consistent counting logic, 0! = 1. That allows important permutation formulas to work cleanly.
P(n,0) = 1 because there is exactly one way to arrange zero selected items: the empty arrangement. P(n,n) = n! because when every item is selected, all n items can be ordered in the usual factorial number of ways.
P(n,1) = n because there are n choices for the single position. P(0,0) = 1 also fits the empty-arrangement interpretation.
Exact arithmetic for large permutation counts
Permutation counts can become enormous very quickly. Ordinary floating-point numbers cannot represent every large integer exactly, so software that relies only on standard decimal-number arithmetic can eventually round a value that is mathematically an exact whole number.
SonoCalculator uses JavaScript BigInt for the nPr result. The algorithm multiplies only the r required descending factors instead of building n! and (n−r)! separately. This keeps the arithmetic exact throughout the supported input range.
For extremely long answers, compact-card mode shows a readable scientific-style summary while the Calculation breakdown retains the full exact integer. Full-card mode is also available if you specifically want the complete integer inside each result card.
The n = 10,000 input cap is a practical browser safeguard, not a mathematical limitation of the permutation concept.
Worked permutation examples
Example 1: choose and rank 3 from 8
If first, second, and third place are awarded among 8 finalists:
P(8,3) = 8! / 5! = 8 × 7 × 6 = 336Example 2: assign 4 distinct offices from 10 people
President, vice president, secretary, and treasurer are different roles:
P(10,4) = 10 × 9 × 8 × 7 = 5,040Example 3: arrange all 6 objects
When r = n:
P(6,6) = 6! = 720Example 4: compare to combinations
For n = 7 and r = 2, C(7,2) = 21 unordered pairs. Each pair has 2! = 2 possible orders, so:
P(7,2) = 21 × 2 = 42Example 5: selecting no positions
P(12,0) = 1 because there is one empty ordered selection.
How permutations appear in probability
Permutations often help count ordered sample-space outcomes. For example, if a process draws several distinct items in sequence without replacement and every ordered sequence is equally likely, nPr may count the denominator of a probability calculation.
However, nPr is a count, not a probability by itself. A probability requires a model that determines how likelihood is distributed among the counted outcomes.
Some probability problems appear ordered during the physical process but ask about an unordered final event. In those cases, combinations can be more natural. Choosing the correct counting method depends on what outcomes the probability model treats as distinct.
Common nPr mistakes
Using nPr when order does not matter. Equal-role groups and ordinary subsets should generally use combinations.
Using nCr when roles or ranks are distinct. President and secretary assignments, podium finishes, and ordered codes should not be collapsed into unordered groups.
Allowing r to exceed n without replacement. You cannot fill more distinct positions with unique selected items than the number available.
Using decimal n or r. In this finite counting interpretation, both values represent item counts and must be whole numbers.
Ignoring repetition rules. Standard nPr does not allow the same item to be selected twice. Repetition changes the counting model.
Multiplying by r! twice. nPr already counts order. If you start with nPr, do not multiply by r! again.
Computing enormous factorials unnecessarily. The descending-product form n(n−1)...(n−r+1) is simpler and avoids huge canceled intermediate values.
Frequently asked questions
What does nPr stand for?
It means the number of ordered selections of r distinct items from n distinct available items without repetition.
What is the permutation formula?
P(n,r) = n!/(n−r)! for integers n ≥ r ≥ 0.
What is the difference between nPr and nCr?
nPr counts different orders separately; nCr treats different orders of the same selected set as one result.
Why is nPr equal to nCr × r!?
Each unordered r-item combination can be arranged in r! distinct orders.
What is P(n,0)?
It is 1, representing the single empty arrangement.
What happens when r = n?
The formula becomes P(n,n) = n!, because all n items are selected and arranged.
Can items repeat in nPr?
Not in the standard formula used here. nPr assumes no replacement.
Can n or r be negative or decimal?
Not for this finite ordered-selection model. Both must be nonnegative whole numbers, with r no greater than n.
Important note
This calculator uses the standard finite permutation model: n distinct available items, r ordered positions, and no repetition. If your problem allows repeated items, contains indistinguishable objects, uses circular arrangements, or treats some positions as equivalent, a different permutation model may be required rather than applying nPr directly.