Sample Size Calculator

Determine the sample size needed for a survey or study at a given confidence and margin.

Results will appear here.
Calculation details
Every figure above is calculated locally in your browser from the assumptions shown. No inputs are sent anywhere. See the methodology section below for the formulas used.
Use this resultShare the current inputs, or ask ChatGPT to explain the calculation in context.
Ask an AI to explain this result
Share this result

Planning estimate only, not financial, tax, or legal advice. Verify assumptions and current rules before making decisions.

This tool runs in your browser. Your calculator inputs and results are never transmitted to us or to ad/affiliate partners. Ads and sponsored links may set third-party cookies to serve and measure them, but they never receive your calculation values. If you explicitly save a scenario, its permitted fields stay in local browser storage until you clear them. See our Privacy Policy.

Use this result

Share the current inputs or ask ChatGPT to explain the calculation in context.

More options
Report a calculation issue
Direct answer

What does this calculator estimate?

A sample size calculator tells you how many people or observations you need to survey for a target precision. Enter the confidence level, margin of error, expected proportion, and population size to get the required n.

  • n₀ = z²p(1−p) ÷ e²
  • p = 0.5 is the most conservative (largest n)
  • Finite populations need a small correction

Why sample size matters

A sample that's too small can't support precise conclusions; one that's too large wastes money and time. The formula balances the confidence level, the margin of error you can tolerate, and the expected variability of the thing you're measuring.

Limitations to watch for

The formula assumes a simple random sample. Real surveys use design effects (clustering, stratification) that raise the required n. The expected proportion p is a guess — using 0.5 is safest but yields the largest n. Non-response means you should plan to contact more people than the answer.

How to use it in practice

Decide the margin of error you can live with before collecting data. Use p = 0.5 when you don't know the true proportion. If your population is small (under ~10,000), include it for the finite-population adjustment.

['Choose the confidence level and margin of error.', 'Enter your expected proportion (0.5 if unsure).', 'Optionally enter the population size for the finite correction.']

Transparent methodology

How this calculator works

Reviewed 2026-08-25 · BoringToolsKit Editorial Team

Formula

Required sample size n₀ = z² × p(1 − p) ÷ e², where z is the critical value for the confidence level (1.645/1.96/2.576), p is the expected proportion, and e is the margin of error. With a finite population, n = n₀ ÷ (1 + (n₀ − 1) ÷ N).

Worked example

For 95% confidence (z = 1.96), a ±5% margin (e = 0.05), and p = 0.5: n₀ = 1.96² × 0.25 ÷ 0.0025 ≈ 384.16 → 385. For a population of 10,000, the finite correction gives about 370.

Assumptions to verify

  • Simple random sampling with independent observations.
  • The proportion p is close to the expected value.
  • Non-response and design effects are not included.

Frequently asked questions

How many people do I need to survey?

It depends on the confidence level, margin of error, and expected proportion. For 95% confidence and ±5% margin, you need roughly 385 respondents (fewer with a small population).

What is the formula?

n₀ = z² × p(1 − p) ÷ e², where z is the z-value (1.96 for 95%), p the expected proportion, and e the margin of error. A finite population applies n = n₀ ÷ (1 + (n₀ − 1) ÷ N).

Why is p = 0.5 conservative?

p(1 − p) peaks at 0.25 when p = 0.5, giving the largest sample size. If you don't know the true proportion, using 0.5 guarantees enough precision.

What is a good margin of error?

±5% is common for market research; ±3% is tighter and more expensive; ±10% is acceptable for quick directional reads. Smaller margins need bigger samples.

Does population size matter?

Only for small populations. Above ~10,000–20,000 the finite-population correction barely changes the answer; below that it reduces the required n.

Does this include non-response?

No — the answer is the number of completed responses. If you expect a 30% response rate, contact roughly 3.3× as many people.

Is random sampling assumed?

Yes. Non-random samples (convenience, self-selected) aren't fixed by a bigger n — the formula only protects against sampling error.

Cite this tool

BoringToolsKit. “Sample Size Calculator.” boringtoolskit.com/sample-size-calculator/ (reviewed 2026-08-25). Free to reference in articles, syllabi, and answer posts with a link.

Privacy: Inputs and results stay in this browser. Any future sponsored recommendation or advertisement will be clearly labeled and kept separate from the calculation.