ZestCalc
Appearance
Language

Confidence Interval Calculator for a Proportion

Estimate a population proportion from successes and sample size or from a sample proportion and sample size.

Enter sample information

Input mode

Best when you know the observed count x and the sample size n.

Observed count x of successes, approvals, conversions, or yes responses.

Total number of observations n in the sample.

Use a preset or enter a custom percentage from 50 to 99.99.

z-score critical value

Recommended for most uses.

z critical value

z-scorez1α/2z_{1-\alpha/2}

Leave on Auto unless you need to match a specific table or homework instruction.

z critical value

1.959964

Results

Confidence interval

35.1598%p48.8402%35.1598\% \le p \le 48.8402\%

Formula
p^MEpp^+ME\hat{p} - ME \le p \le \hat{p} + ME
Values
0.420.068402p0.42+0.0684020.42 - 0.068402 \le p \le 0.42 + 0.068402

At the 95% confidence level, the population proportion is estimated to be between 35.1598% and 48.8402%.

Normal approximation looks reasonable because n p̂ = 84 and n(1 - p̂) = 116 are both at least 10.

Lower bound

35.1598%

Upper bound

48.8402%

Sample proportionp^\hat{p}

0.42

Sample proportion (%)

42%

Margin of error

0.068402

Standard errorSE\mathrm{SE}

0.0349

z critical valuez1α/2z_{1-\alpha/2}

1.959964

Successes

84

Sample size

200

Approximate sampling distribution

95% confidence area±z=±1.96\pm z^*=\pm 1.96ME=0.0684ME=0.0684
Normal approximation curve showing the shaded confidence area, z critical values, and confidence interval endpoints for the sample proportion.95% confidence area-z*+z*2.5%2.5%LowerUppersample proportion
Lower35.1598%
42%
Upper48.8402%

Step-by-Step Calculation

1. Identify the inputs

x=84, n=200, C=95%x=84,\ n=200,\ C=95\%

2. Calculate or restate the sample proportion

p^=xn=84200=0.42\hat{p}=\frac{x}{n}=\frac{84}{200}=0.42

3. Calculate the standard error

SE=p^(1p^)n=0.42(10.42)200=0.0349SE=\sqrt{\frac{\hat{p}(1-\hat{p})}{n}}=\sqrt{\frac{0.42(1-0.42)}{200}}=0.0349

4. Find the z critical value

z0.975=1.959964z_{0.975}=1.959964

5. Calculate the margin of error

ME=1.959964×0.0349=0.068402ME=1.959964\times 0.0349=0.068402

6. Calculate the confidence interval

p^±ME=0.42±0.0684020.351598p0.488402\hat{p}\pm ME=0.42\pm 0.068402\Rightarrow 0.351598 \le p \le 0.488402

Understanding a Confidence Interval for a Proportion

The Bottom Line: What This Calculator Tells You

Whenever you take a sample—like surveying 200 people or testing 500 widgets—you are trying to guess a reality about the *entire* population. Because a sample is just a small slice of the whole, your result is only an estimate.

The primary goal of this calculator is to turn that single estimate into a reliable range. Instead of just giving you a single number, it provides a clear, practical statement like:

> "At a 95% confidence level, the true population proportion is estimated to be between 35.16% and 48.84%."

This gives you a realistic window of where the true answer actually lies, complete with the margin of error and standard error needed to back up your findings.


Core Concepts: Demystifying the Statistics

Before diving into the numbers, it helps to understand the key ideas driving the calculation.

What is a Confidence Interval?

A confidence interval estimates a reasonable range for an unknown population proportion using your sample data. Instead of reporting only your sample proportion (represented mathematically as p^\hat{p}), it reports an interval centered on that estimate with a built-in cushion on both sides.

What Does the "Confidence Level" Mean?

