Skip to main content

The Multinomial Coefficient, Explained: Counting Ways to Split n Into Groups

How the multinomial coefficient n! / (k1! k2! ... km!) counts arrangements and group splits, with the MISSISSIPPI example and how it generalizes the binomial.

Published By Li Lei
#combinatorics #multinomial coefficient #counting #math

The Multinomial Coefficient, Explained: Counting Ways to Split n Into Groups

If you have ever tried to count the distinct arrangements of a word with repeated letters, or asked how many ways a deck splits into four hands, you have already met the multinomial coefficient without naming it. It is one number that answers a whole family of counting questions, and it follows from a single clean formula. This post walks through that formula, the intuition behind it, the famous MISSISSIPPI example, and how it quietly generalizes the binomial coefficient you probably learned first.

The one formula you need

The multinomial coefficient takes a total count n and a list of group sizes k1, k2, ..., km that add up to n. It equals:

n! / (k1! · k2! · ... · km!)

That is the whole thing: n factorial, divided by the product of the factorials of every group size. The single concrete point to hold onto is that the denominator is a product of factorials, one per group, while the numerator is just n!. Nothing else moves.

Read it as a question: in how many distinct ways can you partition n labelled items into groups of exactly those sizes? Suppose you have items of sizes 2 and 1, so n = 3. The coefficient is 3! / (2! · 1!) = 6 / 2 = 3. There are three ways to choose which single item is alone while the other two pair up. The formula and the count agree.

A subtlety worth pinning down: a group of size 0 is allowed and changes nothing, because 0! = 1 multiplies the denominator by one. So padding your list with an empty group never alters the answer.

Why the factorials sit in the denominator

The numerator n! counts every ordering of n distinct items. But if items inside a group are interchangeable, we have overcounted. Each group of size ki can be internally shuffled in ki! ways without producing a genuinely new arrangement, so we divide that overcount back out, group by group. Dividing by k1! · k2! · ... · km! removes exactly the shuffles that do not matter and leaves only the distinct configurations.

That single idea explains both readings of the coefficient. When the "groups" are copies of identical letters in a word, dividing by each letter's count factorial removes the swaps of identical letters. When the groups are labelled teams, dividing by each team's size factorial removes the internal reorderings that do not change who is on which team.

The MISSISSIPPI worked example

The classic test case is counting the distinct orderings of the letters in MISSISSIPPI. It has 11 letters: one M, four I, four S, and two P. Plain 11! would treat all eleven letters as distinguishable, which overcounts badly, because swapping two of the four identical I's gives back the same string.

Group the letters by frequency and apply the formula:

11! / (1! · 4! · 4! · 2!)
   = 39916800 / (1 · 24 · 24 · 2)
   = 39916800 / 1152
   = 34650

So MISSISSIPPI has exactly 34650 distinct arrangements. The recipe works for any word: count how many times each letter appears, those counts are your group sizes, and the multinomial coefficient is the number of distinct anagrams. You can check this in seconds with the Multinomial Coefficient Calculator by entering 1, 4, 4, 2 and reading back 34650. The substituted formula is shown alongside the result, so the working is right there to copy.

How it generalizes the binomial coefficient

Here is the part I find genuinely satisfying. The binomial coefficient C(n, k), the "n choose k" you meet early on, is nothing more than the two-group multinomial coefficient. Choosing k items to keep and n − k to leave behind is splitting n into two groups of sizes k and n − k:

C(n, k) = n! / (k! · (n − k)!)

Enter just two numbers, say 2 and 3, and you get 5! / (2! · 3!) = 10, which is exactly C(5, 2). The multinomial coefficient extends that same logic to any number of groups, which is why it is sometimes called the generalized binomial coefficient. The binomial is the special case where you happen to be splitting into precisely two piles. The triangle of binomial values has its own pattern explorer in the Pascal's Triangle tool, if you want to see where those two-group numbers come from row by row.

It also names the coefficients in the multinomial theorem. Expanding (x1 + x2 + ... + xm)^n produces a sum of terms x1^k1 · ... · xm^km, and the coefficient sitting in front of each term is precisely n! / (k1! · ... · km!). For example, the coefficient of x^2 · y · z in (x + y + z)^4 is 4! / (2! · 1! · 1!) = 12. The exponents are your group sizes, so you would enter 2, 1, 1.

Splitting people, cards, and teams

The "ways to split n into groups" reading shows up everywhere once you look. Dealing 52 cards into four labelled hands of 13 each is 52! / (13!)^4, a 29-digit number that is hopeless to compute by hand but exact for the calculator. Splitting 12 students into a group of 5, a group of 4, and a group of 3 is 12! / (5! · 4! · 3!) = 27720 distinct assignments to those labelled groups.

One caution that trips people up: the multinomial coefficient counts assignments to labelled groups. If the groups themselves are interchangeable, for example three unlabelled teams of equal size, you have to divide further by the factorial of the number of equal groups, since swapping two identical-sized unlabelled teams does not create a new split. The formula counts the labelled version; you adjust afterward if the labels are not real.

The same number is the counting factor in the multinomial probability distribution. Rolling a die six times and asking for exactly two 1's, two 2's, and two 3's uses the coefficient 6! / (2! · 2! · 2!) = 90, which you then multiply by the per-outcome probability. The combinatorics and the probability share the exact same coefficient.

A note from doing this by hand

I learned this the slow way. The first time I tried to count arrangements of a long word, I wrote out n! and stopped, because the answer was obviously too big and I could not say why. The fix was small but it reframed everything: divide by the factorial of each repeat count. Once I saw that the denominator was just undoing the overcount of identical items, the binomial, the multinomial, and the anagram count all collapsed into one idea instead of three separate formulas I had been memorizing. After that, the only real risk was arithmetic, and factorials grow fast enough that I stopped trusting myself past 13! and started checking against a tool that uses exact integer arithmetic rather than rounded floats.

That exactness matters more than it sounds. Ordinary floating-point math starts losing digits once factorials pass about 21!, quietly returning a rounded value that looks fine but is wrong in its lower digits. Counting problems demand whole numbers, so a calculator built on exact big-integer arithmetic gives you every digit of a 40-digit arrangement count, not a plausible approximation.

Quick recipe to remember

  • Identify your group sizes k1, k2, ..., km. They must add up to n; you do not enter n separately.
  • The answer is n! / (k1! · k2! · ... · km!).
  • For anagrams, the group sizes are the letter frequencies.
  • For expansion terms, the group sizes are the exponents.
  • Two groups means you are really computing a binomial coefficient.

Try a few of your own in the Multinomial Coefficient Calculator. Enter 2, 3 to see the binomial C(5, 2) = 10, then add a third group and watch the count change. The whole family of counting questions runs on that one division.


Made by Toolora · Updated 2026-06-13