Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

P(X = k) — Exact Probability
0.4096
probability of exactly k successes
Binomial coefficient C(n,k) 5
P(X ≤ k) cumulative 0.67232
P(X ≥ k) cumulative 0.73728
Mean (n·p) 4
Standard deviation 0.8944

What is the Binomial Probability Calculator?

This calculator finds the probability of obtaining exactly k successes in n independent trials, where each trial has the same probability of success p. Situations like flipping a coin a fixed number of times, counting defective items in a batch, or measuring how many free throws a player makes all follow the binomial distribution.

Bar chart of a binomial distribution with one bar highlighted
A binomial distribution showing the probability of each possible number of successes, with one outcome \(P(X=k)\) highlighted.

How to use it

Enter the number of trials (n), the number of successes you are interested in (k), and the probability of success on a single trial (p, between 0 and 1). The calculator returns the exact probability \(P(X = k)\), the two cumulative probabilities \(P(X \le k)\) and \(P(X \ge k)\), plus the distribution mean and standard deviation.

The formula explained

The binomial probability formula is:

$$P(X = k) = \binom{n}{k} \, p^{\,k} \, (1 - p)^{\,n - k}$$

Here \(C(n,k)\) is the binomial coefficient (the number of ways to arrange k successes among n trials), \(p^{k}\) is the probability of those k successes, and \((1 - p)^{n - k}\) is the probability of the remaining n − k failures. The mean of the distribution is \(n \cdot p\) and the standard deviation is \(\sqrt{n \cdot p \cdot (1-p)}\).

Three components of the binomial formula shown as connected boxes
The formula combines the number of ways to choose k successes with the probability of those successes and failures.

Worked example

Suppose you flip a fair coin 10 times (n = 10, p = 0.5) and want the probability of exactly 3 heads (k = 3). \(C(10,3) = 120\), so $$P = 120 \cdot 0.5^{3} \cdot 0.5^{7} = 120 \cdot 0.0009765625 = \mathbf{0.1171875}$$ about 11.7%.

More Worked Examples

Each example uses the binomial probability formula \(P(X = k) = \binom{n}{k} p^{k}(1-p)^{n-k}\), where \(n\) is the number of independent trials, \(p\) is the probability of success on each trial, and \(k\) is the number of successes of interest.

Example 1 — Defective items, P(X ≤ 2)

A shipment has a defect rate of \(p = 0.05\). In a random sample of \(n = 20\) items, what is the probability that at most 2 are defective? We need \(P(X \le 2) = P(0) + P(1) + P(2)\).

  • \(P(0) = \binom{20}{0}(0.05)^0(0.95)^{20} = 1 \cdot 1 \cdot 0.358486 = 0.358486\)
  • \(P(1) = \binom{20}{1}(0.05)^1(0.95)^{19} = 20 \cdot 0.05 \cdot 0.377354 = 0.377354\)
  • \(P(2) = \binom{20}{2}(0.05)^2(0.95)^{18} = 190 \cdot 0.0025 \cdot 0.397214 = 0.188677\)

Note that \(\binom{20}{2} = 190\). Adding the three terms:

$$P(X \le 2) = 0.358486 + 0.377354 + 0.188677 = 0.924516$$

So there is about a 0.188677 chance of exactly 2 defectives, and roughly a 92.5% chance of 2 or fewer. The distribution has mean \(\mu = np = 20 \cdot 0.05 = 1\) defective and standard deviation \(\sigma = \sqrt{np(1-p)} = \sqrt{20 \cdot 0.05 \cdot 0.95} = \sqrt{0.95} \approx 0.9747\).

Example 2 — Free throws, P(X ≥ 4)

A player makes free throws with probability \(p = 0.8\) and takes \(n = 5\) shots. What is the probability of making at least 4? We need \(P(X \ge 4) = P(4) + P(5)\).

  • \(P(4) = \binom{5}{4}(0.8)^4(0.2)^1 = 5 \cdot 0.4096 \cdot 0.2 = 0.4096\)
  • \(P(5) = \binom{5}{5}(0.8)^5(0.2)^0 = 1 \cdot 0.32768 \cdot 1 = 0.32768\)

Here \(\binom{5}{4} = 5\) and \(\binom{5}{5} = 1\). Summing:

$$P(X \ge 4) = 0.4096 + 0.32768 = 0.73728$$

The player makes at least 4 of 5 shots about 73.7% of the time. The expected number of made shots is \(\mu = np = 5 \cdot 0.8 = 4\) with standard deviation \(\sigma = \sqrt{5 \cdot 0.8 \cdot 0.2} = \sqrt{0.8} \approx 0.8944\). The single most likely outcome is \(P(X = 4) = \)0.4096.

