Skip to content
ToolMug

Use ↑ ↓ to move, Enter to open, Esc to close.

Binomial Distribution Calculator

The chance of exactly 5 heads in 10 coin tosses, or of at least 3 defects in a sample of 20, comes from the binomial distribution. Enter n, p and k to get the probability, mean and variance, with the selected outcomes highlighted on the chart.

Runs in your browser — nothing you enter is uploaded

P(X ≤ 3)

0.649611

Mean
3
Variance
2.1
SD
1.4491
0246810

Probability table

kP(X = k)P(X ≤ k)
00.0282480.0282
10.1210610.1493
20.2334740.3828
30.2668280.6496
40.2001210.8497
50.1029190.9527
60.0367570.9894
70.0090020.9984
80.0014470.9999
90.0001381.0000
105.905e-61.0000

Binomial: n independent trials, each succeeding with probability p. Poisson: counts of independent events with an average of λ per interval. Probabilities are computed exactly, not with the normal approximation.

Is this tool working for you?

How to use

  1. Enter the number of trials n and the probability of success p.
  2. Under Find, choose exactly k, at most k, fewer than k, at least k, more than k, or between k₁ and k₂.
  3. Enter k. The result, chart and table update as you type.

Options explained

Formula
P(X = k) = C(n, k) · pᵏ · (1 − p)ⁿ⁻ᵏ. The mean is np and the variance np(1 − p).
When it applies
Each trial has two outcomes, trials are independent and p is the same every time.
Exact calculation
n can be up to 100,000. Terms are computed with the log-gamma function, not the normal approximation, so tail probabilities are accurate.

Worked example

With n = 10 and p = 0.3, the default asks for at most 3 successes:

Find Result
P(X ≤ 3) 0.6496
P(X = 3) 0.2668
Mean np 3
Variance np(1 − p) 2.1

Other common questions:

Question n p Find Probability
Exactly 5 heads in 10 tosses 10 0.5 P(X = 5) 0.2461
5% defect rate, at most 2 defects in 10 10 0.05 P(X ≤ 2) 0.9885
Guessing with a 25% chance, at least 7 of 20 right 20 0.25 P(X ≥ 7) 0.2142

Frequently asked questions

What is the quickest way to get "at least one"?

1 − P(X = 0). Here, choose P(X ≥ k) with k = 1. Five tries at 10% each give 1 − 0.9⁵ = 0.4095.

Can I use the Poisson approximation for large n and small p?

You can, with λ = np, but this calculator handles n up to 100,000 exactly. Open the Poisson calculator to compare.

How does this map to Excel or a TI calculator?

Exactly k is BINOM.DIST(k, n, p, FALSE) or binompdf; at most k is BINOM.DIST(k, n, p, TRUE) or binomcdf.

Privacy

This tool runs entirely in your browser. Your files and text are processed on your device and are never uploaded to our servers.

Related tools