Binomial Distribution Calculator

Calculate binomial probabilities with step-by-step solution — PMF, CDF, mean, and variance.

Last updated: 2026-04-11

Results

Exact Probability (PMF)

0.117188

P(X = 7)

Cumulative Probability (CDF)

0.945313

P(X ≤ 7)

Upper Tail Probability

0.054687

P(X > 7)

Number of trials (n)10
Number of successes (k)7
Probability of success (p)0.5
Mean (μ = n×p)5
Variance (σ² = n×p×(1−p))2.5
Standard Deviation (σ)1.5811

The probability of getting exactly 7 successes in 10 independent trials (each with p = 0.5) is 0.1172, or about 11.72%.

How to Calculate Binomial Probabilities

The binomial distribution answers one of the most common probability questions: if you repeat the same experiment n times, what are the chances of getting exactly k successes? The formula looks more intimidating than it actually is once you break it into pieces.

Start with the binomial coefficient C(n, k) = n! / (k! × (n−k)!). This counts how many different ways k successes can be arranged among n trials — order does not matter, only the total count. For 10 coin flips with 7 heads, there are C(10, 7) = 120 distinct sequences that produce exactly 7 heads.

Next, multiply by the probability that any one specific sequence occurs: pk × (1−p)n−k. Each success contributes a factor of p, each failure contributes (1−p), and the independence assumption lets you multiply them all together.

The full PMF formula is P(X = k) = C(n, k) × pk × (1−p)n−k. For our coin flip example with n=10, k=7, p=0.5: C(10,7) × 0.57 × 0.53 = 120 × 0.0078125 × 0.125 = 0.1172, or about an 11.7% chance.

Understanding the Cumulative Probability

Real questions rarely ask for the probability of one exact number. More often you want to know: what is the chance of getting 7 or fewer successes? That is the cumulative distribution function — the sum of P(X=0) + P(X=1) + ... + P(X=k). This calculator computes it by adding up every individual PMF value from zero through k.

The complement is equally useful. P(X > k) = 1 − P(X ≤ k) tells you the probability of exceeding k successes. Quality control engineers use this all the time: if a batch of 200 components has a 2% defect rate, what is the probability that more than 8 fail? That answer drives the accept/reject decision for the entire batch.

When to Use the Binomial Distribution

Four conditions must hold for the binomial model to apply. First, the number of trials n is fixed before the experiment begins. Second, each trial produces exactly two outcomes — conventionally labeled success and failure. Third, the probability of success p stays constant across all trials. Fourth, trials are independent, meaning the outcome of one does not influence the next.

Coin flips and die rolls obviously fit, but the binomial shows up in far more practical settings than most textbooks suggest. Clinical trials track how many patients respond to a treatment out of n enrolled. A/B tests on websites measure how many visitors out of n click a button. Manufacturing lines count defective items per batch. Survey researchers tally how many respondents out of n answer "yes."

The model breaks down when trials are not independent (drawing cards without replacement), when the probability changes across trials (a basketball player who gets "hot"), or when there are more than two outcomes. In the first case, the hypergeometric distribution is the right choice. For changing probabilities, you may need simulation or a more flexible model.

Reference: Common Binomial Probabilities

Scenario n k p P(X = k) P(X ≤ k)
Fair coin, 10 flips, 5 heads1050.500.24610.6230
Fair coin, 10 flips, 7 heads1070.500.11720.9453
Die roll, 12 rolls, 2 sixes1220.1670.29600.6887
5% defect rate, 50 items, 0 defects5000.050.07690.0769
80% pass rate, 20 students, 18 pass20180.800.13690.9308

Frequently Asked Questions

What is the binomial distribution?

It models the number of successes in a fixed set of independent trials where each trial has the same probability of success. Coin flips are the textbook case — flip a fair coin 10 times, and the binomial distribution tells you the probability of getting any particular number of heads.

The four requirements are: fixed number of trials, two possible outcomes per trial, constant probability across trials, and independence between trials. If any of these break, you need a different distribution.

What is the difference between PMF and CDF?

The PMF gives P(X = k) — the probability of exactly k successes. The CDF gives P(X ≤ k) — the probability of k or fewer successes. One is a single point, the other is the running total up to that point.

Most practical questions call for the CDF or its complement. "At most 3 defective parts" is P(X ≤ 3). "More than 3 defective parts" is 1 − P(X ≤ 3). Exact-count questions like "exactly 3 defective parts" are less common but the PMF handles them directly.

When should I use the binomial distribution?

Any time you have a fixed number of yes/no trials with constant probability and independence. Manufacturing quality checks, clinical drug trials, survey yes/no questions, A/B conversion tests, and free throw shooting percentages all fit naturally.

If you are drawing without replacement (like cards from a deck), switch to the hypergeometric distribution. If you are counting events in a time window rather than in a fixed number of trials, the Poisson distribution is the better choice.

What happens when n is very large?

The binomial starts looking like a bell curve. When both np and n(1−p) exceed about 10, you can approximate binomial probabilities using the normal distribution with mean μ = np and standard deviation σ = √(np(1−p)). This approximation was essential before computers because computing exact binomial probabilities for large n by hand is brutal.

With modern calculators — including this one — there is no need for the approximation. This tool handles n up to 1,000 using log-space arithmetic that avoids the overflow problems that plague naive factorial implementations.

How do I calculate P(X > k)?

Take the complement: P(X > k) = 1 − P(X ≤ k). This calculator displays the upper tail probability directly below the PMF and CDF results, so the value is right there without extra steps.

For a range like P(a ≤ X ≤ b), compute P(X ≤ b) − P(X ≤ a−1). Run the calculator twice with different k values and subtract.

Related Calculators