Random Sampling Calculator

Calculate the minimum sample size needed for statistically valid surveys. Enter your population size, confidence level, margin of error, and response distribution — and get back your required sample size along with the actual margin of error for any given sample.

Total number of people in the group you want to study.

Probability that your sample accurately reflects the population.

%

Acceptable range of deviation from the true population value.

%

Expected proportion of the population choosing a given answer. Use 50% if unknown (gives largest sample size).

Enter a sample size to calculate its actual margin of error.

Confidence level to use when calculating margin of error.

Results

Required Sample Size

--

Margin of Error for Known Sample

--

Confidence Interval Lower Bound

--

Confidence Interval Upper Bound

--

Sample vs. Remaining Population

Frequently Asked Questions

What is sample size?

Sample size is the number of individuals selected from a population to participate in a study or survey. A properly calculated sample size ensures that your results are statistically representative of the broader population, reducing the chance of skewed or misleading conclusions.

How can sample size influence results?

A larger sample size generally produces more accurate results with a smaller margin of error, meaning your findings are closer to the true population values. A sample that is too small increases the margin of error, making it harder to draw reliable conclusions.

What is a good sample size for a survey?

A good sample size depends on your population, acceptable margin of error, and required confidence level. For most surveys, a 95% confidence level with a 5% margin of error is the industry standard. For a population of 20,000, this typically requires around 377 respondents.

What is a confidence level?

The confidence level is the probability that your sample's results reflect the true values of the overall population. A 95% confidence level means that if you repeated the survey 100 times, 95 of those surveys would produce results within the stated margin of error.

What is a z-score and how is it used in sample size calculation?

A z-score is a statistical value that corresponds to a given confidence level. For a 95% confidence level, the z-score is 1.96. It is used in the sample size formula to determine how many standard deviations from the mean are needed to capture the desired confidence interval.

What is margin of error?

Margin of error is the range within which the true population value is expected to fall, expressed as a percentage. For example, a 5% margin of error at 95% confidence means your survey result could be 5 percentage points higher or lower than the actual population value.

What is response distribution and why does it matter?

Response distribution (also called proportion) is the expected percentage of respondents who will choose a particular answer. When unknown, 50% is used because it produces the largest — and most conservative — sample size estimate, ensuring your results are valid regardless of the actual distribution.

What's a large sample size?

There is no universal definition, but samples over 1,000 are generally considered large in survey research. For very large populations, sample size requirements plateau — once your population exceeds about 100,000, the required sample size for a given confidence level and margin of error changes very little.

More Math Tools