You will usually see confidence levels set at 90%, 95%, or 99%. This percentage describes the long-run reliability of the statistical method. If you were to repeatedly take random samples and build intervals in the exact same way, about 95% of those intervals would successfully capture the true population proportion.

  • Higher confidence requires a wider interval (to ensure you don't miss the true value).
  • Lower confidence results in a narrower, tighter interval.

What is the "z-score" (Critical Value)?

For a proportion confidence interval, the standard textbook method uses a z-score critical value. This value comes from the standard normal distribution and acts as a multiplier based on your chosen confidence level. A higher confidence level demands a larger z-score, which ultimately increases your margin of error.


The Math Behind the Method

For the standard two-sided Wald interval, the mathematical structure is relatively straightforward:

p^±z1α/2×SE\hat{p} \pm z_{1-\alpha/2} \times SE

Here is what makes up that formula:

  • p^\hat{p}: Your sample proportion.
  • z1α/2z_{1-\alpha/2}: The z-score critical value.
  • SESE: The standard error.

The standard error is calculated based on how close your proportion is to 50% and how large your sample is:

SE=p^(1p^)nSE = \sqrt{\frac{\hat{p}(1-\hat{p})}{n}}

The standard error gets smaller when your sample size (nn) is larger. It is at its largest when your observed proportion is near 50%, which is why intervals tend to get wider around the 50/50 mark.

Assumptions and Cautions

To use this method accurately, your sample should be random or reasonably representative, and observations must be independent. Furthermore, the Wald interval relies on a normal approximation. A common rule of thumb is to ensure you have at least 10 "successes" and 10 "failures" in your sample:

np^10andn(1p^)10n\hat{p} \ge 10 \quad \text{and} \quad n(1-\hat{p}) \ge 10

If these values are too small, the normal approximation may be weak. Finally, be aware that for very small samples or extreme proportions, the raw formula can sometimes extend below 0% or above 100%. Since real proportions cannot do that, practical interpretations should always be capped between 0% and 100%.

A Worked Example

Suppose a poll records 84 "yes" responses out of 200 participants, and you want a 95% confidence level.

1. Compute the sample proportion:

p^=84200=0.42\hat{p} = \frac{84}{200} = 0.42

2. Find the z critical value: For a 95% two-sided interval, the automatic z-score is approximately:

z0.975=1.96z_{0.975} = 1.96

3. Compute the standard error:

SE=0.42(10.42)2000.0349SE = \sqrt{\frac{0.42(1-0.42)}{200}} \approx 0.0349

4. Compute the margin of error:

ME=1.96×0.03490.0684ME = 1.96 \times 0.0349 \approx 0.0684

5. Calculate the final interval:

0.42±0.0684=[0.3516, 0.4884]0.42 \pm 0.0684 = [0.3516,\ 0.4884]

As percentages, your final confidence interval is 35.16% to 48.84%.


How to Use This Calculator

This tool is designed to be flexible based on the data you have available.

Step 1: Choose Your Input Mode

You can enter your data in two ways:

  1. Successes and sample size: Enter the raw count of observed successes (xx) and the total sample size (nn). The calculator will do the division for you. *(This is usually clearer as it avoids ambiguity).*
  2. Proportion and sample size: Enter the sample proportion directly along with nn. You can enter this as a decimal (0.42) or a whole number percentage (42 or 42%). The calculator interprets any value greater than 1 as a percentage.

> What does "success" mean? > In statistics, "success" is just the standard label for the specific outcome you are counting. It could mean "yes" responses on a survey, conversions on a website, defective parts on an assembly line, or any other outcome of interest.

Step 2: Set Your Confidence Level

Select your desired confidence level (usually 95%). The calculator will automatically fill in the correct z-score critical value for you.

*Note: An advanced override is available if a specific class, table, or assignment requires you to manually input a custom z-score. When active, the calculator will ignore the automatic lookup and use your exact number.*

Step 3: Calculate

Hit calculate to instantly generate your lower and upper bounds, your standard error, your margin of error, and a step-by-step breakdown of the math!