BYTETOOLS

Binomial Distribution Calculator

Compute binomial probabilities P(X=k), P(X≤k) and P(X≥k) for n trials with success chance p, plus the distribution's mean, variance and standard deviation.

0.246094
P(X = 5)
0.376953
P(X < 5)
0.623047
P(X ≤ 5)
0.376953
P(X > 5)
0.623047
P(X ≥ 5)

Distribution summary

5
Mean (np)
2.5
Variance np(1−p)
1.581139
Std deviation

P(X = k) = C(n, k) pᵏ (1−p)ⁿ⁻ᵏ with C(n, k) evaluated via the log-gamma function, so large n never overflows.

Probability distribution (k = 5 highlighted)

What is the Binomial Distribution Calculator?

The ByteTools Binomial Distribution Calculator finds the probability of getting exactly, at most, or at least k successes in n independent trials when each trial succeeds with probability p.

  • Exact P(X = k), P(X ≤ k), P(X ≥ k), P(X < k) and P(X > k)
  • Log-gamma binomial coefficients — no overflow at large n
  • Mean, variance and standard deviation of the distribution
  • Canvas bar chart of the full distribution with k highlighted
  • Accepts p as a decimal or percentage
  • 100% private — computed entirely in your browser

How to use the Binomial Distribution Calculator

  1. 1

    Enter the number of trials n and the success probability p.

  2. 2

    Enter k, the number of successes you are interested in.

  3. 3

    Read P(X = k) and the cumulative probabilities around k.

  4. 4

    Check the mean, variance and standard deviation of the distribution.

  5. 5

    Copy the summary or study the probability bar chart.

About the Binomial Distribution Calculator

The ByteTools Binomial Distribution Calculator finds the probability of getting exactly, at most, or at least k successes in n independent trials when each trial succeeds with probability p. It reports P(X = k), P(X < k), P(X ≤ k), P(X > k) and P(X ≥ k), plus the distribution's mean np, variance np(1−p) and standard deviation.

To stay accurate at large n, the binomial coefficient is evaluated through the log-gamma function rather than raw factorials, so C(n, k) never overflows — probabilities for n in the thousands are computed stably. Cumulative probabilities are exact sums of the individual terms, not approximations.

A canvas bar chart of the distribution highlights k so you can see where your outcome sits. Everything runs 100% locally in your browser — nothing you enter is uploaded — making it perfect for statistics homework, quality control and A/B test intuition.

Frequently asked questions

How do you calculate a binomial probability?

P(X = k) = C(n, k) × pᵏ × (1−p)ⁿ⁻ᵏ, where C(n, k) counts the ways to choose which k trials succeed. For n = 10 coin flips and k = 5 heads, that is C(10,5)/2¹⁰ = 252/1024 ≈ 0.2461.

When does the binomial distribution apply?

When you have a fixed number of independent trials, each with the same two outcomes (success/failure) and constant success probability. Coin flips, defective items in a batch, and email click-throughs are classic examples. If trials affect each other, the binomial model breaks down.

What is the difference between P(X ≤ k) and P(X < k)?

P(X ≤ k) includes exactly k successes, while P(X < k) stops at k − 1. Because the binomial is discrete the two differ by exactly P(X = k), so it matters which one a question asks for. This tool reports both to remove the ambiguity.

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

The mean is np and the variance is np(1−p), so the standard deviation is √(np(1−p)). For n = 100 and p = 0.5 that is a mean of 50 with a standard deviation of 5.

How large can n be before the calculation fails?

Because the coefficients are computed with logarithms of the gamma function, there is no factorial overflow; the tool supports n up to 10,000 with exact term-by-term cumulative sums. For very large n, the normal approximation with mean np and variance np(1−p) is also excellent.

Related tools