Binomial Distribution

The chance of exactly k successes in n independent tries, each with success probability p.

P(X = k) = ₙCₖ pᵏ (1 − p)ⁿ⁻ᵏ

It assumes each try does not affect the others (independence).

The average number of successes (expected value) is np.

Calculator

Change a value and the result and picture update instantly.

Result

Probability P(X = k)0.266828
Mean np3

Animated picture

The picture follows your values. Some points and shapes can be dragged.

Use in game development

Questions like “10 attacks at 30% accuracy — chance of exactly 3 hits?” and checking RNG fairness.

Code example (JavaScript)

const P = nCr(n, k) * p**k * (1 - p)**(n - k);

What the symbols mean

SymbolMeaning
nTrials n
kSuccesses k
pSuccess probability p (0–1)
PProbability P(X = k)
meanMean np

More formulas in this category

Frequently asked questions

What is the formula for Binomial Distribution?
The formula for Binomial Distribution is P(X = k) = ₙCₖ pᵏ (1 − p)ⁿ⁻ᵏ. The chance of exactly k successes in n independent tries, each with success probability p.

Math Formula Quiz Probability & Statistics

Sources

Checked: 2026-11-29