Skip to content

Binomial Distribution Calculator

Enter a number of trials, a success probability and a number of successes, and this returns the exact binomial probability along with all four cumulative versions, so you never have to decide in advance whether your problem said "at least" or "more than". The chart underneath draws the whole probability distribution and shades the bars your question adds up, which is the quickest way to catch an off-by-one before you write an answer down. Mean, variance, standard deviation and the combination count come with it. Reporting those alongside every bar is what makes it a binomial probability distribution calculator rather than a single-value one. Below are the binomial probability formula, a worked example, what the binomial CDF is, and a translation table for the wording.

00.51

Question to answer

P(X = 6) in 10 trials

0.2050781

That is 20.5078%, against an expected 5 successes give or take 1.58.

P(X = 6)
0.2050781
P(X < 6)
0.6230469
P(X ≤ 6)
0.828125
P(X > 6)
0.171875
P(X ≥ 6)
0.3769531
Mean, n × p
5
Variance
2.5
Standard deviation
1.5811
Most likely count
5
Ways, C(10, 6)
210

Distribution

00.0690.1380.2070.276012345678910successes (k)P(X = k)k = 0: P = 0.0009766 (0.0977%)k = 1: P = 0.0097656 (0.9766%)k = 2: P = 0.0439453 (4.3945%)k = 3: P = 0.1171875 (11.7188%)k = 4: P = 0.2050781 (20.5078%)k = 5: P = 0.2460938 (24.6094%)k = 6: P = 0.2050781 (20.5078%)k = 7: P = 0.1171875 (11.7188%)k = 8: P = 0.0439453 (4.3945%)k = 9: P = 0.0097656 (0.9766%)k = 10: P = 0.0009766 (0.0977%)mean 5

Each bar is the chance of exactly that many successes. The gold bars are the ones your question adds up, so the shaded area is the answer above. Hover a bar for its own probability, or click it to ask about that count.

Binomial probability formula

The binomial probability formula gives the chance of getting exactly k successes in n independent trials, when every trial succeeds with the same probability p:

P(X = k) = C(n, k) · pk · (1 − p)n−k

Read it as two pieces. The power terms give the probability of one specific sequence with k successes and n − k failures. C(n, k) counts how many different sequences have that many successes. Since those sequences are all equally likely, multiplying gets you the total.

  • C(n, k) = n! ÷ (k! · (n − k)!)
  • mean = n · p
  • variance = n · p · (1 − p)
  • standard deviation = √(n · p · (1 − p))
  • most likely count = ⌊(n + 1) · p⌋
  • P(X ≤ k) = sum of P(X = i) for i = 0 to k
Symbol Meaning Range
nNumber of trials, fixed before you startwhole number, 0 or more
pProbability that one trial succeeds0 to 1
kNumber of successes you are asking about0 to n
XThe random count of successes0 to n

Check this before you calculate

Most wrong binomial answers are not arithmetic mistakes. They come from using the binomial on a problem that was never binomial to begin with. Four things have to be true, and each one has a specific failure that gives it away:

Condition What breaks it Use instead
The number of trials is fixed Rolling until you finally get a six Geometric or negative binomial
Each trial has two outcomes Three or more categories per trial Multinomial, or group the outcomes into success and not
p is the same every trial A player who tires, a machine that drifts Poisson binomial, or split the run into blocks
Trials are independent Dealing cards, sampling without replacement Hypergeometric

The independence rule has a useful escape hatch. If you are sampling without replacement but the sample is under about 10% of the population, p barely moves between draws and the binomial is close enough that the difference will not change your conclusion. Drawing 5 cards from a deck is not that case. Surveying 200 people out of a city is.

A worked example

A player makes 75% of their free throws and takes 8 of them. What is the chance they make exactly 6?

  1. Step 1. Name the parameters

    n = 8, p = 0.75, k = 6

  2. Step 2. Count the arrangements

    C(8, 6) = 8! ÷ (6! · 2!) = 28

  3. Step 3. Weight one arrangement

    0.756 · 0.252 = 0.177979 · 0.0625 = 0.01112366

  4. Step 4. Multiply

    P(X = 6) = 28 · 0.01112366 = 0.3114624

So about 31.1462%. Worth noticing: 6 is not the most likely result even though it is the closest whole number to the mean of 6. The peak sits at 6, and the chance of making at least 6 is 67.8543%, which is the number a coach would actually care about.

At least, at most, and the words in between

Nearly every binomial mistake that is not a setup error is a boundary error: including k when the question excluded it, or the reverse. The gap between the two is exactly P(X = k), which for 6 heads in 10 flips is 20.5078%, more than enough to fail a homework problem. Here is one question written seven ways, all for 10 fair coin flips.

The question says You want Counts 6 itself? Probability
exactly 6 P(X = 6) yes 20.5078%
at least 6 P(X ≥ 6) yes 37.6953%
6 or more P(X ≥ 6) yes 37.6953%
more than 6 P(X > 6) no 17.1875%
at most 6 P(X ≤ 6) yes 82.8125%
no more than 6 P(X ≤ 6) yes 82.8125%
fewer than 6 P(X < 6) no 62.3047%

