Binomial test calculator guide
An exact binomial test evaluates a count of successes from a fixed number of independent Bernoulli trials against a hypothesized success probability p₀. It is useful when the outcome is success or failure and the number of trials is known.
This calculator reports P(X ≤ x), P(X ≥ x), and a two-tailed value defined as twice the smaller tail, capped at 1. It is an exact discrete calculation, not a normal approximation or a replacement for a complete study design.
How to use the binomial test calculator
- Enter successes: Enter the observed count x as a non-negative whole number.
- Enter trials: Enter the total count n. Successes cannot exceed trials and this implementation supports up to 1,000 trials.
- Enter p₀: Enter the null-hypothesis success probability between 0 and 1.
- Read the tails: Compare the lower tail, upper tail, and two-tailed result with the significance level chosen for your study.
Formula and variables
The binomial probability mass function gives the probability of exactly k successes in n independent trials when each trial has success probability p₀. Tail probabilities add the relevant masses.
P(X = k) = C(n,k)p₀ᵏ(1 − p₀)ⁿ⁻ᵏ- n — Trials
- Total number of independent Bernoulli trials.
- x — Observed successes
- Number of successes observed in the sample.
- p₀ — Hypothesized probability
- Success probability under the null hypothesis, from 0 to 1.
20 trials with 15 successes
Test x = 15 successes in n = 20 trials against p₀ = 0.5.
- Successes
- 15
- Trials
- 20
- p₀
- 0.5
- Add P(X = k) from k = 0 through 15 for the lower tail.
- Add P(X = k) from k = 15 through 20 for the upper tail.
- Double the smaller tail for the two-tailed convention.
Result: The calculator returns exact discrete tail probabilities for the specified null probability.
A p-value measures compatibility with the null model; it does not measure the probability that the null hypothesis is true.
Understanding your results
Tail probabilities
The lower tail asks how likely x or fewer successes are. The upper tail asks how likely x or more successes are.
Two-tailed result
This implementation uses twice the smaller of the two tails and caps the result at 1. Different exact-test conventions can treat two-sided discrete probabilities differently, so report the convention used.
Assumptions
- Trials are independent.
- Each trial has the same success probability under the null hypothesis.
- Each outcome is classified as success or failure.
- The entered x and n are whole-number counts.
Limitations
- The calculator does not assess independence, sampling design, power, effect size, or practical significance.
- The two-tailed convention is a simple doubled-tail rule and may differ from probability-ordering methods.
- For n above 1,000, use a validated statistical package and an appropriate approximation or exact method.
Common mistakes
- Entering a percentage such as 50 instead of a probability of 0.5.
- Using trials smaller than observed successes.
- Interpreting a p-value as the probability that the null hypothesis is true.
- Choosing one- or two-sided testing after looking at the result.
- Ignoring dependence or changing probabilities between trials.
Practical use cases
Quality and conversion checks
Test whether a binary success rate is compatible with a target probability.
Small-sample inference
Use an exact discrete method when normal-approximation assumptions are weak.
Planning and decision guide
Define the hypothesis before calculating
Set the null probability and decide whether the alternative is lower, higher, or two-sided before inspecting the observed count.
Frequently asked questions
What does a binomial test calculate?
It calculates how compatible an observed number of successes is with a specified success probability across a fixed number of independent trials.
What is p₀?
p₀ is the success probability assumed by the null hypothesis.
When should I use an exact binomial test?
It is especially useful for binary outcomes and small or moderate samples where an exact discrete calculation is preferable to a normal approximation.
What does a small p-value mean?
It means the observed result would be relatively unusual under the entered null model. It does not by itself establish practical importance or causation.
Why can the two-tailed p-value differ between software packages?
Discrete distributions do not have a single universal two-sided tail definition. Packages may use doubled tails or probability-ordering rules.
Sources and review
- Binomial Distribution — NIST/SEMATECH e-Handbook of Statistical Methods. Accessed 2026-08-24.
- Exact tests — Penn State Eberly College of Science. Accessed 2026-08-24.
Reviewed 2026-08-24.