Math

Binomial Distribution Calculator

Find exact, cumulative, or upper-tail binomial probabilities for repeated independent trials.

Quick guide

How to use the Binomial Distribution Calculator

  1. Enter or choose number of trials (n), success probability (p), number of successes (k), probability.
  2. Select Calculate distribution.
  3. Review the main result, supporting breakdown, and step-by-step calculation notes.
  4. Copy the output or download the generated file when available.

What this tool does

Calculate exact P(X = k), lower-tail cumulative P(X ≤ k), or upper-tail cumulative P(X ≥ k) probabilities for n independent Bernoulli trials with constant success probability p. The tool also reports the distribution’s expected value (mean = np) and standard deviation (σ = √(np(1−p))).

P(X = k) = C(n, k) · pᵏ · (1 − p)ⁿ⁻ᵏ · μ = np · σ = √(np(1 − p))

Calculation method

  1. Validate whole-number trials (0–2,000), whole-number successes k, and probability p within [0, 1].
  2. Compute log-factorials with exact summation so large combinations C(n, k) do not overflow IEEE-754 numbers.
  3. Evaluate the exact point mass or sum across the requested cumulative range (0..k or k..n) and compute mean and standard deviation.

Example: exactly 4 heads in 10 fair coin flips

Input: Trials (n): 10; Success probability (p): 0.5; Successes (k): 4; Mode: Exactly k

Result: 20.5078125% (P(X = 4) = 0.205078125 · mean 5 · σ 1.581139)

There are C(10, 4) = 210 ways to place 4 heads among 10 flips, each with probability 0.5¹⁰ = 1/1024. Multiplying 210 / 1024 yields 0.205078125 (20.51%).

Practical uses

  • Quality-control defect sampling plans
  • A/B testing and conversion probability checks
  • AP Statistics and college probability coursework
  • Reliability modeling for redundant components

Accuracy tips and common mistakes

  • Binomial modeling requires a fixed number of trials n, only two outcomes per trial, independence between trials, and a constant probability p.
  • Use “At least k” to answer questions like “What is the chance of getting 3 or more successes?”
  • Success probability p must be entered as a decimal from 0 to 1 (enter 0.2 for 20%).
Frequently Asked

Binomial Distribution Calculator – Frequently Asked Questions

Common questions, edge-cases, and mathematical explanations.

What is the difference between “At most k” and “At least k”?

“At most k” sums P(X = 0) through P(X = k) inclusive, while “At least k” sums P(X = k) through P(X = n) inclusive. Notice that P(X = k) is included in both.

What happens if I enter k larger than the number of trials n?

Exactly k and at least k return 0% (impossible), while at most k returns 100% because all outcomes 0..n are below k.

Why can this calculator handle up to 2,000 trials without overflowing?

It calculates combinations in log space using log-factorials before exponentiating, avoiding intermediate factorials like 2000! that exceed floating-point limits.

Analytics preferences

Optional Google Analytics cookies help us understand visits and improve our tools. Analytics is off until you allow it. Your tool inputs and files are never included in our analytics events. Read our privacy policy.

Analytics is off.