Multinomial Coefficient Calculator
Count the ways to split n items into groups of given sizes.
What it does
A multinomial coefficient counts the number of ways to place n distinct items into several labelled groups with specified sizes. It generalizes the binomial coefficient, which is the special case of two groups.
This tool takes the list of group sizes, adds them to find n, divides n factorial by the product of the individual factorials, and returns an exact integer even when the result is very large.
The page opens with group sizes 2, 3 and 1. Their total is 6, and 6 factorial divided by 2 factorial, 3 factorial and 1 factorial is 60.
The same number counts the distinct arrangements of a word with repeated letters, the coefficients in the multinomial theorem, and the number of ways to colour n objects with given counts of each colour.
The tool uses exact integer arithmetic so there is no floating point rounding, and it accepts totals up to one hundred.
How to use
- Enter the sizes of the groups separated by commas.
- Include zeros for groups that receive no items if needed.
- Read the multinomial coefficient as the main result.
- Check the total items to confirm the sum of the group sizes.
- Use the factorial expression to follow the calculation.
- Try two groups to see the binomial coefficient special case.
Formula
- n
- Total number of items, the sum of all group sizes.
- k_i
- The size of group i.
- coefficient
- The number of distinct assignments to groups of those sizes.
Starting with n factorial counts every ordering of the items. Dividing by each group's factorial removes the orderings that only permute items inside the same group, leaving the number of distinct group assignments. When r equals two, the expression becomes the binomial coefficient n choose k1.
Worked example
Example: groups of 2, 3 and 1
The page opens with counts 2, 3, 1.
- Add the group sizes: 2 plus 3 plus 1 is 6 items.
- Write 6 factorial, which is 720.
- Compute the denominator: 2 factorial is 2, 3 factorial is 6, and 1 factorial is 1.
- Multiply the denominator: 2 times 6 times 1 is 12.
- Divide 720 by 12 to get 60.
- The tool reports coefficient 60 and total 6.
Reference table
| Group sizes | Total n | Coefficient |
|---|---|---|
| 2, 3, 1 | 6 | 60 |
| 1, 1, 1 | 3 | 6 |
| 2, 2, 2 | 6 | 90 |
Limits
- Accepts 2 to 8 groups.
- Each group size is a whole number from 0 to 100.
- The total of all sizes must be 100 or less.
- Groups are treated as labelled, so swapping labels produces a different assignment.
Common mistakes
- Adding the factorials instead of multiplying them in the denominator.
- Using the count of groups rather than the total items in the numerator.
- Forgetting a zero sized group when the problem includes one.
- Confusing labelled groups with unlabelled partitions.
- Assuming the result is always small.
Try it yourself
Quick checks. Answers sit tucked under each question.
Group sizes 1, 1, 1. Coefficient?
6, the number of orderings of three distinct items.
Group sizes 2, 2, 2. Coefficient?
90, from 720 divided by 8.
What do you get with only two groups?
The binomial coefficient n choose k1.
Questions
What does this coefficient count?
Ways to assign n distinct items into labelled groups of fixed sizes.
How is it related to binomial coefficients?
It is the general case, and two groups give the usual binomial coefficient.
Why divide by the group factorials?
To remove orderings that only rearrange items within the same group.
Where does it appear?
In the multinomial theorem, word arrangements and colouring counts.
Can group sizes be zero?
Yes. Zero factorial is 1, so it does not change the denominator.
Is the result always an integer?
Yes. The expression counts discrete arrangements.
Sources
- MIT, 18.310 counting notes on the multinomial coefficient
- Rice University, notes on the multinomial distribution and coefficient
- Carnegie Mellon University, lecture 6 on permutations and combinations