Binomial Probability Calculator
Given n independent Bernoulli trials with success probability p, the binomial distribution tells you how often you’ll see exactly k successes. The calculator handles the exact probability P(X = k), the cumulative P(X ≤ k), the upper tail P(X ≥ k) and the mean/variance in one shot — all with the log-gamma-based combinatorics so it stays accurate even at n = 10,000.
How to calculate binomial probability
-
1
Enter n (number of trials)
Must be a non-negative integer. Typical values: 10 coin flips, 100 A/B test visitors, 10,000 manufacturing samples.
-
2
Enter p (success probability)
A value between 0 and 1. For a fair coin p = 0.5; for a 12% click-through rate p = 0.12.
-
3
Enter k (target number of successes)
An integer from 0 to n.
-
4
Read the probabilities
Exact P(X = k), left tail P(X ≤ k), right tail P(X ≥ k), plus mean = np and variance = np(1-p).
The formula
P(X = k) = C(n, k) · p^k · (1-p)^(n-k)
Where C(n, k) is the binomial coefficient “n choose k”. The tool uses log-space arithmetic via the gamma function to avoid overflow when n is large.
Worked example: 10 coin flips, exactly 7 heads
- n = 10, p = 0.5, k = 7
- C(10, 7) = 120
- P(X = 7) = 120 · 0.5^7 · 0.5^3 = 120 / 1024 ≈ 0.1172
So about 11.7% of the time you’ll see exactly 7 heads in 10 flips.
When the binomial distribution applies
All four Bernoulli assumptions must hold:
- Fixed number of trials (n is decided in advance).
- Each trial is independent of the others.
- Only two outcomes per trial (success / failure).
- Constant success probability p across trials.
If any assumption breaks (dependent draws without replacement, variable p, more than two outcomes), reach for the hypergeometric, Poisson-binomial or multinomial distribution instead.
Mean, variance and normal approximation
- Mean: μ = np
- Variance: σ² = np(1-p)
- Standard deviation: σ = √(np(1-p))
When np ≥ 10 and n(1-p) ≥ 10, the binomial is well-approximated by Normal(μ, σ²) with a continuity correction. The calculator flags this condition so you can swap to a z-score shortcut when applicable.
Frequently Asked Questions
P(X = k) is the probability of exactly k successes; P(X ≤ k) is the cumulative probability of at most k. For 10 flips of a fair coin, P(X = 5) ≈ 0.246 but P(X ≤ 5) ≈ 0.623.
Yes. The calculator returns P(X ≥ k) = 1 - P(X ≤ k-1). For “more than k”, subtract one more: P(X > k) = P(X ≥ k+1).
Up to 100,000 is stable thanks to log-gamma computation. Beyond that, use the normal approximation or the Poisson approximation (valid when p is small and n is large).
Then you need the Poisson-binomial distribution, not the plain binomial. This calculator assumes a single constant p across all n trials.
Related Tools
BMI Calculator
Calculate body mass index from height and weight. Shows WHO category, healthy-weight range and limitations of BMI.
GPA Calculator
Calculate grade point average from letter grades and credit hours. Supports US 4.0 and 5.0 honors scales with the standard A/B/C/D letter table.
Inflation Calculator
Calculate the equivalent purchasing power of a dollar across any two years using historical CPI data from 1913 to today.
Scientific Calculator
Full scientific calculator with trig, log, exponents, factorial, memory, parentheses and DEG/RAD toggle. Runs in your browser.
Calorie Calculator
Estimate daily calorie needs for your goal using Mifflin-St Jeor BMR and activity factors. Includes deficit and surplus targets.
Amp-Hour Calculator
Work out battery runtime and stored energy from amp-hours, voltage and load current. Get runtime in hours and minutes plus energy in watt-hours and kilowatt-hours.