Skip to main content
Calnex LogoCalnex
Statistics

Binomial Distribution Calculator

Computes exact, cumulative and tail binomial probabilities plus mean and standard deviation for n independent trials with a fixed success probability p.

P(X = 5)0.246094 View results

Real-time Results

P(X = 5)
0.246094
P(X ≤ 5)
0.623047
P(X ≥ 5)
0.623047
Mean (μ)
5.0000
Standard Deviation (σ)
1.5811

How it works

Use this page to get the probability of exactly k successes, at most k successes and at least k successes in n independent trials with single-trial success probability p. It also reports the distribution mean and standard deviation, with probabilities shown to six decimals and the mean and standard deviation to four.

What happens if k is larger than n or p is outside 0 to 1?

The combination term returns 0 when k is below 0 or above n, so P(X = k) becomes 0 and the cumulative sums behave accordingly. The probability field is declared with a 0 to 1 range, but the engine itself does not clamp or reject values; a p outside that range produces mathematically meaningless results rather than an error message.

Why do P(X ≤ k) and P(X ≥ k) sometimes look identical?

The two tails are computed separately: P(X ≤ k) sums terms from 0 to k, while P(X ≥ k) is 1 minus the sum from 0 to k−1. They coincide only when the single term P(X = k) is small enough to vanish at six decimals, as with the default n=10, p=0.5, k=5 case where both show 0.623047. Do not read that coincidence as a symmetric distribution.

Are the trials and successes values rounded or truncated?

Both n and k are parsed as integers by flooring, so 7.9 trials is treated as 7. The probability p is parsed as a floating-point number without rounding. The engine uses a recursive factorial, so large n is impractical; the declared input maximum of 100 is not enforced by the engine itself.

Examples and interpretation(2)

What is the chance of exactly two successes in four trials at p = 0.25?

Number of Trials (n)
4
Success Probability (p)
0.25
Target Successes (k)
2
  1. Set trials n = 4, probability p = 0.25 and target successes k = 2.
  2. Compute C(4,2) = 6, then 6 × 0.25² × 0.75² = 0.2109375, shown as 0.210938.
  3. Sum the terms for 0, 1 and 2 successes to get P(X ≤ 2) = 0.949219.
P(X = 5)
0.210938
P(X ≤ 5)
0.949219

About 21 percent of runs give exactly two successes, and about 95 percent give two or fewer. The six-decimal display rounds the true value, so small differences between near-equal outputs are display artifacts.

What are the tail probability and spread for ten fair trials with at least five successes?

Number of Trials (n)
10
Success Probability (p)
0.5
Target Successes (k)
5
  1. Keep the defaults n = 10, p = 0.5 and k = 5.
  2. P(X ≥ 5) = 1 − P(X ≤ 4) = 1 − 0.376953125 = 0.623047.
  3. Mean = 10 × 0.5 = 5.0000 and σ = √(10 × 0.5 × 0.5) = 1.5811.
P(X ≥ 5)
0.623047
Mean (μ)
5.0000
Standard Deviation (σ)
1.5811

At least five successes occurs in roughly 62 percent of runs. The mean and standard deviation describe the distribution, not a guarantee for any single run of ten trials.

Formula

P(X = k) = C(n,k) × p^k × (1−p)^(n−k); P(X ≤ k) = Σ_{i=0}^{k} P(X = i); P(X ≥ k) = 1 − P(X ≤ k−1); μ = n × p; σ = √(n × p × (1−p))

How to use

  1. Enter the number of independent trials n as a whole number between 1 and 100.
  2. Enter the single-trial success probability p as a decimal between 0 and 1, for example 0.25 for 25 percent.
  3. Enter the target number of successes k as a whole number; it is floored if a decimal is typed.
  4. Read P(X = k), P(X ≤ k) and P(X ≥ k) to six decimals, and the mean and standard deviation to four decimals.
  5. Check that k is not larger than n: P(X = k) and P(X ≤ k) then behave as zero, but P(X ≥ k) is computed as 1 − P(X ≤ k−1) and is not necessarily zero.

Frequently asked questions

Does the calculator show the variance as a separate result?

No. Variance n × p × (1−p) appears only in the formula text; the result cards show the exact probability, the two cumulative probabilities, the mean and the standard deviation.

Can I enter a percentage such as 25 instead of 0.25?

The field expects a probability between 0 and 1, so enter 0.25. Entering 25 is not converted and yields invalid probabilities because the engine does not rescale or reject out-of-range values.

Why is P(X ≥ k) not simply 1 minus P(X ≤ k)?

Because P(X ≤ k) includes the term for exactly k successes. The engine subtracts the cumulative sum only up to k−1, so the two tails overlap at the single point k.

Complementary Tools

Back to StatisticsAll Calculators