FireCADCalc

Confidence Interval for a Proportion (Wilson Score)

Wilson score and simple Wald confidence intervals for a proportion from x successes in n trials, at 90, 95 or 99 % confidence, with the point estimate.

Inputs

Examples: Illustrative 7 defectives in 120 at 95 %No failures in 50 at 90 %45 of 60 at 99 %

Accepted: 0 to 1E+9
Accepted: 1 to 1E+9

Results

The Wilson interval inverts the score test: it is centred on (p̂ + z²/2n)/(1 + z²/n) and stays inside 0–1 with close to the stated coverage even for small n or p near 0 or 1. The familiar Wald interval p̂ ± z√[p̂(1 − p̂)/n] is shown for comparison; it collapses to zero width when x = 0 or x = n and undercovers for small samples. z is the two-sided normal quantile for the chosen confidence.

Point estimate x/n75.000%
Wilson lower limit58.622%
Wilson upper limit86.399%
Wald lower limit (clipped at 0)60.601%
Wald upper limit (clipped at 1)89.399%

Download PDF CSV Link to this result Compare another case

Log in to save calculations to your dashboard.

Worked example

Example: Illustrative 7 defectives in 120 at 95 %. The inputs, in the units selected above:

InputValue
Successes (or defectives) observed7.0000 -
Trials (sample size)120.00 -
Confidence level95 %

Applying the formula below gives:

ResultValue
Point estimate x/n5.8333 %
Wilson lower limit2.8541 %
Wilson upper limit11.553 %
Wald lower limit (clipped at 0)1.6400 %
Wald upper limit (clipped at 1)10.027 %

Open this example in the calculator and change any input.

Formula

\(p_{L,U} = \frac{\hat p + \frac{z^2}{2n} \mp z\sqrt{\frac{\hat p(1-\hat p)}{n} + \frac{z^2}{4n^2}}}{1 + \frac{z^2}{n}}\)

Variables

Symbol Meaning SI unit
\(x\) Successes (or defectives) observed -
\(n\) Trials (sample size) -
\(1-\alpha\) Confidence level -
\(\hat p\) Point estimate x/n -
\(p_L\) Wilson lower limit -
\(p_U\) Wilson upper limit -
\(p_{L,Wald}\) Wald lower limit (clipped at 0) -
\(p_{U,Wald}\) Wald upper limit (clipped at 1) -

Method and standards

Wilson interval.

Where it is used

  • Defect, failure and pass rates from samples.
  • Survey and test result reporting.

Common mistakes

  • Using the Wald interval for small samples.
  • Entering a percentage instead of counts.

Assumptions and limits

  • Independent trials with a constant probability.

References

  • Wilson score interval

Questions and answers

Why not the simple ± formula?

The Wald interval has poor coverage for small samples or proportions near 0 or 1, and gives zero width when nothing is observed.

What if no failures were seen?

Wilson still gives an upper limit; for 0 of n the 95 % upper limit is close to the rule of three, 3/n.

What do the defaults represent?

An illustrative 7 defectives in a sample of 120, at 95 % confidence.

Method and article reviewed by FireCAD engineering on 17 November 2026. Every result is checked against an independent calculation on each release: how we verify our calculators.

Sources

Wilson, Probable Inference, the Law of Succession, and Statistical Inference, J. Am. Stat. Assoc. 22 (1927)

Related calculators

Free engineering calculators: every page computes in SI and converts to your units. Results are for engineering estimation; verify critical designs against the referenced standards.

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.