Roboculator
Online CalculatorsCategoriesDate & EventsNews
Get Started
Online CalculatorsCategoriesDate & EventsNewsGet Started
Roboculator

Smart calculators for every challenge. Free, fast, and private.

Categories

  • Finance
  • Health
  • Math
  • Construction
  • Conversion
  • Everyday Life

Popular Tools

  • Date & Events
  • Loan Calculator
  • BMI Calculator
  • Percentage Calc
  • Latest News
  • Search All

Resources

  • Glossary
  • Topic Tags
  • News & Insights

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  • Editorial Policy
  • Disclaimer
© 2026 Roboculator. All rights reserved.
Roboculator

roboculator.com

  1. Home
  2. /Math
  3. /Probability Distributions
  4. /Binomial Distribution Calculator

Binomial Distribution Calculator

Last updated: April 5, 2026

The Binomial Distribution Calculator (Math) derives the PMF from first principles, computes the moment generating function, all statistical moments, and proves the Poisson and normal limit theorems. For probability theory and mathematical statistics coursework requiring full analytical derivations.

Calculator

Results

P(X = k)

—

Mean

5

Variance

2.5

Standard Deviation

1.581139

Combinations C(n,k)

—

Expected Successes

5

Results

P(X = k)

—

Mean

5

Variance

2.5

Standard Deviation

1.581139

Combinations C(n,k)

—

Expected Successes

5

In This Guide

  1. 01The PMF: Combinatorial Derivation
  2. 02Moment Generating Function and Moments
  3. 03Limit Theorems: Poisson and Normal Approximations
  4. 04Sums and Convolution of Binomial Variables

The binomial distribution is one of the most mathematically tractable discrete distributions, with closed-form expressions for all moments, a simple generating function, and well-characterized limit theorems. The binomial distribution calculator for mathematics courses provides both the numerical results and the mathematical machinery behind them.

The PMF: Combinatorial Derivation

The binomial PMF follows from first principles. Consider n independent Bernoulli trials, each with success probability p. A specific sequence of k successes and (n−k) failures has probability p^k × (1−p)^(n−k). The number of such sequences is the binomial coefficient C(n,k) = n! / (k!(n−k)!). Therefore:

P(X = k) = C(n,k) × p^k × (1−p)^(n−k), for k = 0, 1, ..., n

Verification that probabilities sum to 1: sum over all k of C(n,k) × p^k × (1−p)^(n−k) = (p + (1−p))^n = 1^n = 1, by the binomial theorem — the reason this distribution carries the name "binomial." Use this online calculator for any parameters. The applied binomial calculator covers practical applications.

Moment Generating Function and Moments

The moment generating function (MGF) of Binomial(n, p):

M_X(t) = E[e^(tX)] = (1 − p + p × e^t)^n = (q + p × e^t)^n where q = 1−p

All moments are derived by differentiating the MGF:

  • Mean: E[X] = M'(0) = n × p
  • E[X²] = M''(0) = n × p × (1 − p) + (np)² = npq + n²p²
  • Variance: Var(X) = E[X²] − (E[X])² = npq = n × p × (1−p)
  • Skewness: (1 − 2p) / √(npq)
  • Excess kurtosis: (1 − 6pq) / (npq)

The probability generating function G_X(z) = (q + pz)^n is equally useful for computing factorial moments.

Limit Theorems: Poisson and Normal Approximations

Two fundamental limit theorems characterize the binomial's large-n behavior:

  • Poisson limit (Law of Rare Events): as n → ∞ and p → 0 with np = λ constant: Binomial(n,p) → Poisson(λ). Proof: C(n,k) × p^k × (1−p)^(n−k) → λ^k × e^(−λ) / k! as n→∞. Applicable when n ≥ 20 and p ≤ 0.05.
  • Normal approximation (Central Limit Theorem): as n → ∞ with p fixed, (X − np)/√(npq) → N(0,1) in distribution. The de Moivre-Laplace theorem proves this for the binomial specifically; CLT generalizes it to all finite-variance distributions. Practically valid when np ≥ 5 and nq ≥ 5.

The normal distribution calculator and probability distribution calculators cover these limiting distributions.

Sums and Convolution of Binomial Variables

If X ~ Binomial(n, p) and Y ~ Binomial(m, p) independently, then X + Y ~ Binomial(n+m, p). This reproductive property follows from the MGF: M_{X+Y}(t) = M_X(t) × M_Y(t) = (q+pe^t)^n × (q+pe^t)^m = (q+pe^t)^(n+m). The condition that both have the same p is essential — sums of binomials with different p values do not follow a binomial distribution. This convolution property makes the binomial distribution useful for combining independent identical experiments: if 5 batches of 100 items each have defect probability 0.03, the total defects across all batches follows Binomial(500, 0.03).

Visual Analysis

How It Works

Enter n (number of trials), p (success probability per trial, between 0 and 1), and k (number of successes of interest). The PMF is computed as C(n,k) × p^k × (1-p)^(n-k) using the log-gamma function for numerical stability with large n. The CDF sums PMF values from 0 to k. Moments are computed analytically from the closed-form formulas.

Understanding Your Results

