Skip to content
MoneyDeck

Binomial Distribution Calculator

Find exact, at-most and at-least probabilities for n independent trials

Updated · Free, no signup

A decimal between 0 and 1, e.g. 0.25 for 25%.

P(X = k)

0.246094

P(X ≤ k) — at most k

0.623047

P(X < k) — fewer than k

0.376953

P(X ≥ k) — at least k

0.623047

P(X > k) — more than k

0.376953

Mean (expected successes) np

5

Variance np(1 − p)

2.5

Standard deviation

1.5811

  • There is a 24.6094% chance of exactly 5 successes and a 62.3047% chance of 5 or more.
  • On average you would expect 5 successes, give or take about 1.581.

Probability of each number of successes

About the Binomial Distribution Calculator

This binomial distribution calculator gives the probability of getting exactly k successes in n independent trials when each trial succeeds with the same probability p. It also returns the cumulative probabilities people usually need — at most k, fewer than k, at least k and more than k — so it covers both binompdf and binomcdf in one place.

Use it for coin flips, quality-control defect counts, free-throw percentages, survey yes/no responses, A/B test conversions or any statistics homework where outcomes are success/failure. The chart shows the whole probability mass function so you can see where the outcomes cluster, and the mean, variance and standard deviation are included for context.

The binomial model assumes a fixed number of trials, only two outcomes per trial, independence between trials and a constant p. Probabilities are computed in log space, so n can be as large as 1,000 without overflow.

With the default inputs, the p(x = k) is 0.246094. Change any value above to recalculate instantly.

How to use the binomial distribution calculator

  1. 1Enter the number of trials n.
  2. 2Enter the probability of success on one trial as a decimal (0.3 for 30%).
  3. 3Enter the number of successes k you care about.
  4. 4Read P(X = k) for “exactly” and the cumulative results for “at most” or “at least”.
  5. 5Use the chart to see how likely every other outcome is.

Formula and method

P(X = k) = C(n, k) × pᵏ × (1 − p)ⁿ⁻ᵏ P(X ≤ k) = Σᵢ₌₀ᵏ P(X = i)

Each specific sequence with k successes and n − k failures has probability pᵏ(1 − p)ⁿ⁻ᵏ, and there are C(n, k) = n! ÷ (k!(n − k)!) such sequences, which gives the exact probability. Cumulative probabilities add the exact terms: “at most k” sums i = 0…k, and “at least k” is 1 minus the probability of fewer than k.

The mean of a binomial distribution is np and the variance is np(1 − p). To stay accurate for large n, the calculator evaluates each term with logarithms of the gamma function instead of multiplying huge factorials directly.

n
Number of independent trials
k
Number of successes of interest
p
Probability of success on a single trial
C(n, k)
Number of ways to choose which k trials succeed

Worked examples

Exactly 5 heads in 10 coin flips

C(10, 5) = 252 sequences each with probability 0.5¹⁰ = 1/1024, so P(X = 5) = 252/1024 ≈ 0.2461. By symmetry P(X ≤ 5) and P(X ≥ 5) are both 638/1024 ≈ 0.6230.

At least 8 free throws out of 10 for a 70% shooter

P(X = 8) = C(10, 8)(0.7)⁸(0.3)² ≈ 0.2335. Adding P(9) ≈ 0.1211 and P(10) ≈ 0.0282 gives about a 38.3% chance of making 8 or more shots.

Defects: at most 2 bad parts in 50 with a 3% defect rate

With np = 1.5 expected defects, the probability of 0, 1 or 2 defective parts sums to about 0.811, so there is roughly a 19% chance a batch has more than 2 defects.

Frequently asked questions

When should I use the binomial distribution?+

Use it when you have a fixed number of independent trials, each with exactly two outcomes (success or failure) and the same probability of success every time — for example coin flips, pass/fail inspections or yes/no survey answers.

What is the difference between binompdf and binomcdf?+

binompdf gives the probability of exactly k successes, P(X = k). binomcdf gives the cumulative probability of k or fewer, P(X ≤ k). This calculator shows both, plus the “at least” and “more than” versions.

How do I calculate the probability of at least k successes?+

Take 1 minus the probability of fewer than k successes: P(X ≥ k) = 1 − P(X ≤ k − 1). For “at least one success” this simplifies to 1 − (1 − p)ⁿ.

What are the mean and standard deviation of a binomial distribution?+

The mean is np and the standard deviation is √(np(1 − p)). For 100 trials with p = 0.2 you would expect 20 successes with a standard deviation of 4.

When can I use a normal approximation instead?+

A common rule is that both np and n(1 − p) should be at least 10. Then the binomial is close to a normal distribution with mean np and variance np(1 − p), ideally with a continuity correction of ±0.5.

Related tools