Confidence Interval, Margin of Error & Sample Size

Confidence Interval, Margin of Error & Sample Size computes the confidence interval, margin of error and critical value for a mean (from summary values or raw data) and a proportion (Wilson or Wald method), and finds the sample size needed to reach a given margin of error (with an optional finite-population correction). The t distribution is used when the population standard deviation is unknown and z when it is known.

  • Lower bound
    45.872203
  • Upper bound
    54.127797
  • Margin of error
    4.127797
  • Critical value
    2.063899
  • Standard error
    2
  • Degrees of freedom
    24

How it works

  1. 1Pick the mode: mean (summary or raw data), proportion or sample size.
  2. 2Enter the values and the confidence level (e.g. 95).
  3. 3Read the lower and upper bounds, the margin of error and the critical value.

Frequently asked questions

What does a confidence interval mean?+

If you drew many samples with the same method, the chosen share (e.g. 95%) of the computed intervals would contain the true population value. It does not mean there is a 95% probability the true value lies in this particular interval.

When is z used and when t?+

z when the population standard deviation is known, t when it is not (most real cases); with large samples they are nearly identical.

Why is Wilson recommended for proportions?+

The Wald interval performs poorly with small samples and extreme proportions; Wilson has better coverage near the edges and never leaves 0–1.

Where does 385 for surveys come from?+

For 95% confidence, a ±5% margin and an unknown proportion (worst case p = 0.5): (1.96² × 0.25) / 0.05² ≈ 384.16 → 385 respondents.

Embed on your site

Size
480 × 360px
<iframe
  src="https://toolsqube.com/en/math/confidence-interval-calculator/embed"
  width="480" height="360"
  style="border:0;border-radius:14px"
  title="Confidence Interval, Margin of Error & Sample Size · ToolsQube"
  loading="lazy">
</iframe>

Want to go deeper on this topic: Math Tools Guide →

Command Palette

Search for a command to run…