Binomial Distribution Calculator

P(X = k) PMF & CDF Bar Chart Free · No Signup

Free online binomial distribution calculator: compute exact P(X = k), cumulative P(X ≤ k), or range P(a ≤ X ≤ b) probabilities for any number of trials n and success probability p. Interactive Plotly PMF chart, step-by-step KaTeX formulas, and Python scipy export.

Binomial Distribution Calculator
Number of independent Bernoulli trials
Probability on each trial (0 to 1)

Exactly k successes out of n trials

Result

🎲

Enter values and click Calculate

Find binomial probabilities for your parameters.

Probability Mass Function

📊

No chart yet

Calculate to see the PMF bar chart.

Python Compiler

What Is the Binomial Distribution?

The binomial distribution models the number of successes in n independent Bernoulli trials, each with the same success probability p. It answers questions like “If I flip a coin 10 times, what’s the probability of getting exactly 6 heads?”

PMF:  P(X = k) = C(n, k) × pk × (1 − p)n−k
🎯

Fixed Trials

The number of trials n is fixed in advance. Each trial is independent of the others.

⚖️

Two Outcomes

Each trial has exactly two outcomes: success (probability p) or failure (probability 1 − p).

📏

Constant Probability

The probability of success p remains the same for every trial.

Key Formulas & Statistics

Binomial Coefficient:  C(n, k) = n! / (k! × (n − k)!)
StatisticFormulaExample (n=10, p=0.5)
Mean (μ)n × p5.0
Variance (σ²)n × p × (1 − p)2.5
Std Dev (σ)√(n × p × (1 − p))1.5811
Skewness(1 − 2p) / σ0.0 (symmetric)
Worked Example: Flip a fair coin 10 times. What is P(X = 6)?
C(10, 6) = 210
P(X = 6) = 210 × 0.56 × 0.54 = 210 × 0.015625 × 0.0625 = 0.2051

Normal Approximation to Binomial

When n is large enough, the binomial distribution can be approximated by a normal distribution. This is useful for quick calculations without summing many PMF values.

Approximation:  X ~ N(np, np(1 − p))   when np ≥ 5 and n(1 − p) ≥ 5

Apply a continuity correction of ±0.5 for better accuracy. For example, P(X ≤ k) ≈ Φ((k + 0.5 − np) / √(np(1 − p))).

n = 30, p = 0.5

Real-World Applications

Quality Control

Number of defective items in a batch. If defect rate is 5%, what is the probability of finding 0–2 defects in 100 items?

Medicine & Clinical Trials

Number of patients responding to treatment. If a drug has 70% efficacy, what is P(at least 15 of 20 respond)?

Survey & Polling

Number of “yes” responses in a sample. If 30% of voters support a policy, how many in a sample of 50?

Sports & Games

Free throw success rates, coin tosses, dice outcomes. Classic probability scenarios modeled by binomial.

Frequently Asked Questions

A binomial distribution models the number of successes in n independent Bernoulli trials, each with the same success probability p. It is a discrete probability distribution where outcomes are counted as whole numbers from 0 to n.
Use the formula P(X = k) = C(n, k) × pk × (1 − p)n−k, where C(n, k) is the binomial coefficient “n choose k”. This calculator computes it automatically with step-by-step formulas.
PMF (probability mass function) gives the probability of exactly k successes: P(X = k). CDF (cumulative distribution function) gives the probability of at most k successes: P(X ≤ k), which is the sum of PMF values from 0 to k.
When np ≥ 5 and n(1 − p) ≥ 5, the binomial can be approximated by N(np, np(1−p)). Apply a continuity correction of ±0.5 for better accuracy.
Mean = n × p. Variance = n × p × (1 − p). Standard deviation = √(variance). Skewness = (1 − 2p) / √(np(1−p)). When p = 0.5, the distribution is symmetric.
Common examples include coin flips, quality control defect counts, survey yes/no responses, clinical trial outcomes, free throw success rates in basketball, and genetics where offspring inherit traits with fixed probability.

Support This Free Tool

Every coffee helps keep the servers running. Every book sale funds the next tool I'm dreaming up. You're not just supporting a site — you're helping me build what developers actually need.

500K+ users
200+ tools
100% private
Privacy Guarantee: Private keys you enter or generate are never stored on our servers. All tools are served over HTTPS.