Permutations Calculator with Steps: How It Works
- Factorial expansion
- Result
- Total items (n)
- 10
- You entered
- Items chosen (r)
- 3
- You entered
This permutations calculator works out the number of ways to arrange a set of items where order matters. You enter the total number of items (n) and how many you choose (r), and it returns the exact permutation count, along with a step-by-step breakdown of the calculation. The result is the number of distinct ordered arrangements possible, which is essential for probability, combinatorics, and scheduling problems.
Formula
The standard formula for permutations without repetition is:
nPr = n! / (n – r)!
Where:
- n = total number of distinct items (must be a positive integer)
- r = number of items selected and arranged (must be between 0 and n)
- n! (n factorial) = n × (n − 1) × (n − 2) × … × 1, with 0! defined as 1
- nPr = the number of ordered arrangements of r items drawn from n distinct items
The formula counts sequences where order matters. For example, selecting A then B is different from B then A. This is what distinguishes permutations from combinations, where order does not matter.
Worked Example
Using the default values from the calculator above: n = 10, r = 3.
- Write the formula: 10P3 = 10! / (10 − 3)!
- Compute the denominator: (10 − 3)! = 7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5,040
- Expand the numerator: 10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 3,628,800
- Divide: 3,628,800 / 5,040 = 720
- Alternatively, cancel the common factorial: 10! / 7! = 10 × 9 × 8 = 720
The calculator shows the result as 720 permutations. The expanded output (10 × 9 × 8 = 720) shows the simplified multiplication after cancelling the common factorial terms, which is a helpful shortcut for large n.
When to Use Permutations
Use permutations when the order of selection matters. Common scenarios include:
- Arranging books on a shelf (order of books matters)
- Assigning roles like president, vice-president, secretary from a group (each role is distinct)
- Creating passwords or PIN codes where sequence matters
- Ranking contestants in a competition (first place, second place, etc.)
- Selecting a batting order for a sports team
If order does not matter, you need combinations instead. For instance, choosing 3 committee members from 10 people is a combination (120 ways), but assigning them to three different positions is a permutation (720 ways).
How to Read the Result
The result tells you the total number of distinct ordered sequences. For n = 10 and r = 3, the 720 means there are 720 different ways to pick and arrange 3 items from a set of 10. Each arrangement is unique because swapping any two items creates a different permutation.
When r equals n, the calculator gives n! (e.g., 5P5 = 120), which is the total number of ways to arrange all items. When r = 0, the result is always 1, because there is exactly one way to arrange zero items: the empty sequence.
For large n and r, the numbers grow extremely fast. For example, 20P10 is over 670 billion. This is why factorials are used rather than listing every arrangement.
Common Mistakes and Misconceptions
A frequent error is confusing permutations with combinations. Remember: permutations count ordered arrangements, combinations count unordered groups. For the same n and r, permutations are always larger (except when r is 0 or 1).
Another mistake is entering r greater than n. Mathematically, nPr is undefined when r > n because you cannot choose more items than are available. The calculator returns an error in that case. Always check that r ≤ n.
Unit mix-ups are rare here since n and r are pure counts, but be careful with zero and one. 0! = 1, not 0, and 1! = 1. Also, some people mistakenly think 0P0 = 0, but it equals 1 by convention.
Rounding is not an issue for exact integer results, but if you use a calculator that converts to scientific notation for large numbers, you may lose precision. This calculator returns exact integers up to the limits of typical 64-bit storage (about 9.2 × 10^18).
Limits of the Formula
The standard permutation formula assumes all n items are distinct. If some items are identical (e.g., the word “MISSISSIPPI� has repeated letters), the number of distinct permutations is reduced. That requires a different formula: n! divided by the factorials of each repeated item’s count.
The formula also assumes sampling without replacement. If you allow repeats (like a combination lock where digits can repeat), the number of permutations is n^r, not nPr. This calculator handles only the no-repetition case.
For extremely large n (above about 20), factorials exceed 64-bit integer limits. The calculator may show an approximate value in scientific notation or an error, depending on implementation. For theoretical work, Stirling’s approximation can estimate factorials, but it is not exact.
Alternatives and Related Calculations
If order does not matter, use a combinations calculator (nCr = n! / (r! × (n − r)!)). If repetitions are allowed, use n^r for permutations with repetition. If you need to arrange all n items with some identical, use the multinomial coefficient. Many online calculators offer these as separate modes.
For probability problems, permutations often appear in the denominator or numerator. For example, the probability of a specific sequence of 3 cards from a deck of 52 is 1 / (52P3). Understanding the permutation count is the first step to solving such problems.
Frequently Asked Questions
What is the difference between permutations and combinations?
Permutations count ordered arrangements, so ABC and BAC are different. Combinations count groups, so ABC and BAC are the same. For the same n and r, permutations are larger by a factor of r! (the number of ways to order the selected items).
Can r be larger than n?
No. You cannot arrange more items than you have. If r > n, the formula n! / (n − r)! involves a negative factorial in the denominator, which is undefined. The calculator will not accept such input.
What does 0! equal and why?
0! is defined as 1 by convention. This makes formulas consistent: nPn = n! / 0! = n! / 1 = n!, and nCn = n! / (n! × 0!) = 1. It also matches the combinatorial idea that there is exactly one way to arrange zero items.
How do I calculate permutations with repeated items?
For a set with repeated elements, divide n! by the product of the factorials of each repeated item’s count. For example, the word “MISSISSIPPI� has 11 letters with M=1, I=4, S=4, P=2, so the number of distinct arrangements is 11! / (1! × 4! × 4! × 2!) = 34,650.
What is the fastest way to compute nPr without a calculator?
Instead of computing full factorials, cancel the common terms. For nPr, multiply n × (n−1) × … down to (n−r+1). For example, 10P3 = 10 × 9 × 8 = 720, skipping the 7! entirely. This is much quicker for small r.
Why does the calculator show an expanded output?
The expanded output shows the multiplication after cancelling the factorial denominator, making it easier to verify the step-by-step logic. For n=10, r=3, it displays 10 × 9 × 8, which directly equals 720. This helps users understand why the formula works without doing full factorial arithmetic.
Related
Formula used
in n | Total items (n) | - | 10 | 1 in r | Items chosen (r) | - | 3 | 0 out perm | Permutations (nPr) | - | fact(n) / fact(n - r) | 0 out expanded | Factorial expansion | - | n * (n - 1) * (n - 2) | 0
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.