Math calculator

Exact Binomial Test Calculator

Counting outcomes rather than approximating them.

Counting outcomes, not approximating them

Exact p = 0.056888 — not significant. The uncorrected normal approximation gives 0.045500 — significant. Same data, opposite conclusions at the conventional threshold, and the exact test is the one to believe.

60 of 100 — observed 0.60000 against 0.5000

Exact p = 0.056888

82 of the 101 possible outcomes are no more likely than the one observed, and their probabilities sum to that. The normal approximation gives 0.045500 — which lands on the OTHER side of 0.05 from the exact test, on the same data; with a continuity correction, 0.057433. The Clopper-Pearson interval, which inverts this same exact test, is [0.49721, 0.69671].

Exact p

0.056888

82 outcomes summed

Normal approximation

0.045500

disagrees with the exact test

With continuity correction

0.057433

±0.5 before dividing

Clopper-Pearson 95% CI

0.4972 – 0.6967

inverts this exact test

Every outcome under the hypothesis

observed 600.00100

The exact p-value is the total height of every bar no taller than the one at the mark. That rule is what makes the test two-sided without needing the distribution to be symmetric.

Exact and approximate p-values for this result
TestpAt α = 0.05What it assumes
Exact (two-sided)0.056888not significantnothing beyond independence
Exact, one-sided greater0.028444significanta direction chosen in advance
Exact, one-sided less0.982400not significanta direction chosen in advance
Normal approximation0.045500significanta continuous curve through discrete counts
Normal with continuity correction0.057433not significantthe same, half a unit wider

The uncorrected approximation errs in the direction that produces findings — it gives a smaller p-value than the exact test in every preset here. The continuity correction removes almost all of that, and costs nothing.

Exact at every n, with no large-sample rule Two-sided by likelihood, not by doubling Conservative: actual size is below nominal, by design

What this tool shows

Sixty successes in a hundred trials, tested against p = 0.5, gives an exact p of 0.056888 and an uncorrected normal p of 0.045500. One of those clears the conventional threshold and the other does not, from identical data. The exact test is the one to believe, and the continuity correction — which costs nothing — lands at 0.057433 and agrees with it.

  • The exact two-sided p, by summing every outcome no more likely than the observed one
  • Both one-sided exact p-values
  • The normal approximation with and without a continuity correction
  • A Clopper-Pearson interval, which inverts the same exact test
  • The full probability mass function plotted, with the observed count marked
  • How many of the possible outcomes were counted into the two-sided p
Exact at any n Approximations beside it Clopper-Pearson CI Every outcome plotted

The exact test is conservative by construction, not by choice.

Updated 12 September 2026 · Works in any browser, no installation

The exact binomial test asks how probable your result and everything less probable than it would be, if the hypothesised probability were true. It sums actual binomial probabilities rather than reading a normal curve, so it is exact at every sample size — no “np ≥ 5” rule, no approximation, and no large-sample caveat. It is the same logic as Fisher’s exact test applied to one proportion instead of a table.

At a glance

Formula shown
P(X = i) = C(n, i)·p₀ⁱ·(1−p₀)^(n−i). The two-sided p sums P(X = i) over every i whose probability is no greater than the observed P(X = k). That "no more likely than" rule is what makes the test two-sided without assuming symmetry — doubling the smaller tail, which is the other common convention, gives a different and sometimes larger-than-1 answer when p₀ is not ½.
Scenario support
Testing a coin, die or random generator for fairness; a conversion rate against a target; a defect rate against a specification; a diagnostic test’s sensitivity against a claimed value; and any yes/no count small enough that the normal approximation is doubtful.
Educational estimate
Planning support from the values you enter — not professional advice.

The approximation errs toward finding things

A normal curve laid over discrete counts misses in a consistent direction, and the tool’s presets show the size of the miss.

60 of 100 against 0.5: exact 0.056888, normal 0.045500. The approximation is 20% smaller and crosses the conventional threshold. At n = 100 with p₀ = 0.5 the usual rules say the approximation is fine.

