Binomial Distribution Calculator

Enter the number of trials, the chance of success on each trial and the number of successes k.

Updated

Embed this calculator

Paste this code into your page. The calculator runs inside the frame and links back to the full version.

Keep the credit link in place. Do not resell the calculator.

Formula

  • P(X = k) = C(n, k) × p^k × (1 − p)^(n − k)
  • P(X ≤ k) is the sum of P(X = i) for i from 0 to k
  • P(X ≥ k) = 1 − P(X ≤ k − 1)
  • Mean n × p, variance n × p × (1 − p)

Worked example

n = 20 trials, p = 0.3, k = 6:

  • P(X = 6) = 0.1916
  • P(X ≤ 6) = 0.6080
  • P(X ≥ 6) = 0.5836
  • Mean = 20 × 0.3 = 6, variance = 20 × 0.3 × 0.7 = 4.2

Frequently asked questions

What is the binomial probability formula?

P(X = k) = C(n, k) × p^k × (1 − p)^(n − k). For 10 fair coin flips and exactly 5 heads, C(10, 5) = 252, so P = 252 ÷ 1024 = 0.2461.

What is the difference between P(X = k), P(X ≤ k) and P(X ≥ k)?

P(X = k) is exactly k successes. P(X ≤ k) adds up 0 through k. P(X ≥ k) adds up k through n. With n = 20 and p = 0.3, k = 6 gives 0.1916, 0.6080 and 0.5836.

What are the mean and variance of a binomial distribution?

The mean is n × p and the variance is n × p × (1 − p). For n = 20 and p = 0.3 the mean is 6 and the variance is 4.2.

When can I use the binomial distribution?

When there is a fixed number of independent trials, each with only two outcomes and the same success probability. Drawing without replacement from a small group breaks independence.