x is the count of successes, n the total sample size. The interval covers the true proportion at the chosen confidence level.
p̂ = x/n; Wald: p̂ ± z·√(p̂(1−p̂)/n); Wilson score interval; z = 1.645/1.96/2.576 for 90/95/99%.
About this tool
The Confidence Interval for a Proportion Calculator estimates the plausible range for a true population proportion from a sample in which x of n observations were successes. Enter the number of successes, the sample size and a confidence level, and it returns two interval methods plus the margin of error, computed instantly in your browser.
The point estimate is p̂ = x/n. The familiar Wald interval is p̂ ± z·√(p̂(1−p̂)/n), where the z multiplier comes from the confidence level (1.645 for 90%, 1.96 for 95%, 2.576 for 99%); that ± term is the margin of error. The Wald interval is simple but performs poorly for small samples or proportions near 0 or 1, so the tool also gives the Wilson score interval, (p̂ + z²/2n ± z√(p̂(1−p̂)/n + z²/4n²)) / (1 + z²/n), which stays within 0–1 and is far more accurate in those cases.
Both intervals are clamped to the valid 0–1 range and shown as percentages alongside the raw proportion. The number of successes x must be a whole number between 0 and n, and the sample size n at least 1. When results matter near the extremes or with small n, prefer the Wilson interval.
Frequently asked questions
Which interval should I use, Wald or Wilson?
Prefer the Wilson score interval. The Wald interval is the textbook default but is unreliable for small samples or when p̂ is near 0 or 1, where it can fall outside 0–1. The Wilson interval corrects this and is accurate across the whole range.
What is the margin of error?
It is the half-width of the Wald interval: z·√(p̂(1−p̂)/n). The interval is p̂ ± margin of error. It shrinks as the sample size grows (roughly with 1/√n) and is widest when p̂ is near 0.5.
How is the z multiplier chosen?
From the confidence level: 90% uses z = 1.645, 95% uses 1.96 and 99% uses 2.576. These are the two-sided critical values of the standard normal distribution that leave the stated confidence between them.
Why is the Wilson interval not symmetric around p̂?
Because it solves the score equation rather than adding a fixed margin, its centre is pulled toward 0.5 and the two sides can differ. That asymmetry is exactly what keeps it inside 0–1 and makes it more accurate for extreme proportions.
More tools