Interactive module guide

Exact Binomial Test Calculator — Free & Precise

This exact binomial test calculator gives true tail-probability p-values and a Clopper–Pearson interval for one proportion, with no large-sample approximation.

Open calculator

Free · No sign-up · Calculations stay in your browser

The exact binomial test evaluates one proportion using the binomial distribution itself rather than a normal approximation.

One-sided p-values are true tail sums, and the two-sided p-value adds the probability of every outcome no more likely than the observed one, the same convention used by standard statistical software.

This calculator also reports the Clopper–Pearson exact confidence interval and Cohen’s h, making it the reference method when counts are small.

Use the exact binomial test calculator when counts are small or an exact p-value is required; the Clopper–Pearson interval reports guaranteed coverage.

When to use this exact binomial test calculator

Use it when

  • Use it whenever the normal-approximation conditions for a proportion fail: few trials, a benchmark near 0 or 1, or expected counts below about ten. The exact test is valid at any sample size, so it is also a sound default when in doubt.
  • It suits high-stakes small samples, such as safety events in a pilot study, defects in a small audited lot, or successes in an expensive prototype run, where each additional observation is costly and approximation error is unacceptable.
  • Choose it when a regulator, reviewer, or protocol asks for an exact p-value or an exact interval, since Clopper–Pearson coverage is guaranteed to be at least the nominal level for every n and p.

Choose another method when

  • Do not use it when the outcomes are not independent Bernoulli trials with a constant success probability; exactness fixes the approximation problem, not a broken sampling design.
  • It answers questions about one proportion only. Comparing two observed groups needs the two-proportion z-test or Fisher’s exact test, and multi-category counts need a goodness-of-fit method.
  • For very large samples with a mid-range benchmark, the z test gives essentially identical answers with simpler arithmetic; exactness buys nothing there, though it never hurts.

Interactive tool

The calculator loads as you approach this section so the guide remains fast on mobile connections.

Example preview

Small pilot run of twenty trials

Inputs
x=7 successes in n=20 trials against p₀=0.5; two-sided exact test.
Representative result
Exact p≈0.2632 and the 95% Clopper–Pearson interval spans ≈ [0.154, 0.592].

Illustrative only. Load the interactive tool to enter your own values and review assumptions.

Watch the explanation

4:42 min

The player loads only after you press play. You can also watch on YouTube.

Read the complete transcript

The Exact Binomial Test. Seven successes in twenty trials looks below a fifty percent benchmark. The exact binomial test asks how surprising that count is without a normal approximation. Record x successes and a fixed total n, then keep the benchmark p-zero separate from the observed proportion p-hat equals x over n. Under the null, the complete count X follows a binomial distribution. Every possible integer from zero through n receives an exact probability. For count k, multiply the combination count by p-zero to the k and one minus p-zero to the n minus k. A left-tailed test adds probabilities from zero through x. A right-tailed test adds probabilities from x through n, including the observation. For a two-sided test, Distri Scope adds every outcome no more probable than the observed count under the null, wherever it lies. Compare that tail-specific exact p-value with alpha. Reject when p is at most alpha; otherwise fail to reject without proving the benchmark true.

Exact arithmetic still needs independent binary trials, one stable success probability, a consistent success definition, and a sample representing the intended population. Fix n before observing outcomes. Stopping when the running result looks favorable changes the sampling process and invalidates the ordinary fixed-n test. Exact means no large-sample approximation. It does not mean assumption-free, and it cannot repair dependence, changing probabilities, or biased collection. Because X has only n plus one possible values, attainable p-values move in jumps. A tiny sample cannot provide smoothly adjustable evidence. Do not always double the smaller tail. That shortcut can disagree with probability-ranked two-sided testing when the null distribution is asymmetric. The reported interval is the equal-tailed Clopper Pearson interval. It is exact and conservative, but it is a different construction from the minimum-likelihood two-sided p-value. Cohen's h summarizes observed minus benchmark magnitude. Two observed groups need a two-sample method, while paired binary outcomes need a paired method.

Suppose a pilot fixes twenty independent trials, observes seven successes, and tests p-zero equals zero point five, two-sided, at alpha point zero five. The observed proportion is seven over twenty, or zero point three five: fifteen percentage points below the benchmark, before any inference. Under a fair benchmark, the probability of exactly seven successes is about zero point zero seven three nine. That single bar anchors the two-sided ranking. The inclusive left tail through seven totals about zero point one three one six. The opposite inclusive tail is much larger. Probability ranking selects counts zero through seven and thirteen through twenty. Their exact null masses sum to zero point two six three two. That p-value exceeds zero point zero five, so fail to reject. Seven successes are compatible with a fifty percent process, not proof of it. The ninety-five percent Clopper Pearson interval runs from about zero point one five four to zero point five nine two. Cohen's h is minus zero point three zero five.

