A binomial experiment is any situation where you repeat the same random action a fixed number of times, each time the action either succeeds or fails, every trial is independent, and the chance of success stays exactly the same. Flipping a coin ten times, rolling a die and counting sixes, running a survey of 50 voters, or giving a drug to 100 patients — all of these follow the binomial distribution. This calculator takes your three numbers (n trials, k successes, p probability of success) and returns the exact probability of seeing exactly k successes, plus an approximate cumulative probability of seeing at most k of them, the expected number of successes, and the spread (variance and standard deviation). The exact P(X = k) is computed directly from the closed-form binomial formula; the cumulative P(X ≤ k) is shown as a normal approximation with a continuity correction, which is accurate to within about one percentage point for moderate n and excellent for large n.
Type your three values on the left and the result card updates instantly. No sign-up, no downloads, and no statistical background required.
How to Use
- Enter the Number of Trials (n) — how many independent times you repeat the action. Ten coin flips, 20 survey respondents, 1,000 free-throw attempts.
- Enter the Number of Successes (k) — the exact count of successes you want to ask about. To find the chance of exactly 5 heads in 10 flips, set k = 5. k must be an integer between 0 and n.
- Enter the Probability of Success per Trial (p) as a percentage. A fair coin is 50%; a die rolling a six is about 16.67%; a basketball player with an 80% free-throw average is 80%.
- Read the result card. P(X = k) is the exact probability of landing on exactly k successes. P(X ≤ k) is the cumulative probability of k successes or fewer — the area from zero up to k on the distribution.
- Below the probabilities you will see the Expected Value (the long-run average number of successes, equal to n × p), the Variance n × p × (1 − p), and the Standard Deviation, which measures how spread out your results are likely to be.
If you instead want the chance of at least k successes, take 100% minus P(X ≤ k − 1).
The Binomial Probability Formula
The exact probability of exactly k successes in n independent trials with success probability p is:
P(X = k) = C(n, k) × p^k × (1 − p)^(n − k)
Where C(n, k) — read "n choose k" — is the number of ways to arrange k successes among n trials:
C(n, k) = n! / ( k! × (n − k)! )
The cumulative probability up to k is the sum of all individual probabilities from 0 to k:
P(X ≤ k) = Σ_{i=0..k} C(n, i) × p^i × (1 − p)^(n − i)
Computing that sum exactly requires looping over every i from 0 to k, which this tool's arithmetic engine does not do. Instead, the result card shows a normal approximation (bell-curve) of P(X ≤ k) with a continuity correction. That approximation is very close for n at least a few dozen and when p is not extremely close to 0% or 100%; for tiny n or extreme p, treat the cumulative number as a rough guide rather than an exact value. The exact P(X = k) on the same screen remains the closed-form binomial probability, computed to two decimal places.
For example, with n = 10, k = 5, p = 50%: C(10, 5) = 252, and each exact outcome has probability 0.5^10 = 0.0009766, so P(X = 5) = 252 × 0.0009766 = 0.2461, or about 24.6%. Summing all terms from i = 0 to i = 5 gives the exact P(X ≤ 5) ≈ 62.3%; the normal approximation on this tool returns about 62.4%, which is within a tenth of a point for this near-symmetric case.
The expected number of successes is always n × p. With n = 10 and p = 50%, you expect 5 heads, and the variance is n × p × (1 − p) = 10 × 0.5 × 0.5 = 2.5, so the standard deviation is about 1.58 flips.
When the Binomial Model Applies
The formula only works when four conditions hold — the "BIID" checklist:
- Binary outcome — every trial ends in one of two states, conventionally "success" or "failure."
- Independent trials — one trial's result does not change any other's. Drawing cards without replacement breaks independence; use the hypergeometric distribution instead.
- Identical probability — p stays the same on every trial. A basketball player's free-throw chance does not shift mid-season.
- Fixed n — you decide the number of trials in advance, rather than stopping after a certain number of successes.
If any condition fails, the binomial numbers above will mislead you.
Examples
Example 1 — Fair coin flips. Flip a fair coin 10 times (n = 10, p = 50%). What are the odds of exactly 5 heads? The calculator returns P(X = 5) ≈ 24.6% and P(X ≤ 5) ≈ 62.3%. Although 5 heads is the most likely single outcome, it still happens less than one time in four — a useful reality check for anyone who thinks "expected" means "guaranteed."
Example 1b — Exactly 3 heads. With the same n = 10, p = 50%, ask for exactly 3 heads. The formula gives C(10, 3) = 120 arrangements, each with probability 0.5^10, so P(X = 3) = 120 / 1024 ≈ 11.72%, and the cumulative P(X ≤ 3) ≈ 17.1%. Enter k = 3 rather than 5 and the result card updates to these exact values for any k between 0 and n, not just a few hard-coded counts.
Example 2 — Zero successes. A lab test has a 30% false-positive rate. You run it on 10 clean samples (n = 10, p = 30%). What is the chance of zero false positives? Setting k = 0 gives P(X = 0) = 0.7^10 ≈ 2.82%. That is a sobering number: even with ten supposedly clean samples, you will see at least one false positive about 97% of the time.
Example 3 — Quality control on a production line. A machine produces parts with a 2% defect rate. You sample 20 parts (n = 20, p = 2%). The expected number of defects is 0.4, the variance is about 0.39, and seeing even 1 defect (k = 1) is unusual enough that you would investigate the line rather than dismiss it as bad luck.
Example 4 — Large trials, normal shape. Toss a fair coin 1,000,000 times. The distribution has mean 500,000 and a standard deviation of 500 heads. The exact probability of landing on exactly 500,000 heads is tiny — around 0.08% — but the cumulative probability of landing at or below 500,000 is essentially 50%. This is the bell curve emerging from coin flips.
FAQ
What is a binomial probability?
It is the probability of getting exactly k successes in n independent yes/no trials, where each trial has the same success chance p. The formula is P(X = k) = C(n,k) × p^k × (1−p)^(n−k). This calculator computes that value directly, along with the cumulative probability P(X ≤ k).
What is the difference between P(X = k) and P(X ≤ k)?
P(X = k) is the probability of landing on exactly k successes — one bar on the histogram. P(X ≤ k) is the cumulative probability of k successes or fewer — the sum of all bars from 0 up to k. Use P(X = k) for "exactly 5 heads" and P(X ≤ k) for "at most 5 heads."
How do I calculate the probability of at least k successes?
For "at least k," compute 100% minus P(X ≤ k − 1). For example, the chance of at least 6 heads in 10 fair flips is 100% minus P(X ≤ 5) = 100% − 62.3% ≈ 37.7%.
What do expected value and variance tell me?
The expected value n × p is the long-run average number of successes — over many repeats of the experiment, the average converges to it. The variance n × p × (1 − p), and its square root (the standard deviation), measures how much individual results typically wobble around that average. Larger n means a smaller relative wobble, which is why large samples behave more predictably than small ones.
When should I NOT use the binomial distribution?
Do not use it when trials are not independent (e.g., drawing cards without replacement — use the hypergeometric distribution), when the success probability changes between trials, or when the number of trials is not fixed in advance. In those cases the binomial formula gives wrong answers.
Why is the probability of the "expected" outcome still so low?
Because the binomial distribution spreads probability across many possible values. With 10 fair coin flips, 5 heads is the single most likely outcome, but it only carries about 24.6% of the probability. The remaining three-quarters of the time you will see 0–4 or 6–10 heads. "Expected" means the long-run average, not a near-certain result.
Can this calculator handle very large n?
Yes. Behind the scenes the engine evaluates the binomial coefficient in log space — it takes Stirling's approximation of ln(n!) and combines the terms with the log-probabilities k·ln(p) + (n−k)·ln(1−p), then exponentiates — instead of building enormous integers, so it stays numerically stable even when n is 1,000,000 or more. The exact P(X = k) matches the closed-form C(n,k)·p^k·(1−p)^(n−k) to two decimal places, and the expected value and variance remain exact at any n. The cumulative P(X ≤ k) is computed with a normal approximation (with a continuity correction), which is most accurate near the mean and for larger n; it is shown rounded to two decimal places.
Disclaimer
This binomial probability calculator is provided for informational purposes only and does not constitute statistical, medical, legal, or financial advice. Results assume independent trials with a constant success probability; real-world experiments often violate these assumptions. Always verify critical decisions against authoritative statistical references or a qualified statistician.