8 of 10: exact 0.109375, normal 0.057780. Nearly half. 9 of 10: exact 0.021484, normal 0.011412 — again about half.

Every preset errs the same way. That is not chance: a continuous curve through discrete points systematically assigns less probability to the tail than the discrete distribution actually has.

The continuity correction fixes most of it. 0.057433 against the exact 0.056888 at 60/100; 0.113846 against 0.109375 at 8/10. Subtracting half a unit before dividing costs nothing and removes almost the whole error.

Which makes the uncorrected version hard to defend. The exact test is a few lines of arithmetic on any modern machine, and where it is inconvenient the corrected approximation is right there.

Two-sided by likelihood, not by doubling

There are three conventions for making this test two-sided and they disagree whenever p₀ is not one half. The tool uses the one that generalises.

The method of small p-values sums every outcome whose probability is no greater than the observed one. It needs no symmetry, it is what R’s binom.test uses, and it is what this tool computes.

Doubling the smaller tail is the common alternative and can exceed 1 when p₀ is far from a half, which is a sign it is not really a probability of anything.

The central method takes the smaller tail and its mirror by distance, which needs an arbitrary decision about what “the same distance” means on an asymmetric distribution.

With p₀ = 0.5 all three coincide, because the distribution is symmetric. That is why the disagreement goes unnoticed in coin-flipping examples and appears as soon as a real hypothesis is tested.

The tool prints how many outcomes were counted, which makes the rule visible: 82 of 101 at 60/100, 4 of 11 at 9/10, and all 11 at the fair-die preset where the observed count is the most likely one.

Exact does not mean the size is 5%

This is the property that surprises people who expect “exact” to mean “hits the nominal level”. It means the opposite of anti-conservative, not the same as calibrated.

The binomial distribution is discrete, so p-values come in a finite set. With ten trials there are only eleven possible outcomes and a handful of achievable two-sided p-values.

A test can only reject at achievable thresholds, so the actual rejection rate at a nominal 5% is whichever achievable value sits just below it — usually well below.

At n = 10 and p₀ = 0.5 the actual two-sided size is 2.15%, not 5%, because the next achievable rejection region would take it to 10.9%. The test is correct and under-powered at the same time.

Mid-p variants trade some of the guarantee for calibration, counting half the probability of the observed outcome rather than all of it. They land closer to the nominal level and give up the guarantee of never exceeding it.

The conservatism shrinks with n as the achievable p-values get denser, which is why it matters most for the small samples the exact test exists to handle.

Clopper-Pearson is this test, inverted

The interval the tool prints is not a separate calculation. It is the set of hypothesised probabilities this exact test would not reject.

Which is what makes it and the test always agree. A p₀ outside the interval is rejected; one inside is not. Tests and intervals from different approximations routinely contradict each other, and these cannot.

It inherits the conservatism. A Clopper-Pearson 95% interval covers at least 95% of the time and usually more, which makes it wider than the alternatives.

The Wilson score interval is the usual recommendation instead, because it is much shorter with coverage close to nominal — at the cost of occasionally dipping below it.

Clopper-Pearson is the right choice when under-coverage is unacceptable — regulatory submissions, safety limits — and the wrong one when a needlessly wide interval costs something.

What it still assumes

Dropping the normal approximation removes a distributional assumption and leaves three structural ones that no amount of exactness repairs.

Each trial has the same probability. A conversion rate that drifts over a campaign, or a defect rate that differs between machines, violates this — and the resulting overdispersion makes every p-value too small.

The trials are independent. Clustered data — several measurements per patient, several visits per user — breaks it, and the effective sample size is far below the count.

n was fixed in advance. Stopping when the result looked good makes the sampling distribution something other than binomial, and the exact test is then exactly wrong.

And p₀ was chosen before the data. Testing against a value read off the sample is circular, however exact the arithmetic.

Reporting an exact binomial test

Four things, and the first two make the number reconstructable.

Give k, n and p₀. Three integers and a probability, from which any reader can recompute everything.

