How to use the Permutation Calculator
Enter Number of items (n) and Number arranged (r), choose the repetition setting, and select Calculate. Both values must be whole numbers from 0 through 10,000.
Choose whether repetition is allowed
Select No repetition when each item can be used at most once. The calculator uses P(n, r) = n! / (n - r)!, and r cannot exceed n.
Select Allow repetition when an item may be used more than once. The calculator uses P(n, r) = nr, so r may exceed n. Changing this option clears an existing validation error.
Calculate a permutation
- Enter valid values in Number of items (n) and Number arranged (r).
- Select No repetition or Allow repetition.
- Select Calculate.
With No repetition, correct r if it is greater than n. The calculator shows an error instead of a result until the values meet the validation rules.
Read and use the result
The result is a dimensionless count of ordered arrangements. Formula & steps shows the selected formula, the relevant factor or power expression, and the final exact integer. For r = 0, or for n = 0 with repetition allowed and r > 0, it shows a specific zero-case explanation instead of the normal factor or power expression.
- Select Copy result to copy the generated answer. If clipboard access fails, the message is Could not copy - select and copy manually.
- Select Download result (.txt) to save
permutation-calculator-result.txt. - Select Reset to clear both inputs, restore No repetition, hide the result, and clear the error message.
Validation and limitations
- Enter non-negative whole numbers only. Values above 10,000 are rejected.
- No repetition rejects
r > n; Allow repetition accepts it. r = 0produces1. With repetition allowed,n = 0andr > 0produces0.- The calculation uses exact integer arithmetic with JavaScript
BigInt. - The arithmetic runs in the browser, while the page also loads Ahrefs Analytics and Google Analytics scripts.
Frequently Asked Questions
What is a permutation in math?
A permutation is an ordered arrangement of items from a set, where the order in which items appear matters. Arranging 3 runners from a field of 10 into 1st, 2nd, and 3rd place is a permutation, because putting Alice first and Bob second is a different outcome from putting Bob first and Alice second.
What is the formula for permutations (nPr)?
Without repetition, the number of permutations of r items chosen from n items is P(n, r) = n! / (n - r)!, where n! means n factorial. With repetition allowed, it is P(n, r) = n^r.
What is the difference between a permutation and a combination?
A permutation counts different orderings as distinct outcomes, while a combination ignores order (choosing items A and B is the same as choosing B and A). Permutations are always greater than or equal to the corresponding combinations for the same n and r.
What does permutation with repetition mean?
Permutation with repetition allows the same item to be chosen more than once in a single ordered arrangement, such as forming a 4-digit code from 10 digits where a digit can repeat. It is calculated as n^r instead of n! / (n - r)!.
Can r be larger than n?
Without repetition, no - you cannot arrange more items than exist in the set, so r must be less than or equal to n. With repetition allowed, r can be larger than n, since items may be reused in different positions.