ThisCalculator

Statistics

Binomial Distribution Range Calculator

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

Binomial Distribution Range Calculator

This calculator works out the probability range for a binomial distribution: you enter the number of trials (n), the success probability per trial (p), and the lower and upper bounds of the number of successes you are interested in, and it returns the cumulative probability of observing a result within that range. It also shows the mean and standard deviation of the distribution so you can see how the range relates to the center and spread. The calculation uses the standard binomial probability formula and sums the individual probabilities for every integer between your chosen bounds.

Formula

The binomial distribution gives the probability of exactly k successes in n independent trials, each with success probability p. The probability mass function is:

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

where C(n, k) is the binomial coefficient (n choose k), equal to n! / (k! · (n − k)!). To find the probability that the number of successes falls between two bounds k1 and k2 (inclusive), you sum the probabilities for every integer k from k1 to k2:

P(k1 ≤ X ≤ k2) = Σk=k1k2 C(n, k) · pk · (1 − p)n − k

Variables:

  • n – number of trials (positive integer)
  • p – probability of success on a single trial (0 ≤ p ≤ 1)
  • k – number of successes (integer from 0 to n)
  • k1 – lower bound of the range (integer ≥ 0)
  • k2 – upper bound of the range (integer ≤ n)

The mean is μ = n·p and the standard deviation is σ = √(n·p·(1−p)). These are useful for understanding where the bulk of the probability lies.

Worked Example

Using the default values from the calculator: n = 20 trials, p = 0.5, lower bound k1 = 5, upper bound k2 = 15.

We need to sum P(X = k) for k = 5, 6, …, 15. Each term is C(20, k) · 0.5k · 0.520−k = C(20, k) · 0.520.

Let’s compute a few terms:

  • k = 5: C(20,5) = 15504, term = 15504 × 0.520 ≈ 0.0148
  • k = 10: C(20,10) = 184756, term = 184756 × 0.520 ≈ 0.1762
  • k = 15: C(20,15) = 15504, term ≈ 0.0148

Summing all terms from k = 5 to 15 gives approximately 0.9793. So the probability of getting between 5 and 15 heads in 20 coin flips is about 97.93%. The mean is 20 × 0.5 = 10, and the standard deviation is √(20 × 0.5 × 0.5) ≈ 2.236.

When to Use This Calculator

Use a binomial range calculator whenever you have a fixed number of independent trials, each with the same probability of success, and you want the probability that the number of successes falls within a specific interval. Common situations include:

  • Quality control: probability that the number of defective items in a batch is between 2 and 5.
  • Surveys: probability that between 40% and 60% of a sample of 100 people answer “yesâ€� (with p = 0.5).
  • Games: probability of winning between 3 and 7 out of 10 rounds.
  • Biology: probability that a certain number of seeds germinate out of a planted set.

The calculator is especially helpful when n is large and you need a range rather than an exact count. It saves you from summing many individual probabilities by hand.

How to Choose the Bounds

Choosing the lower and upper bounds depends on the question you are asking. If you want “at least 5 successes,� set the lower bound to 5 and the upper bound to n. If you want “no more than 3,� set the lower bound to 0 and the upper bound to 3. For “exactly 10,� set both bounds to 10. For a symmetric interval around the mean, you might choose k1 = μ − 2σ and k2 = μ + 2σ, which captures about 95% of the probability for a binomial when n is large enough.

Remember that the binomial distribution is discrete, so the range includes all integers between the bounds. If your bounds are not integers, the calculator will still work, but you should round them to the nearest integers to match the actual possible outcomes.

Common Mistakes and Misconceptions

One common mistake is forgetting that the binomial distribution is discrete. For example, asking for the probability that X is between 5 and 15 includes 5, 6, …, 15, not 5.5 or 6.3. Another mistake is using the normal approximation without a continuity correction when n is small; the exact binomial calculation is always more accurate.

A frequent misconception is that p must be 0.5. In reality, p can be any value between 0 and 1. For example, if a free-throw shooter makes 70% of shots, p = 0.7. The distribution will be skewed, and the range calculator handles that correctly.

Also, ensure that the trials are truly independent and that p stays constant. If the probability changes from trial to trial or the trials are not independent, the binomial model does not apply.

Limits of the Binomial Range Calculator

The calculator assumes a fixed number of trials, constant probability, and independence. It does not handle cases where n is not an integer or p is outside [0,1]. For very large n (e.g., n > 1000), the calculator may be slow or produce rounding errors due to the large binomial coefficients; in such cases, the normal approximation (with continuity correction) is often used instead.

Also, the calculator gives the probability for a range, but it does not tell you the probability of a single outcome beyond the range. If you need the probability of “exactly k,� set both bounds to k. If you need the cumulative probability “less than k,� set the upper bound to k−1.

Alternatives and Related Distributions

If your situation does not fit the binomial model, consider these alternatives:

  • Hypergeometric distribution: when trials are not independent (sampling without replacement from a finite population).
  • Poisson distribution: when n is large and p is small, for counting rare events over time or space.
  • Normal distribution: as an approximation to the binomial when n is large (np and n(1−p) both ≥ 5).
  • Negative binomial distribution: when you are counting the number of trials needed to achieve a fixed number of successes.

Each of these has its own formula and calculator, but the binomial range calculator is the right choice for the classic “fixed number of independent trials� scenario.

Frequently Asked Questions

What does the result mean?

The result is the probability that the number of successes in n trials falls between the lower and upper bounds you set. For example, if you get 0.9793, there is a 97.93% chance of observing between 5 and 15 successes in 20 trials with p = 0.5.

Can I use this for p values other than 0.5?

Yes, you can enter any p between 0 and 1. The formula works for any success probability. For p = 0.7, the distribution shifts to the right, and the calculator will give the correct probability for your chosen range.

What if my bounds are outside 0 to n?

The calculator will still compute, but the result will be the same as if you had clipped the bounds to 0 and n. For example, if you set lower = −5 and upper = 3, it is equivalent to 0 to 3. It is best to enter valid bounds to avoid confusion.

How is this different from a cumulative distribution calculator?

A cumulative distribution calculator typically gives P(X ≤ k) for a single k. This range calculator gives P(k1 ≤ X ≤ k2), which is the difference between two cumulative probabilities: P(X ≤ k2) − P(X ≤ k1−1). So it is a more flexible tool for interval questions.

Why is the standard deviation important?

The standard deviation tells you how spread out the distribution is. For a binomial, σ = √(np(1−p)). A larger σ means the probabilities are spread over a wider range of k values. Knowing σ helps you choose meaningful bounds (e.g., mean ± 2σ) to capture a certain percentage of outcomes.

Can I use this for a one-tailed question like “at least 10�?

Yes. Set the lower bound to 10 and the upper bound to n (the number of trials). The calculator will sum probabilities from 10 to n, giving you P(X ≥ 10). Similarly, for “at most 10,� set lower = 0 and upper = 10.

Related

Formula used
in n | Number of trials (n) | - | 20 | 1
in p | Success probability (p) | - | 0.5 | 0
in lower | Lower bound (k1) | - | 5 | 0
in upper | Upper bound (k2) | - | 15 | 0
out prob | P(k1 ≤ X ≤ k2) | - | sum(ncr(n,k)*p^k*(1-p)^(n-k), k=lower..upper) | 4
out mean | Mean (np) | - | n*p | 2
out sd | Standard deviation | - | sqrt(n*p*(1-p)) | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.