Example 3 — Survey responses, exact value

Suppose 30% of people \((p = 0.3)\) recognize a brand, and you survey \(n = 10\). The probability that exactly 3 recognize it is:

$$P(X = 3) = \binom{10}{3}(0.3)^3(0.7)^7 = 120 \cdot 0.027 \cdot 0.0823543 = 0.266828$$

With \(\binom{10}{3} = 120\), the result is \(P(X=3) \approx\) 0.266828. The mean is \(\mu = np = 3\) recognitions, matching the most likely count, with \(\sigma = \sqrt{10 \cdot 0.3 \cdot 0.7} \approx 1.449\).

Key Terms and Variables

Symbol / Term Meaning
\(n\) — number of trials The fixed total number of independent repetitions of the experiment (e.g. items inspected, shots taken). Must be a non-negative integer.
\(k\) — number of successes The specific count of successful outcomes whose probability you want, with \(0 \le k \le n\).
\(p\) — success probability The probability of a success on any single trial, the same for every trial. A value between 0 and 1.
\(q = 1 - p\) — failure probability The probability of a failure on a single trial. Since each trial is either a success or a failure, \(p + q = 1\).
\(\binom{n}{k}\) — binomial coefficient The number of distinct ways to choose \(k\) successes among \(n\) trials, read "n choose k": \(\binom{n}{k} = \dfrac{n!}{k!\,(n-k)!}\).
\(P(X = k)\) — exact probability Probability of getting exactly \(k\) successes: \(\binom{n}{k} p^{k} q^{\,n-k}\).
\(P(X \le k)\) — cumulative (at most) Probability of \(k\) or fewer successes, the sum \(P(0) + P(1) + \dots + P(k)\).
\(P(X \ge k)\) — cumulative (at least) Probability of \(k\) or more successes, equal to \(1 - P(X \le k-1)\).
\(\mu = np\) — mean The expected (average) number of successes over many repetitions of the \(n\)-trial experiment.
\(\sigma = \sqrt{np(1-p)}\) — standard deviation A measure of how much the number of successes typically varies around the mean.

Interpreting Your Result

The binomial calculator can answer three related but distinct questions, and it is important to match the output to the question you actually asked.

  • Exact probability, \(P(X = k)\): the chance of getting precisely \(k\) successes — no more, no fewer. Use this for questions like "what is the probability of exactly 3 defects?" Because it pins down a single outcome, this value is usually smaller than the cumulative probabilities below.
  • At most, \(P(X \le k)\): the chance of \(k\) or fewer successes. It adds up the probabilities of \(0, 1, \dots, k\). Use it for "no more than", "at most", or "fewer than or equal to" phrasing.
  • At least, \(P(X \ge k)\): the chance of \(k\) or more successes. A convenient shortcut is \(P(X \ge k) = 1 - P(X \le k-1)\). Use it for "at least", "no fewer than", or "minimum of" phrasing.

Watch the boundary carefully: "more than \(k\)" means \(P(X \ge k+1)\), and "fewer than \(k\)" means \(P(X \le k-1)\). A single word changes which terms are summed.

The mean \(\mu = np\) is the expected number of successes — the long-run average count if you repeated the whole \(n\)-trial experiment many times. For \(n = 20\) items at \(p = 0.05\), you would expect \(\mu = 1\) defect on average, even though any single sample might have 0, 1, 2 or more. The mean is also (near) the most likely single outcome, so comparing your \(k\) to \(np\) tells you whether you are asking about a typical result or an unusual one.

The standard deviation \(\sigma = \sqrt{np(1-p)}\) describes the spread of outcomes around the mean. Most results fall within roughly one to two standard deviations of \(np\). When \(k\) lies several standard deviations away from the mean, the corresponding probability is small, which is exactly why "tail" events feel surprising. When \(n\) is large and \(p\) is not too close to 0 or 1, the binomial distribution is approximately normal with this same mean and standard deviation, allowing a normal-curve approximation for cumulative probabilities.

This is general statistical information to help you read the output; always confirm that your scenario meets the binomial assumptions (a fixed number of independent trials, two outcomes per trial, and a constant success probability) before relying on the result.

FAQ

When can I use the binomial distribution? When you have a fixed number of independent trials, each with two outcomes (success/failure) and a constant probability of success.

What does \(P(X \ge k)\) mean? It is the probability of getting at least k successes — useful for "or more" questions.

Can p be greater than 1? No. Probability must be between 0 and 1; values outside this range are clamped.

Last updated: