Binomial Probability Calculator

P(X = k)
Next

Given n independent Bernoulli trials with success probability p, the binomial distribution tells you how often you’ll see exactly k successes. The calculator returns the exact probability P(X = k) plus the tails P(X < k), P(X ≤ k), P(X ≥ k) and P(X > k) in one shot, using log-space arithmetic so the results stay accurate across the full range up to n = 1,000.

How to calculate binomial probability

  1. 1

    Enter n (number of trials)

    Must be a non-negative integer. Typical values: 10 coin flips, 100 A/B test visitors, 1,000 manufacturing samples.

  2. 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. 3

    Enter k (target number of successes)

    An integer from 0 to n.

  4. 4

    Read the probabilities

    The five probabilities: exact P(X = k), less than P(X < k), at most P(X ≤ k), at least P(X ≥ k) and more than P(X > k).

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 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:

  1. Fixed number of trials (n is decided in advance).
  2. Each trial is independent of the others.
  3. Only two outcomes per trial (success / failure).
  4. 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. Keep this rule as a cross-check for large n, since the calculator always returns exact values.

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 1,000 in the guided steps, which is stable thanks to the log-space computation and covers typical coin-flip, survey and A/B test cases. 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