Clopper Pearson coverage is at least the stated level, so the interval is often wider than an approximation. The width honestly reflects limited information. Edge counts remain valid. With zero successes the lower endpoint is zero; with all successes the upper endpoint is one. Validate whole counts with zero at most x at most n, require n from one through ten thousand, and keep p-zero strictly between zero and one. Choose the success label, benchmark, alternative, and alpha before inspection. Redefining success or switching the tail afterward changes the promised error rate. Clusters, repeated observations, changing probabilities, and sequential monitoring need design-aware methods. Exact tail summation alone does not protect against them. Report x, n, p-hat, p-zero, alternative, alpha, the two-sided convention, exact p-value, Clopper Pearson interval, effect size, and precise conclusion. Test one small-sample proportion, inspect every exact tail, and report the uncertainty free at Distri Scope dot com.

How to read the result

The results panel shows the observed counts rather than a z or t statistic, because the inference comes directly from tail probabilities of the count distribution; no asymptotic curve is drawn.

Read the exact p-value with the discreteness in mind: it can never be smaller than the probability of the observed outcome itself, and reported values often jump between attainable levels rather than varying smoothly.

How to use the exact binomial test calculator

Enter successes x and trials n as whole counts, with n fixed by the design before the outcomes were observed. Stopping early when results look good breaks the binomial model.

Enter the benchmark p₀ strictly between 0 and 1. Because the binomial distribution is discrete, only certain p-values are attainable; with n = 5 nothing can be significant at α = 0.01, so plan n with the discreteness in mind.

Select the tail from the question. The left-tailed p-value is P(X ≤ x), the right-tailed is P(X ≥ x), and the two-sided value is generally not simply double the smaller tail because the binomial distribution is asymmetric unless p₀ = 0.5.

Formula, hypotheses, and assumptions

P(X=k)=(nk)p0k(1p0)nkP(X = k) = \binom{n}{k} p_0^{k} (1-p_0)^{n-k}

Conditions to review

  • Observations are independent Bernoulli trials with a constant success probability
  • The number of trials n is fixed before observing the outcomes
  • No large-sample approximation is required; the test is exact for any n

Calculator parameters

  • Number of Successes (x): default 7.
  • Number of Trials (n): default 20.
  • Hypothesized Proportion (p₀): default 0.5.
  • Significance Level (α): default 0.05.
  • Test Type: default Two-tailed.

What the method is doing

The two-sided p-value uses the minimum-likelihood rule: every outcome whose null probability does not exceed the observed outcome’s probability contributes. This matches the default behaviour of R’s binom.test and scipy and treats the two tails by probability rather than by distance from the mean.

The Clopper–Pearson interval inverts exact binomial tests through beta quantiles: the 95% version collects every p₀ that a two-tailed exact test at α = 0.05 would not reject. Its guaranteed coverage makes it conservative, so it runs somewhat wider than approximate intervals.

Worked example: seven successes in twenty trials

A pilot process is claimed to succeed half the time. A fixed run of n = 20 independent trials yields x = 7 successes, so p̂ = 0.35. The plan is a two-sided exact test at α = 0.05 against p₀ = 0.5.

  1. 1Enter x = 7, n = 20, and p₀ = 0.5 with the two-sided alternative. The calculator sums the probability of every count whose null probability does not exceed that of 7, giving an exact p ≈ 0.2632.
  2. 2Compare tails for intuition: the left tail alone, P(X ≤ 7), is ≈ 0.1316, and because p₀ = 0.5 makes the distribution symmetric the two-sided value here is exactly twice that; with an off-center p₀ the two tails would not match.
  3. 3Read the 95% Clopper–Pearson interval, approximately 0.154 to 0.592. Every benchmark inside that range, including 0.5, would survive the exact test at the 5% level.

Interpretation

Seven successes in twenty trials is unremarkable under a 50% success rate: results at least this extreme occur about a quarter of the time. The wide exact interval is the honest headline, showing the pilot cannot distinguish a 20% process from a 55% one. The exact machinery guarantees these statements hold precisely at n = 20 rather than approximately.

Common mistakes

  • Doubling a one-sided exact p-value to get the two-sided answer is generally wrong for asymmetric distributions; the minimum-likelihood sum is the convention this tool and mainstream software use.
  • Treating the exact test as assumption-free is a mistake: independence and a constant success probability are still required, and no p-value can verify them.
  • Comparing the exact interval with a Wald interval from another tool invites confusion; the exact interval is wider by design because its coverage never dips below the nominal level.

Limits and independent validation

The calculator supports up to 10,000 trials and reports the mid-p-free classical test only; mid-p corrections, power calculations, and sequential designs are out of scope.

With very small n, attainable significance levels are coarse, and no method can manufacture precision the design did not collect; the interval width is the honest measure of that.

Before using the result

  • Confirm the design: n fixed in advance, independent trials, one constant success probability, and a benchmark chosen before inspecting the outcomes.
  • Cross-check the p-value against R’s binom.test or scipy’s binomtest with the same inputs, and record x, n, p₀, the tail, and α so the exact computation can be reproduced.

See every option in the Statistical Hypothesis Test Calculator or review the DistriScope methodology. Educational information; last reviewed 2026-08-09. Verify consequential calculations independently.