Percentages and Math

Multiset Permutation Calculator

Enter a word or list with repeats to count its distinct arrangements, rank one or find one by rank.

Your numbers

A word, or a list when you choose commas below. Uppercase and lowercase letters count as different items. Example word.

Find

Leave blank to arrange all the items, or enter a smaller number to choose that many.

Result

Distinct arrangements

34,650

Distinct arrangements
34,650
Items in total
11
Different items
4
If every item were different
39,916,800

Items and how many of each

ItemCount
I4
M1
P2
S4

First arrangements in dictionary order

RankArrangement
1IIIIMPPSSSS
2IIIIMPSPSSS
3IIIIMPSSPSS
4IIIIMPSSSPS
5IIIIMPSSSSP
6IIIIMSPPSSS
7IIIIMSPSPSS
8IIIIMSPSSPS
How this was calculated
  1. Count all orders as if the items were different: 11! ways.
  2. Divide by the orders of the identical items: 11! / (4! x 1! x 2! x 4!) = 34,650.
  • Items that look the same are treated as identical, so swapping two of them does not make a new arrangement. Dictionary order compares items by their character codes.

Calculated using SumPanda.com · https://sumpanda.com/multiset-permutation-calculator/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the multiset permutation calculator

  1. Type a word or a list of items. Choose whether each character is an item or the items are separated by commas.
  2. Pick what to find: the number of distinct arrangements, the rank of one arrangement, or the arrangement at a given rank.
  3. For the count, leave length blank to arrange every item, or enter a smaller number to choose that many items.
  4. Read the answer, the table of items and the first arrangements in dictionary order.

Formula

Arrangements of all n items = n! / (n1! x n2! x ... x nk!)

Rank of an arrangement = sum over each place of the arrangements that begin with a smaller unused item

Arrangement at a rank: at each place take the smallest item whose block of arrangements contains the rank

Arrangements of length r: add one kind of item at a time, choosing C(l, j) places for its j copies

n! is the number of orders of n different items, and each n_i! removes the orders of identical items that look the same. Ranks use dictionary order by character code.

MISSISSIPPI and BANANA

MISSISSIPPI has 11 letters: I four times, M once, P twice and S four times. The number of distinct arrangements is 11! / (4! x 1! x 2! x 4!) = 39,916,800 / 1,152 = 34,650. If all 11 letters were different there would be 39,916,800. Choosing arrangements of only 4 letters gives 176.

BANANA has 60 arrangements. The first in dictionary order is AAABNN and the last is NNBAAA. NABANA is preceded by 47 arrangements, so it has rank 48 of 60, and the arrangement at rank 38 is BNAANA.

Why repeated items change the count

With n different items there are n! orders. When some items are identical, swapping two of them gives a sequence that looks the same, so the same arrangement was counted several times. Dividing by the factorial of each group size removes exactly those duplicates. This is the rule behind counting anagrams, color patterns of beads and sequences of repeated moves.

It is a special case of a multinomial coefficient. For choosing a subset without caring about order, see the combinations and permutations calculator. For partitions into groups of unlabeled items, see the Stirling and Bell numbers page.

Ranking and unranking

Dictionary order lists the arrangements the way a dictionary would list words. Ranking tells you where one arrangement falls in that list without writing the list out, and unranking goes the other way. Both work place by place using counts, so they stay fast even when the full list would have billions of entries, which is why the results are shown in full with digit grouping.

Uppercase and lowercase letters are different items. In the order used here, every uppercase letter comes before every lowercase letter, because items are compared by character code.

Assumptions and limits

  • Items that look identical are interchangeable, so only distinct sequences are counted.
  • There are at most 100 items in total. Counts are exact, with no rounding, however large.
  • Ranks start at 1 on this page. The note under each result also gives the zero-based count of arrangements before it.
  • Spaces are ignored when each character is an item; use commas to treat words as items.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

How do I count the anagrams of a word?

Type the word and keep the setting on each character. The number shown is the number of distinct anagrams including the word itself. Real words are only a small part of them, since most arrangements are not words.

What does it mean to pick fewer items than the total?

It counts distinct sequences of that length that can be formed from the items you have. For three letters from MISSISSIPPI, for example, SSS is possible but MMM is not, because there is only one M.

Why is the rank computed instead of listing everything?

A list of 34,650 arrangements is already long, and a word of 20 letters can have trillions. Ranking adds up block sizes place by place, which takes a fraction of a second whatever the size.

Can I list every arrangement?

The page shows the first few. To see any other one, use the arrangement-by-rank mode and enter its position. Together with the count, that reaches every arrangement.