Choose what you want to calculate
Most people use this to answer: “How many responses do I need for my survey?” If you already have a sample size, switch the mode to estimate the margin of error.
This Sampling Calculator helps you choose a sample size (how many people/items to measure) or estimate your margin of error for surveys, experiments, product analytics, school projects, and A/B tests. It supports both proportions (percent “yes”, conversion rate, defect rate) and means (average time, average score, average weight), with optional finite population correction for small populations.
Most people use this to answer: “How many responses do I need for my survey?” If you already have a sample size, switch the mode to estimate the margin of error.
This calculator uses classic “intro stats” formulas that show up in survey methodology, research papers, and quality control. There are two common sampling situations: (1) proportions (a percentage like conversion rate) and (2) means (an average like average score). The inputs you choose are really about one trade-off: precision vs effort.
If you want to estimate a proportion (for example, “What percent of customers prefer Plan A?”), the baseline sample size formula is:
n₀ = (Z² · p · (1 − p)) / E²
If your population is not huge (say you only have 600 students in a school), you can adjust using finite population correction (FPC):
n = n₀ / (1 + (n₀ − 1)/N)
Where N is the population size. This usually makes the recommended sample size smaller. If N is unknown or very large, the correction barely changes anything — which is why survey tools often ignore it.
If you’re estimating a mean (for example, “What’s the average time to complete a task?”), the formula looks similar, but uses an estimated standard deviation (σ):
n₀ = (Z² · σ²) / E²
Here E is the allowable error in the same units as your measurement (e.g., ±2 minutes, ±5 points). If σ is unknown, you can use pilot data (a small initial sample) or a reasonable guess based on past measurements.
If you already have a sample size and want to estimate the margin of error for a proportion, you can rearrange the formula:
E ≈ Z · √(p(1−p)/n)
In practice, many people plug in p = 0.5 when p is unknown. That yields a conservative (slightly larger) margin of error.
You want a 95% confidence estimate with ±5% margin of error for a proportion (p unknown). Use p = 0.5 (worst-case). The calculator returns about 385 responses. That’s why you see “385” in so many survey guides — it’s the default for 95% and ±5%.
You’re surveying a class of N = 120 students, 95% confidence, ±5% error, p = 0.5. Without correction you’d still get ~385, which is impossible (bigger than the class). With finite population correction, the required sample size drops to around 92. That’s a huge difference — and it’s the reason “population size” matters when N is small.
You’re measuring average delivery time. You think σ ≈ 12 minutes from historical data. You want 95% confidence and ±3 minutes error. The calculator returns roughly 62 observations (deliveries).
With 95% confidence and unknown p (use 0.5), a sample size of 200 gives a margin of error around ±6.9%. That’s why small samples can feel “noisy”.
The “best” sample size isn’t one magic number — it’s a decision based on effort, time, and what you need the result for. Here’s a practical way to choose inputs:
Population size is helpful when the total group is limited and known (a roster, a customer list, a batch). If you’re sampling “future visitors” or “the internet”, leave it blank.
For proportions, if you have no clue, use p = 0.5. If you have a prior estimate (say your conversion rate is usually ~8%), use p = 0.08. This can reduce the required sample size, but be careful: if your guess is wrong, you might under-sample.
For means, σ matters a lot. If you don’t know σ, take a small pilot sample (like 20), compute the sample standard deviation, then use that to plan the full study.
Because for a proportion with unknown p (use 0.5), 95% confidence, and ±5% margin of error, the formula gives n ≈ 384.16, which rounds up to 385. It’s the standard “default survey” number.
Only when the population is small. If N is huge, the correction barely moves. If N is a few hundred or a few thousand, finite population correction can noticeably reduce n.
Use p = 0.5. It’s “worst-case”, meaning it produces the largest recommended sample size for a given margin of error and confidence level. That’s the safe option.
Not exactly. A/B test planning usually depends on statistical power and the minimum effect you want to detect. This tool is perfect for rough planning and survey-style estimation, but power analysis is more specific.
Yes for approximate planning. If you’re doing regulated QC or acceptance sampling, your industry may require specific sampling plans (like ANSI/ASQ standards).
Margin of error here is in percent points. If you estimate 40% with ±5%, your interval is 35% to 45%. That’s ±5 percentage points (not “±5% of 40”).
MaximCalculator provides simple, user-friendly tools. Always treat results as educational estimates and double-check any important study design decisions.