P(X = k) is the exact probability of getting exactly k successes. The mean tells you the expected number of successes. The standard deviation indicates how much the actual count typically deviates from the mean. C(n,k) shows how many different arrangements of k successes among n trials are possible.

Worked Examples

Fair coin: 10 flips, P(exactly 5 heads)

Inputs

n10
p0.5
k5

Results

probability0.24609375
mean5
variance2.5
stdDev1.5811
cnk252

C(10,5) = 252. P(X=5) = 252 × 0.5¹⁰ ≈ 24.6%. Even with a fair coin, getting exactly 5 heads has only about 1 in 4 chance.

Quality control: 20 items, 5% defect rate, P(exactly 2 defective)

Inputs

n20
p0.05
k2

Results

probability0.1886768
mean1
variance0.95
stdDev0.9747
cnk190

With 20 items and 5% defect rate, P(exactly 2 defective) ≈ 18.9%. The expected number of defects is just 1.

Frequently Asked Questions

The binomial distribution Binomial(n, p) models the total number of successes in n independent Bernoulli trials, each with success probability p. A Bernoulli trial has exactly two outcomes: success (with probability p) or failure (with probability 1−p). The binomial PMF P(X=k) = C(n,k) × p^k × (1-p)^(n-k) gives the probability of exactly k successes. The name 'binomial' comes from the binomial theorem: summing P(X=k) over all k equals (p + (1-p))^n = 1, confirming the probabilities are properly normalized. Binomial models any fixed number of independent identical binary trials.
The binomial coefficient C(n,k) = n! / (k!(n−k)!) counts the number of ways to choose k items from n without replacement and without regard to order. Key identities: C(n,0) = C(n,n) = 1; C(n,1) = C(n,n−1) = n; C(n,k) = C(n,n−k) (symmetry). Pascal's triangle recurrence: C(n,k) = C(n-1,k-1) + C(n-1,k). For large n, direct factorial computation causes overflow; use the log-gamma function: log C(n,k) = lgamma(n+1) − lgamma(k+1) − lgamma(n-k+1), then exponentiate. Available in all scientific libraries: scipy.special.comb(n,k) in Python, choose(n,k) in R.
The de Moivre-Laplace theorem states that as n→∞ with p fixed, the standardized binomial (X − np)/√(npq) converges in distribution to N(0,1). In practice, the normal approximation is accurate when both np ≥ 5 and n(1-p) ≥ 5. With continuity correction (approximating P(X ≤ k) by P(Z ≤ (k+0.5−np)/√(npq))), the approximation improves significantly for moderate n. For p = 0.5, convergence to normality is fastest; for p close to 0 or 1, the distribution remains asymmetric for larger n. The Poisson approximation works better than the normal for small p with large n.
When p=0: P(X=0) = C(n,0) × 0⁰ × 1^n = 1; all other probabilities are 0. The distribution is degenerate at X=0 — success is impossible, so X is always 0. When p=1: P(X=n) = C(n,n) × 1^n × 0⁰ = 1; all other probabilities are 0. The distribution is degenerate at X=n — success is certain every trial, so X always equals n. Note the mathematical convention 0⁰ = 1 is used here, which is the standard in probability and combinatorics. The variance is 0 for both degenerate cases (σ² = np(1−p) = 0 when p=0 or p=1), consistent with the lack of randomness.
For fixed n, the variance σ² = np(1−p) is maximized when p = 0.5. Taking the derivative with respect to p: d/dp[np(1−p)] = n(1−2p) = 0 at p = 0.5. Maximum variance = n × 0.5 × 0.5 = n/4. This means a binomial with n = 100 trials has maximum possible variance of 25 (standard deviation 5) when p = 0.5. For any other p, the variance is lower — this is why balanced binary outcomes (p = 0.5) produce the most spread and unpredictability in outcome counts. This result is used in sample size calculations for surveys: if the true proportion p is unknown, the conservative choice p = 0.5 gives the largest required sample size, ensuring adequate statistical power regardless of the actual proportion.
The binomial counts successes in a fixed number of trials n. The negative binomial counts the number of trials needed to achieve a fixed number of successes r. If X ~ NegBin(r, p), then P(X=n) = C(n-1, r-1) × p^r × (1−p)^(n−r) — the probability that the r-th success occurs on the n-th trial. The negative binomial is to the binomial as the negative hypergeometric is to the hypergeometric: one fixes trials and counts successes; the other fixes successes and counts trials. The geometric distribution (r=1 negative binomial) models the waiting time to the first success: P(X=n) = (1-p)^(n-1) × p — the number of trials until the first success.

Sources & Methodology

Feller, W. (1968). An Introduction to Probability Theory and Its Applications, Vol. 1, 3rd ed. Wiley. Ross, S.M. (2019). Introduction to Probability Models, 12th ed. Academic Press. De Moivre, A. (1738). The Doctrine of Chances.

How helpful was this calculator?

Be the first to rate!

Related Calculators

Interpolation Calculator

Functional Programming & Advanced Math Calculators

Polynomial Equation Solver

Scientific & Engineering Programming Calculators

Matrix Calculator

Scientific & Engineering Programming Calculators

Complex Number Addition Calculator

Complex Number Calculators

Midpoint Calculator

Coordinate Geometry Calculators