The two pairs that add to 1 are P(X ≤ 6) with P(X > 6), and P(X < 6) with P(X ≥ 6). Pairing P(X ≤ 6) against P(X ≥ 6) instead double counts the 20.5078% sitting at exactly 6, which is the classic version of this error.

What the binomial CDF is

The binomial CDF, short for cumulative distribution function, is the running total of the bars rather than any single one. Written F(k) = P(X ≤ k), it adds up every outcome from 0 up to and including k:

F(k) = P(X ≤ k) = sum of C(n, i) · pi · (1 − p)n−i for i = 0 to k

That is the difference between the two functions on a graphing calculator. In 10 fair coin flips, binompdf gives P(X = 6) = 0.2050781, the height of one bar, while binomcdf gives P(X ≤ 6) = 0.828125, everything from 0 to 6 combined. The CDF never decreases as k grows, and F(n) = 1, because by then you have summed the whole distribution.

Textbooks teach the other three tails as rearrangements of it, which is where the off-by-one creeps in. All four values below are for 10 flips at p = 0.5:

You want From the CDF Value at k = 6
P(X ≤ k) F(k) 0.828125
P(X < k) F(k − 1) 0.6230469
P(X > k) 1 − F(k) 0.171875
P(X ≥ k) 1 − F(k − 1) 0.3769531

The k − 1 on the last two rows is the step people drop. This calculator does not make you apply any of them, since it reports all five at once. It also does not compute the upper tails by subtracting. Summing them from the far end keeps the digits: for 900 or more heads in 1,000 flips, 1 − F(899) rounds to a flat zero on a calculator carrying 15 digits, while the direct sum still returns a real value.

Every outcome of 10 coin flips

A complete binomial table for n = 10 and p = 0.5, generated at build time by the calculator's own solver. The last column is C(10, k), the number of head-and-tail orderings that produce that many heads, and those counts add up to 210 = 1,024 possible sequences.

Heads (k) P(X = k) P(X ≤ k) P(X ≥ k) Orderings
0 0.0977% 0.0977% 100% 1
1 0.9766% 1.0742% 99.9023% 10
2 4.3945% 5.4688% 98.9258% 45
3 11.7188% 17.1875% 94.5313% 120
4 20.5078% 37.6953% 82.8125% 210
5 24.6094% 62.3047% 62.3047% 252
6 20.5078% 82.8125% 37.6953% 210
7 11.7188% 94.5313% 17.1875% 120
8 4.3945% 98.9258% 5.4688% 45
9 0.9766% 99.9023% 1.0742% 10
10 0.0977% 100% 0.0977% 1

Even at the peak, 5 heads turns up only 24.6094% of the time. That is the part people find counterintuitive about fair coins: the average outcome is still the exception. Landing anywhere from 4 to 6 heads is the more useful bet at 65.625%.

How p changes the shape

Drag the probability slider on the calculator and the chart slides and squeezes at the same time. The center moves to n · p, while the spread is widest at p = 0.5 and falls away toward both ends. All five rows below use 20 trials.

p Mean Std deviation Peak at Shape
0.05 1 0.975 1 piled up on the left, long right tail
0.25 5 1.936 5 piled up on the left, long right tail
0.5 10 2.236 10 symmetric
0.75 15 1.936 15 piled up on the right, long left tail
0.95 19 0.975 19 piled up on the right, long left tail

Skew comes from the wall at 0 and the wall at n. At p = 0.05 the count cannot go below zero, so the only room left to vary is upward and the distribution leans right. The two extreme rows are mirror images of each other, which is the general rule: swapping p for 1 − p flips the picture left to right.

Reading the chart

  • Every bar is one possible number of successes, and its height is that exact probability. Bars rather than a curve, because the count is a whole number.
  • Gold bars are the ones your selected question sums. Switching between P(X = k) and P(X ≥ k) repaints the region, so you can see what the wording costs before you commit to an answer.
  • The dashed line marks the mean, n · p. It usually sits beside the tallest bar rather than on it, since the mean can be a fraction and the peak cannot.
  • Hover any bar to read its own probability.
  • Past 241 possible outcomes the chart shows a window rather than all of them, centered to keep both the peak and your k in view. The numbers in the results panel always cover the full distribution.

How to use this calculator

  1. Enter the number of trials. It has to be fixed in advance for the binomial to apply at all.
  2. Enter the success probability as a decimal, so 25% is 0.25, or drag the slider to sweep it.
  3. Enter the number of successes you are asking about, anywhere from 0 to n.
  4. Pick the notation that matches your question. All five probabilities stay visible either way, with the selected one highlighted and shaded on the chart.

Used as a plain binomial probability calculator for one homework value, the first three steps are all you need. The notation buttons only start to matter once the question asks about a range instead of an exact count.

What this covers and what it does not

