Skip to main content
HSCalculadora

Sample Size Calculator

Find the survey sample size for a target margin of error.

%
%

Use 50% for the most conservative size

Leave blank for a large population

Results update as you type.

Required sample size
—

How it works

Before running a survey, you need to know how many responses to collect for results you can trust, and this sample size calculator tells you. You choose a confidence level, set the margin of error you can tolerate, and optionally supply an expected proportion and the total population size; the calculator returns the number of respondents required. The margin of error is how far your survey result might differ from the true value, so a smaller margin demands a larger sample. The confidence level is how sure you want to be that the true value falls within that margin, with 95 percent being the standard choice. If you have no idea what proportion will answer a certain way, leave it at 50 percent, which produces the largest, most conservative sample size. For small, finite populations the calculator applies a correction that reduces the needed sample, because you are surveying a bigger share of the whole group. Pollsters, market researchers, quality engineers, and academics use this to design studies that are neither underpowered nor wastefully large. Remember that the required sample grows rapidly as you shrink the margin of error. Enter your parameters to find the sample size you need.

Formula

n = z²·p(1−p) / e², with finite-population correction if N is known

The base sample size is the squared critical z value for the confidence level times the proportion times one minus the proportion, divided by the squared margin of error. Using a proportion of 50 percent maximises this and gives the safest size. If a finite population size is provided, a correction reduces the required sample, since sampling a meaningful fraction of a small population needs fewer responses to reach the same precision.

Source:Survey sampling statistics

We review all our tools from time to time to ensure accuracy.

Worked example

Confidence level:95Margin of error:5Expected proportion (optional):50
n = 1.96² × 0.5 × 0.5 / 0.05² ≈ 384.16, rounded up to 385 respondents.

How to use this calculator

  1. 1

    Enter your values

    Enter confidence level and margin of error.

  2. 2

    Adjust the options

    Adjust expected proportion (optional) and population size (optional) if they apply — sensible defaults are already set.

  3. 3

    Read your result

    Required sample size updates instantly as you type — no button to press.

Frequently asked questions

How is sample size determined?

Sample size depends on the confidence level, the margin of error you will accept, and the expected proportion. The formula multiplies the squared critical value for the confidence level by the proportion times its complement, then divides by the squared margin of error. A tighter margin or higher confidence increases the required sample, sometimes dramatically.

Why use 50% for the expected proportion?

The quantity proportion times one minus proportion is largest when the proportion is 50 percent. Using 50 percent therefore yields the biggest, most cautious sample size, guaranteeing enough responses no matter how the results actually split. When you have no prior estimate of the true proportion, 50 percent is the safe default that avoids under-sampling.

Does population size affect the sample size?

For large populations, the required sample barely depends on the total size. A finite-population correction matters only when your sample would be a substantial fraction of a small population, in which case fewer responses are needed. For populations in the tens of thousands or more, the correction is negligible, which is why national polls sample only around a thousand people.

What confidence level should I choose?

Ninety-five percent is the standard for most surveys and research, balancing reliability against sample size. Ninety-nine percent gives greater assurance but requires a notably larger sample, while ninety percent needs fewer responses but accepts a higher chance of the true value falling outside the margin. Match the level to how costly a wrong conclusion would be.

How does margin of error affect the result?

The required sample size grows with the inverse square of the margin of error, so halving the margin quadruples the sample. This steep relationship is why very precise surveys are expensive: reducing the margin from five to two and a half percent multiplies the needed responses roughly fourfold. Choose the largest margin your purpose can tolerate to keep the sample manageable.