Find how many survey responses you need from confidence level, margin of error, and optional population size — or reverse the formula to get the margin from a given n.
e.g. 5 for ±5%
Default 50% (most conservative)
Leave blank for infinite / very large population
Survey planners pick a confidence level (often 95%), a margin of error (for example ±5%), and an assumed response proportion p. The classic Cochran formula for an infinite population is n₀ = z² p (1 − p) / E², where z comes from the standard normal at your confidence level and E is the margin as a proportion. When the population N is known and not huge, apply the finite population correction n = n₀ / (1 + (n₀ − 1)/N). Required n is always rounded up so you meet the target precision. For estimating a mean instead of a proportion, use n = (z · σ / E)² with a planning value of the standard deviation σ and a margin E in the same units.
Use proportion mode for polls, NPS-style yes/no questions, conversion rates, and classroom sampling problems. Use mean mode when you care about an average (test scores, weights, wait times) and already have a ballpark σ. Use reverse mode after fieldwork to report the achieved margin of error for a completed sample of size n, with or without a finite N.
Proportion (infinite): n₀ = z² · p · (1 − p) / E² Finite correction: n = n₀ / (1 + (n₀ − 1)/N) Mean: n = (z · σ / E)² Reverse margin: E = z √(p(1−p)/n) [× √((N−n)/(N−1)) if N known]
Normal critical value for the confidence level
Margin of error (proportion or same units as the mean)
Expected population proportion (use 0.5 if unknown)
Finite population size (optional)
Sample size before finite population correction
Planning standard deviation for a mean
z ≈ 1.96, E = 0.05, p = 0.5 → n₀ ≈ 384.16 → round up to n = 385. With N = 1,000, the finite correction gives n = 278.
n = (z · 15 / 3)² ≈ (1.96 · 5)² ≈ 96.04 → round up to n = 97.
E ≈ 0.05, so the margin of error is about ±5% — matching the planning inputs that produced n = 385.
With the conservative proportion p = 0.5 (50%), a 95% confidence level and a 5% margin of error, the infinite-population formula gives n = 385. If your population is finite (for example N = 1,000), apply the finite population correction and you need about 278 responses.
In the proportion formula, the product p(1 − p) is maximized when p = 0.5. Using 50% therefore plans for the worst-case variability and is the usual default when you do not yet know the expected response share.
Use it when you are sampling without replacement from a known, relatively small population N (often when the planned n is more than about 5% of N). The correction shrinks n₀ to n = n₀ / (1 + (n₀ − 1)/N). Leave N blank for a large or unknown population.
For a mean you need an estimate of the population standard deviation σ and a margin of error E in the same units as the mean. Then n = (z · σ / E)², rounded up. There is no percent-based p term as in the survey proportion formula.
Reverse mode takes a planned or achieved sample size n (and optional population N), confidence level, and assumed proportion p, then returns the margin of error. It answers “how precise is this sample?” rather than “how large must the sample be?”
Sample size must be a whole number of respondents, and rounding down would understate the precision you requested. The calculator always applies Math.ceil so the reported n meets or exceeds the target margin at the chosen confidence level.
© 2025-2026 PromathTools. All rights reserved.
Built by KruskalCode – SaaS & Automation Experts · EverydayDevTools