Binomial Probability Calculator
Calculate the exact binomial probability P(X = k) for n trials with probability p.
How to use this tool
- Enter trials (n), successes (k) and probability of success (p) in the fields above.
- Results update instantly as you type โ or click Calculate.
- Read your p(x = k) and the full breakdown beneath it.
P(X = k) = C(n,k) ร p^k ร (1โp)^(nโk). Calculated using log-space arithmetic to avoid overflow for large n.
Formula
P(X = k) = C(n, k) ร pk ร (1 โ p)n โ k
Where C(n, k) = n! / (k! ร (n โ k)!) is the binomial coefficient. Computed in log-space to avoid overflow: ln P = ln C(n,k) + k ln p + (nโk) ln(1โp).
How it works
This calculator gives the exact probability of obtaining exactly k successes in n independent Bernoulli trials, each with success probability p.
To avoid numerical overflow for large n, the binomial coefficient and powers are computed using logarithms of factorials and then exponentiated. The model assumes each trial is independent and the probability p is constant across all trials.
Worked example
Worked example
- Inputs: n = 10 trials, k = 3 successes, p = 0.5.
- Binomial coefficient: C(10, 3) = 10! / (3! ร 7!) = 120.
- Powers: pยณ = 0.5ยณ = 0.125; (1โp)โท = 0.5โท = 0.0078125.
- P(X = 3) = 120 ร 0.125 ร 0.0078125 = 120 ร 0.000976563 โ 0.1172.
P(X = 3) = 0.1172
Key terms
- Binomial distribution
- A discrete probability distribution counting the number of successes in n independent trials, each with the same probability p of success.
- Binomial coefficient C(n, k)
- The number of distinct ways to choose k items from n items without regard to order; also written as n-choose-k or (n k).
- Bernoulli trial
- A single experiment with exactly two possible outcomes (success or failure), each with fixed probabilities p and 1 โ p.
- Independence
- The assumption that the outcome of one trial does not affect any other trial; required for the binomial model to apply.
- Expected value
- The mean number of successes in a binomial experiment: E[X] = n ร p.
Frequently asked questions
- What is the binomial distribution?
- The binomial distribution models the number of successes in n independent yes/no trials, each with the same probability p of success. Classic examples: coin flips, pass/fail tests.