Say the test was exact, and which two-sided rule you used. The likelihood rule and tail-doubling give different answers whenever p₀ is not a half.

Give an interval as well as a p-value. Clopper-Pearson if conservatism is wanted, Wilson if length matters — and name which.

And say whether n was fixed in advance. It is the assumption most often broken in practice and the one that invalidates the exactness entirely.

Sources and methodology

References for the exact binomial test and its intervals.

Method. Binomial probabilities are computed in log space through logChoose so that large n does not overflow, and the two-sided p sums every outcome whose probability is no greater than the observed one — with a relative tolerance of 1e-9 so that an outcome exactly as likely as the observed one is included rather than lost to floating point. The Clopper-Pearson limits are found by bisecting the same exact tail sums to 200 iterations, which is what guarantees that the interval and the test can never disagree: the interval IS the set of hypothesised probabilities the test would not reject. The normal approximation is computed both with and without a continuity correction so the direction and size of its error are visible rather than described. Successes outside 0 to n, a non-integer count, and a hypothesised probability outside 0 to 1 all return no result. That engine is verified on every change against 95 assertions. The count and the per-case breakdown are published on the formula verification page.

Related calculators

Where this goes next:

Wilson Score IntervalWilson, Wald, Agresti-Coull and Clopper-Pearson on one set of counts, with the EXACT coverage each delivers at your sample size — a "95%" Wald interval covers the truth 80.85% of the time at n = 30, p = 0.1.
One-Proportion Z-TestThe score z-test with the exact binomial test beside it: 60 of 100 against 0.5 gives p = 0.0455 by one and 0.0569 by the other — opposite verdicts at the conventional threshold, on identical data.
Fisher's Exact TestThe exact p for a 2×2 table under all three two-sided conventions, because they disagree — 0.0406 against 0.0699 on the built-in table, across the 5% line — plus the test's actual size by enumeration, which is 2.30% at a nominal 5%.
Binomial DistributionExact binomial probabilities at any n — including thousands, where a factorial overflows — with the normal approximation beside them and its error measured, which is 0.6% at the centre and 261% in the tail.
ProportionSolve a : b = c : d for whichever term you leave blank, with cross multiplication derived rather than asserted — or fill all four and have it checked.
Sign TestThe exact binomial sign test with the paired t-test on the same numbers beside it, and every difference listed next to the sign it was reduced to — so the cost of discarding the magnitudes is visible.

More in Math, or browse all calculators.

Educational use disclaimer

An educational tool. The exact test is conservative rather than calibrated — because the binomial is discrete, the achieved size at a nominal 5% is often well below it, which is a loss of power rather than a loss of validity. Its exactness also depends on the sample size having been fixed in advance and on the trials being independent with a constant probability.

How we calculate · Found an error? email us

Authorship & verification

Written and maintained by , a business operator who builds spreadsheet-based calculators.

What's changed (5 updates)

Published 12 September 2026

  1. Published an exact binomial test that sums the probability of every outcome no more likely than the observed one, which is what makes it two-sided without assuming symmetry.
  2. Shipped a decision-changing example: 60 successes in 100 against p = 0.5 gives an exact p of 0.056888 and an uncorrected normal p of 0.045500. One clears the conventional threshold and the other does not, from identical data at a sample size where the usual rules say the approximation is fine. The continuity correction lands at 0.057433 and agrees with the exact test.
  3. Showed the approximation erring in the same direction in every preset — 0.057780 against an exact 0.109375 at 8 of 10, 0.011412 against 0.021484 at 9 of 10 — because a continuous curve through discrete counts systematically under-weights the tail.
  4. Explained that exact does not mean calibrated: at n = 10 and p₀ = 0.5 the actual two-sided size at a nominal 5% is 2.1484%, because the next achievable rejection region would take it to 10.9375%.
  5. Computed the Clopper-Pearson interval by bisecting the same exact tail sums, which is what guarantees the test and the interval can never disagree — verified across five (k, n) pairs by probing just inside and just outside each limit.

Add this calculator to your site

Responsive embed — and private: nothing your visitors type leaves their browser.