Permutation Calculator
Count ordered arrangements and compare them with combinations where order is ignored. Choose No replacement for nPr, With replacement for repeated choices, or Multiset for repeated letters or objects. The formula and a short list of sample arrangements appear with the result.
- nPr
- Mode
Each item is used at most once, and two arrangements of the same items in a different order are counted separately.
- Order matters
- 52!/47!
- Order ignored
- 52!/(5! 47!)
- Orders per collection
- exact
- Digits
- exact integer
52!/47! counts every ordered choice of 5 from 52. Dividing by 5! leaves 2,598,960 choices where order does not matter.
- 1 2 3 4 5
- 1 2 3 4 6
- 1 2 3 4 7
- 1 2 3 4 8
- 1 2 3 4 9
- 1 2 3 4 10
The first 6 of 311,875,200, in lexicographic order.
Worked examples
The three cases this question usually starts from, one per mode. Every figure here is computed by the same code as the answer above, so the examples and the tool can never disagree.
n and r each read whole numbers up to 10,000. Arrangements are listed only when there are 12 positions or fewer; the count itself is exact at any size, and Copy carries every digit of it.
Common questions
- How do I calculate permutations with this calculator?
- Choose No replacement, enter the number of available items as n, and enter the number of ordered positions as r. The nPr result counts selections where each item is used at most once; Order ignored shows nCr. For 5 items and 3 positions, 5P3 is 60 and 5C3 is 10. Choose With replacement when each position can reuse an item. Choose Multiset when you want to arrange every character in a word or every object in a list of counts.
- What is the difference between a permutation and a combination?
- A permutation counts arrangements, so the order of what you picked is part of the answer; a combination counts selections, where it is not. Both are on screen at once here. Five cards from a deck of 52 give 311,875,200 ordered deals and 2,598,960 hands, and the readout shows the factor between them, 120, which is 5 factorial: every hand can be dealt in 120 orders.
- How do I calculate nPr by hand?
- nPr is n!/(n - r)!, which is the same as multiplying the r numbers counting down from n. For 5 items in 3 positions that is 5 x 4 x 3, so 5P3 is 60, and the page prints the formula it used, 5!/2!, under the answer with your own numbers in it. Cancelling the shared factorials by hand is the usual shortcut, and it is what the tool does internally rather than forming the whole of n! first.
- What is the permutation formula with repetition?
- With replacement every position is filled from the whole set again, so the count is n to the power r rather than a falling product. Five items in three positions give 125, not 60. That is the mode to use for a PIN, a dice roll or a password of fixed length, where a digit can turn up twice. Its order-ignored counterpart is the multiset coefficient, C(n + r - 1, r), which for those numbers is 35, and the factor between the two is not a whole number.
- How many ways can you arrange the letters of MISSISSIPPI?
- 34,650. There are 11 letters, but the four I letters are not told apart from one another, nor are the four S letters or the two P letters, so the count is 11!/(4! 4! 2!). Choose Multiset and type the word: every character is one item, case is kept, and the page prints the formula it built from your letters. Type a list with commas instead, like 4,4,2, and it reads them as multiplicities.
- What happens when r is larger than n?
- Without replacement the answer is 0, and the page says why: you cannot fill more positions than you have items when nothing is reused. With replacement the same numbers are a real count, because items can repeat, so 3 items in 5 positions give 243. Arranging nothing is 1 rather than 0: 0P0 is one empty arrangement, the combinatorial convention this page follows.
- How large can n and r be, and is the answer still exact?
- Both read whole numbers up to 10,000, and every answer is an exact integer rather than a rounded one. The largest result that range allows runs to 40,001 digits, and Copy carries every one of those digits along with the formula and both counts. The stage shortens anything past 25 digits to an exponent so it stays readable, and the digit count is shown beside it so you know how much was shortened.
- Can I see the arrangements themselves, not just how many?
- Up to six sample arrangements are listed in lexicographic order when there are 12 positions or fewer. Larger arrangements show only the exact count. For example, 12 positions from 20 distinct items give 60,339,831,552,000 arrangements; the sample is an illustration rather than a complete list.
- Does anything I type here leave my browser?
- No. The arithmetic runs in the page, there is no account and nothing is sent anywhere. The mode, the two numbers and the item list are remembered in this browser so the page opens where you left it, and the Start over button at the top of the page forgets them. With storage blocked the tool still works, it simply does not remember.
- Can I count permutations of numbers, letters or words?
- Choose Multiset and enter a word or digits without commas. Each non-space Unicode code point is an item, and matching items are treated as identical; A and a stay distinct. A comma makes the field a list of multiplicities, such as 4,4,2, rather than a list of item names. For example, AAB has three arrangements: AAB, ABA and BAA.
- Can I use this as a free calculator on a phone or computer?
- Yes. The permutation arithmetic works in a current browser without an account or installing a program. Enter n and r for a numerical calculation, or use the text field in Multiset mode. It provides counts and samples rather than calculator-specific key sequences or a full permutation list.
- Where is permutation in this calculator?
- Choose No replacement for nPr, then enter n (items) and r (positions). The Order matters result is the permutation count; Order ignored shows nCr for the same choices. These labels locate the operations on this browser page. Named calculator models, physical keys and buttons, apps and Excel have different workflows.
Exact integer counts throughout, computed in big integers, so a result far past what a float can hold is still correct in its last digit. The three modes are kept separate and labelled, because ordered without replacement, ordered with replacement and multiset arrangements answer genuinely different questions. It counts arrangements and lists only a small illustration of them rather than materialising the set.