Enter a count and a sample size and get four intervals at once: Wilson, Agresti-Coull, Jeffreys and the exact Clopper-Pearson. Wilson is the default and the one to report. Wald — the textbook p̂ ± z·√(p̂(1−p̂)/n) — is deliberately not offered, for reasons the method section sets out. The sample-size tab works backwards from the interval width you can live with.
How precise the answer has to be: the distance from the estimate to either end of the interval. Decide it by asking what width would let you act — precision is quadratic, so halving the half-width roughly quadruples the sample, and discovering that after sampling is the expensive order to discover it in.
On the rate's own scale: 0.03 is ±3 points.
Roughly where you expect the rate to land. The interval is widest at 50%, so 0.5 is the conservative choice when you genuinely do not know — and a rate near either end needs far less data, which is worth exploiting when you have a decent prior.
A proportion, so 0.075 is 7.5%. Use 0.5 if you have no idea.
Sets the confidence level, 1 − α: 0.05 gives a 95% interval, 0.01 a 99% one. There is no hypothesis being tested here, so this is not a false-positive rate — it is how often intervals built this way contain the true rate.
0.05 gives a 95% interval.
Sample size for a target precision
Observations
302
Half-width achieved±3.00%, from the Wilson interval at that n.
0.03000
Wald formula would sayThe textbook answer, shown only for comparison.
297
Expected proportion used
7.50%
Sample 302 and the 95% Wilson interval around a rate near 7.50% will be about ±3.00% wide. That comes from the interval this page actually reports rather than from the textbook Wald formula, which is the inverse of an interval not offered here and which collapses to nonsense at the ends of the scale. Precision is quadratic: halving the half-width roughly quadruples the sample, so decide what width would let you act before you sample rather than discovering afterwards that the audit was too small.
The textbook Wald formula asks for 297 and would under-deliver at this precision; the number above is what the Wilson interval actually needs.
Drag the dashed line — or focus it and use the arrow keys — to change target half-width.
Show these numbers as a table
Required observations against target half-width
Target half-width
Required observations
0.5%
10,667
1.7%
951
2.9%
332
4.0%
170
5.2%
104
6.4%
71
7.6%
52
8.8%
40
9.9%
31
11.1%
26
How many of the sampled units had the outcome, as a whole count. Zero is a legitimate answer and all four intervals below still have width at it — which is exactly where the textbook Wald formula collapses to a single point.
How many units you sampled in total. Whatever the width that comes back, it covers sampling error alone — never a survey that reached the wrong people, and never a sample that was not random to begin with.
The confidence level is 1 − α, so 0.05 gives the 95% intervals below and 0.01 the 99% ones. It is not a false-positive rate here — no hypothesis is being tested — but the coverage these intervals aim for.
0.05 gives 95% intervals.
Four 95% intervals on one proportion
Wilson2.6% to 19.9% — the default. Report this one.
[0.0258, 0.1986]
Agresti–CoullWald arithmetic after adding roughly two successes and two failures.
[0.0188, 0.2057]
JeffreysBayesian, usually the narrowest, best average coverage.
[0.0216, 0.1868]
Clopper–PearsonExact and guaranteed, therefore the widest.
[0.0157, 0.2039]
Observed proportion
7.50%
Report the Wilson interval: at 7.50% observed, the rate is somewhere between 2.6% and 19.9% with 95% confidence. It is the default here because its coverage stays close to nominal across the whole range, it never leaves [0, 1], and it still has width when every observation falls the same way. The other three are shown so the choice is visible rather than hidden: Clopper–Pearson buys a guarantee of at least 95% coverage and pays 0.015 of extra width for it, Jeffreys is the narrowest, Agresti–Coull is the one you can do on a whiteboard. The Wald interval — p̂ ± z·√(p̂(1−p̂)/n) — is deliberately not among them: near 0 or 1 its real coverage falls far below the nominal level, it produces bounds outside [0, 1], and at zero events it returns a single point of zero width. If the number you arrived with came from a tool offering only Wald, recompute it before quoting it. And whatever the width, it covers sampling error alone — never a survey that reached the wrong people.
Every row is the same observed rate; only the method differs.
Show these numbers as a table
The four intervals, on one axis
Rate
Estimate
Interval
Wilson
7.5%
2.6% to 19.9%
Agresti–Coull
7.5%
1.9% to 20.6%
Jeffreys
7.5%
2.2% to 18.7%
Clopper–Pearson
7.5%
1.6% to 20.4%
When to use it
Use this whenever you have one rate and want to say how precisely you know it. A conversion rate from last month, an error rate from a sample audit, a satisfaction score from a survey, a model's precision on a held-out set — each is a point estimate of something you did not measure exhaustively, and an interval is the only honest way to present it. The commonest use is the least glamorous: attaching a range to a number already sitting in a deck as if it were exact.
This is an estimation tool, not a comparison tool. To know whether two rates differ, the A/B test calculator gives an interval on the difference, which is the quantity you actually care about — and checking whether two separate intervals overlap is a bad substitute. If you are comparing a rate to a fixed target rather than to another sample, the one-proportion z-test tests it directly, and the Wilson interval it reports is the same one you get here.
For small tables of counts rather than a single rate, Fisher's exact test is the comparison; for more than two categories, the chi-square test. And if you need not a bound but confidence that a rate has not got worse — after a migration, a vendor switch, a refactor — that is a non-inferiority question, which nominates the margin in advance rather than eyeballing an interval afterwards.
Assumptions
An interval is only as good as the sample under it, and every method here shares the same two requirements.
The sample is random with respect to the outcome. This is the assumption that fails, and it fails silently. Reviews from customers who chose to leave one, sessions captured only when analytics loaded, tickets audited because they were escalated — each gives a narrow, precise, wrong interval. A bigger sample makes a biased estimate more confidently wrong rather than less.
Observations are independent. If 200 sessions come from 40 users, the effective sample size is closer to 40 and the interval is too narrow. Aggregate to the independent unit first.
The rate is stable over the window you sampled. Pooling across a quarter in which the product changed twice gives an interval around an average nobody experienced.
There is no normality assumption to check. Wilson, Jeffreys and Clopper-Pearson do not rely on the sampling distribution being normal — Clopper-Pearson is built from the binomial directly, and Wilson's coverage stays near nominal at small n and extreme rates. That is precisely what Wald lacks.
Finite populations are the one adjustment not made here. Sample 400 of 1,000 accounts and these intervals are conservative; a correction of √((N−n)/(N−1)) would narrow them.
How the calculation works
Four methods are shown together because the choice matters most exactly where a single number would mislead most — small samples and rates near 0 or 1. Our recommendation is Wilson, and it is not a close call. What is not offered is the Wald interval, p̂ ± z·√(p̂(1−p̂)/n), the one every introductory course teaches: its real coverage at 95% nominal can fall below 80% near the boundaries, it does not improve smoothly with n, it produces bounds outside [0, 1] whenever the rate is low and the sample modest, and at zero events it collapses to the single point 0 with zero width — perfect certainty from no evidence. An interval from a tool offering only Wald should be recomputed before it is quoted. To compare two rates rather than bound one, use the difference interval in [the A/B test calculator](/calculators/ab-test-sample-size) rather than putting two of these side by side.
The inversion of the score test: the rates that would not be rejected at level α. Always inside [0, 1], never zero-width, coverage close to nominal across the whole range. The centre is pulled slightly towards 0.5, which is the correction, not an artefact.
Wald arithmetic after adding roughly two successes and two failures — the "add 2 to each" rule at the 95% level. Slightly wider than Wilson and far easier to explain to a sceptical audience, which is a real advantage in a report.
Jeffreys
( Beta⁻¹(α/2; x + ½, n − x + ½), Beta⁻¹(1 − α/2; x + ½, n − x + ½) )
The Bayesian credible interval under the non-informative Jeffreys prior, which happens to have very good frequentist coverage on average. Usually the narrowest of the four, and its coverage oscillates rather than sitting above nominal — a good default across many estimates, a poor one when a single interval must be guaranteed.
Clopper-Pearson (exact)
( Beta⁻¹(α/2; x, n − x + 1), Beta⁻¹(1 − α/2; x + 1, n − x) )
Guaranteed to cover at least 95% of the time, achieved by covering rather more than that most of the time, and the widest of the four. Use it when the guarantee is contractual or regulatory, not as a default: the extra width is real cost.
Sample size for a target half-width
n ≈ z² · p(1−p) / d², worst case n ≈ z²/(4d²) at p = 0.5
Half-width d, using a planning value for p. The worst case is p = 0.5, so ±3 points at 95% needs about 1,068 observations whatever the rate turns out to be. Grounds to expect a low rate cut the cost sharply — at 7.5%, ±3 points needs 302 by the Wilson half-width the calculator solves, against 297 by the older Wald formula.
Worked example
You audit a random sample of 40 support tickets from last month and find 3 went to the wrong team. The observed misrouting rate is 7.5%, and the question is whether the process is under the 10% threshold written into the client's operating agreement.
Successes (x)
3
Sample size (n)
40
Observed proportion
7.5%
Significance level (α)
0.05 — a 95% interval
Recommended method
Wilson
Wilson 2.6% to 19.9%. Agresti-Coull 1.9% to 20.6%. Jeffreys 2.2% to 18.7%. Clopper-Pearson 1.6% to 20.4%. The Wald interval, for contrast, is −0.7% to 15.7% — a negative lower bound on a quantity that cannot be negative.
Three events out of forty pins down almost nothing. The true rate is somewhere between roughly one in forty and one in five, and the 10% threshold sits comfortably inside that range, so the audit demonstrates neither compliance nor breach. Reporting "7.5%, under the 10% limit" from this sample would be indefensible. Note also how little the four methods disagree — a couple of points at each end — next to how badly Wald fails: it is not merely narrower, it is impossible.
Interpreting the output
A 95% interval means a procedure like this one captures the true rate 95% of the time across repeated samples. It does not mean there is a 95% probability the true rate lies in this particular interval — that is a Bayesian statement, and Jeffreys is the one here that can almost be read that way. The distinction rarely changes a decision, but the loose version invites the reader to treat the bounds as more solid than they are.
Judge the interval against the decision, not against zero. The useful question is whether both ends point the same way for the choice in front of you. An interval of 2.6% to 19.9% against a 10% threshold is uninformative, because acting is right at one end and wrong at the other; 2.6% to 6.5% is decisive at a fraction of the cost. Fixing the width you need before sampling beats discovering afterwards that the audit was too small — the same logic as setting a minimum detectable effect before an experiment.
Never compare two rates by checking whether their intervals overlap. The inference is asymmetric: two 95% intervals that fail to overlap imply a significant difference, but intervals can overlap substantially while the difference is comfortably significant, because the standard error of a difference is smaller than the sum of the individual ones. Compute the interval on the difference — the two-proportion calculator reports a Newcombe interval built for exactly this — or use Fisher's exact test when counts are small.
Finally, remember what the interval covers: sampling error, and nothing else. It says nothing about a survey that reached the wrong people, an instrumentation bug that dropped a segment, or a definition of "converted" that changed halfway through. Those errors do not shrink with n and appear in none of these formulas, which is why we spend as long on data provenance as on the model.
Frequently asked questions
Which interval should I actually report?
Wilson, unless you have a specific reason otherwise. It has close to nominal coverage across the whole range of rates and sample sizes, always stays inside 0 and 1, behaves sensibly at zero and at 100 percent, and needs no iteration to compute. Use Clopper-Pearson when a guarantee of at least 95 percent coverage is required by a regulator or a contract and you can afford the extra width. Use Agresti-Coull when you have to show the arithmetic to a non-technical audience, since it is just Wald after adding two successes and two failures. Use Jeffreys when you are reporting many intervals and care about average performance rather than a worst-case guarantee.
Why is the Wald interval not offered?
Because it is unreliable exactly where it gets used most. Its real coverage at a nominal 95 percent can drop below 80 percent for rates near 0 or 1, and the shortfall does not disappear smoothly as the sample grows — it oscillates. It routinely produces bounds below 0 or above 1, which is not a rounding problem but a signal that the approximation has broken. Worst of all, with zero events it returns the single point zero with no width at all, implying certainty from an absence of data. Wilson costs one extra line of arithmetic and has none of these failures, so there is no case for offering the broken one alongside it.
What if I observed zero events, or every event?
These are the cases that separate the methods, and all four here handle them. Zero out of 40 gives an upper bound of about 8.8 percent under both Wilson and Clopper-Pearson, with a lower bound of zero: you have not shown the rate is zero, you have shown it is probably below about nine percent. The quick approximation is the rule of three, where the one-sided 95 percent upper bound for no events in n trials is about 3 divided by n. Wald, by contrast, returns the interval from zero to zero, which is why it is not on the menu.
How many observations do I need for a given precision?
Work from the half-width you can act on. At 95 percent confidence the worst case is a rate near 50 percent, where plus or minus 3 percentage points takes about 1,068 observations and plus or minus 1 point takes about 9,600. If you expect a low rate the requirement falls a long way: at around 7.5 percent, plus or minus 3 points needs 302 and plus or minus 2 points about 667. Halving the width you want roughly quadruples the sample, which is the single most useful rule of thumb here.
Does the size of the population I sampled from matter?
Much less than people expect. Precision is governed almost entirely by the number of observations, not by the fraction of the population they represent — a sample of 1,000 says nearly as much about a population of ten million as about a population of fifty thousand. The exception is when your sample is a large share of a small finite population, say 400 out of 1,000 accounts. There the standard intervals are conservative and a finite-population correction would narrow them. This calculator does not apply one, so treat its interval as the safe version in that case.
Every number we hand over carries the uncertainty around it, because a rate without a range is not a measurement. A/B Testing
References
Brown, L. D., Cai, T. T., & DasGupta, A. (2001). Interval estimation for a binomial proportion. Statistical Science, 16(2), 101-133.
Agresti, A., & Coull, B. A. (1998). Approximate is better than "exact" for interval estimation of binomial proportions. The American Statistician, 52(2), 119-126.
Clopper, C. J., & Pearson, E. S. (1934). The use of confidence or fiducial limits illustrated in the case of the binomial. Biometrika, 26(4), 404-413.