Multinomial Distribution Calculator

Enter the trials, category probabilities and observed counts to get the joint probability.

How it is calculated

For n independent trials with k outcomes of probabilities p1…pk, the chance of seeing exactly the counts x1…xk is P = n! / (x1! · … · xk!) × p1x1 × … × pkxk. The first factor counts the orderings that give those counts; the second is the probability of any one such ordering. The tool works with logarithms of the factorials, so large n stays accurate, and prints six decimals. Probabilities are written as fractions of 1 (0.5, not 50) with a decimal point and separated by commas or spaces. They must sum to 1 (within 0.000001) and each lie between 0 and 1. The counts must be whole numbers, add up to n, and match the probabilities one-to-one. n can be at most 100,000. A count above zero for a probability of 0 is impossible and returns no result.

Worked example

Eight trials, three outcomes with probabilities 0.5, 0.3 and 0.2, and observed counts 4, 3 and 1. The orderings: 8! / (4! · 3! · 1!) = 40320 / 144 = 280. The probability of one ordering: 0.54 × 0.33 × 0.21 = 0.0625 × 0.027 × 0.2 = 0.0003375. Multiply: 280 × 0.0003375 = 0.094500, about a 9.45% chance. The tool also reports 3 categories.

Try this example →

Common mistakes

  • Typing percentages (50, 30, 20) instead of fractions (0.5, 0.3, 0.2). Values above 1 are rejected.
  • Probabilities that do not add up to 1, such as 0.5, 0.3, 0.1. Add the missing category or fix the figures, since no result appears until the sum is 1.
  • Counts that do not add up to n. With n = 8, counts 4, 3, 2 total 9, so no result appears; the tool never pads or trims them.
  • Reading the answer as the chance of “about” that split. It is the probability of exactly these counts, so it is usually small; the chance of a range of outcomes needs the individual results added together.
  • Using a decimal comma. Commas separate the list items, so 0,5 0,3 0,2 is read as six numbers and fails; write 0.5, 0.3, 0.2.

About this calculator

The multinomial distribution generalizes the binomial to situations with more than two possible outcomes. Given n independent trials where each falls into one of k categories with probabilities p₁, p₂, …, pₖ, the probability of observing exactly x₁, x₂, …, xₖ occurrences of each category is P = n! / (x₁!x₂!…xₖ!) × p₁^x₁ × p₂^x₂ × … × pₖ^xₖ.

Statisticians use it for goodness-of-fit and categorical data analysis, geneticists use it to model the joint probability of observing certain allele or genotype frequencies, quality control engineers use it when a defect can fall into several distinct categories, and survey and poll analysts use it to compute the probability of a specific split of responses across multiple answer choices.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    For large n, any one exact split has a small probability, and the tool prints six decimals, so a very unlikely split can show as 0.000000 even though it is possible. Use the split closest to n times each probability as your benchmark: with 1000 trials and two outcomes at 0.5, exactly 500 and 500 gives 0.025225, while 450 and 550 gives 0.000169. Which kind of categorical data are you trying to model with it?

Popular calculators

All Calculators