This computes exact binomial probabilities, summed term by term rather than approximated, for up to 100,000 trials. It does not cover the neighboring distributions: geometric and negative binomial, when the trial count is not fixed; hypergeometric, when you sample without replacement; Poisson, when you are counting events in an interval rather than successes in trials; or multinomial, when a trial has more than two outcomes. It also does not do inference, so there are no confidence intervals or hypothesis tests on p here. Those are separate questions that start from a binomial rather than being answered by one.

Coin flip probability

A coin flip is the binomial case everyone meets first: p = 0.5, and n is however many times you flip. Enter 10 trials at 0.5 and the calculator above answers every coin question at once. Exactly 6 heads in 10 flips is 0.2050781, at least 6 is 0.3769531, and 5 heads, the single most likely result, still only comes up 24.6094% of the time. A biased coin needs nothing new, just a p that is not 0.5. For rolls rather than flips, the dice probability calculator handles totals and matching dice directly, and for the algebra behind two events happening together the probability calculator shows the working.

Frequently Asked Questions

What is a binomial distribution?
It is the distribution of the number of successes in a fixed number of independent yes-or-no trials that all share the same success probability. Ten coin flips, twenty free throws, a batch of 500 parts checked against one defect rate: in each case the count of successes follows a binomial distribution with parameters n and p.
What is the binomial probability formula?
P(X = k) = C(n, k) × p^k × (1 − p)^(n − k), where C(n, k) = n! ÷ (k! (n − k)!) counts the orderings that produce k successes. The power terms give the probability of any one such ordering, and multiplying by the count adds up the ones that are equally likely.
How do you calculate binomial probability by hand?
Count the arrangements, then weight them. For 6 successes in 8 trials at p = 0.75: C(8, 6) = 28, then 0.75^6 = 0.177979 and 0.25^2 = 0.0625. Multiply the three together and you get 0.3114624, about 31.1462%.
What does at least mean in a binomial problem?
At least k means k or more, which is P(X ≥ k) and includes k itself. More than k excludes it, so it is P(X > k). The same split applies at the other end: at most k is P(X ≤ k) and fewer than k is P(X < k). Picking the wrong one shifts the answer by exactly P(X = k), which is why this tool shows all five at once instead of making you choose up front.
When can I use the binomial distribution?
Four conditions have to hold: the number of trials is fixed before you start, each trial has only two outcomes, the success probability is the same every trial, and the trials are independent. Break the last two and you need a different model. Sampling without replacement from a small population, for example, is hypergeometric rather than binomial.
What is the difference between a binomial and a Bernoulli distribution?
A Bernoulli trial is one flip, scored 0 or 1. A binomial variable is the sum of n independent Bernoulli trials, so Bernoulli is just the n = 1 case. That is also why the mean of a binomial is n × p: it is n copies of a Bernoulli mean of p.
What is the mean and standard deviation of a binomial distribution?
The mean is n × p and the variance is n × p × (1 − p), so the standard deviation is the square root of that. For 20 trials at p = 0.5 the mean is 10 and the standard deviation is 2.236. Spread is widest at p = 0.5 and shrinks toward either end, because a near-certain trial has almost nothing left to vary.
How do I get P(X ≥ k) from a calculator that only gives P(X ≤ k)?
P(X ≥ k) = 1 − P(X ≤ k − 1). The k − 1 is the part people drop, and it costs you exactly one term. This calculator sums the upper tail directly instead of subtracting, which also keeps very small tail probabilities from rounding away to zero.
What is the binomial CDF?
The cumulative distribution function, F(k) = P(X ≤ k), which is the running total of every outcome from 0 up to and including k. It is the binomcdf on a graphing calculator, against binompdf for the single value P(X = k). In 10 fair coin flips binompdf at k = 6 is 0.2050781, while binomcdf at k = 6 is 0.828125. The CDF never decreases and reaches 1 at k = n.
What is the largest number of trials this handles?
100,000. The probabilities go through logarithms of the gamma function rather than raw factorials, so nothing overflows the way n! does past 170, and a tail as small as 1e-300 still comes back as a number rather than zero.
Why is my probability so small?
With many trials every individual count is unlikely, because the total probability is spread across n + 1 possible outcomes. In 1,000 fair coin flips the single most likely result is 500 heads, and even that happens only about 2.5% of the time. If you want the chance of a range rather than one exact count, use one of the cumulative buttons.
Is the binomial distribution discrete or continuous?
Discrete. X can only be a whole number from 0 to n, which is why the chart is a set of separate bars and not a curve. The height of each bar is a real probability you can read off, unlike a continuous density where only areas mean anything.
When should I use a normal approximation instead?
The normal approximation is reasonable once n × p and n × (1 − p) are both at least 10, and it was how people handled large n before calculators. There is no reason to approximate here, since the exact sum runs in your browser in milliseconds. Use the approximation for intuition about the shape, not for the answer.
Is anything I enter sent to a server?
No. The whole calculation and the chart run in your browser. Nothing you type leaves the page.

Related Calculators