Multiset Permutations Calculator

Permutations with repeats.

How it is calculated

Enter the total number of items n (a whole number from 1 to 20) and up to three repeat counts r1, r2, r3, one for each item type that appears more than once. The tool computes n! / (r1! × r2! × r3!), the number of distinct orderings. Any items you leave out are treated as appearing once, so they need no entry. Blank repeat fields are ignored. The repeat counts must be whole numbers of at least 1, and they must add up to no more than n; otherwise there is no result. Values of n above 20 are refused.

Worked example

Count the arrangements of the letters in MISSISSIPPI. There are n = 11 letters, with I four times, S four times and P twice (M appears once and needs no entry). Numerator: 11! = 39,916,800. Denominator: 4! × 4! × 2! = 24 × 24 × 2 = 1,152. Divide: 39,916,800 / 1,152 = 34,650 distinct arrangements. Without removing the repeats there would be 39,916,800.

Try this example →

Common mistakes

  • Typing n as the number of distinct item types (4 for MISSISSIPPI) instead of the total number of items (11).
  • Entering a repeat count for letters that appear only once. They are already counted as single items; a count of 1 changes nothing, and 0 is rejected.
  • Giving repeat counts that add up to more than n, such as 6 and 6 for an 11-letter word. That is impossible, so no result appears.
  • Expecting more than three repeated groups. There are only three repeat fields, so a word with four repeated letters cannot be fully entered; calculate the extra factorials by hand.

About this calculator

When you arrange n items in a row where some items repeat, the number of distinct arrangements is fewer than n! because swapping two identical items produces the same-looking sequence. The correct count is the multiset permutation formula: n! / (r₁! · r₂! · ... · rₖ!), where r₁, r₂, ... are the counts of each repeated item. The classic textbook example is the word "MISSISSIPPI": with 11 letters where I appears 4 times, S appears 4 times, and P appears 2 times, the number of distinct letter arrangements is 11!/(4!·4!·2!) = 34,650, not 11!.

This formula is a core building block in combinatorics courses and shows up wherever repeated elements need to be arranged: computer scientists use it to count distinct binary strings with a fixed number of 1s and 0s, geneticists use it to count possible sequences of repeated nucleotide patterns, and it's the basis for the multinomial coefficient used in probability distributions over categorical outcomes.

This calculator takes your total item count and the repeat counts for each distinct item and applies the formula directly, so you get the exact number of distinct arrangements without factoring out the repeats by hand.

Was this helpful?

You can pick up to 3 reactions.

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators