Sample Size Calculator

Find the minimum sample size for a proportion or mean estimate.

Estimate a

Enter the confidence level, margin of error, and the estimated proportion or standard deviation.

How this sample size calculator works

This calculator finds the minimum sample size for estimating a population proportion or a population mean. Choose Proportion (default) or Mean, pick a confidence level, enter a margin of error as a percent, and add the estimated proportion (default 50%) or the estimated standard deviation. The headline is n, rounded up to whole people.

Empty margin, a margin of 0%, or a margin of 100% or more is no result. Mean mode also needs an estimated σ greater than 0. Confidence presets are 90% (z = 1.645), 95% (1.96, default), 99% (2.576), and 99.9% (3.291). Closing Advanced options leaves population size and response rate out of n, even if they stay filled, and hides Show calculation details even if it stays checked.

How to use the sample size calculator

  1. Choose Proportion (default) or Mean, then pick a confidence level. Default is 95%.
  2. Enter the margin of error as a percent greater than 0 and less than 100. In Proportion mode, estimated proportion is a percent (50% by default). In Mean mode, enter an estimated standard deviation greater than 0.
  3. Read n in the headline. Details always show the confidence level, z-value, and margin of error.
  4. Open Advanced options only for a finite population, an expected response rate, or Show calculation details. Closing leaves population and response rate out of n, and hides the extra rows, even if values stay typed.

Advanced options, and closing them

Open this section to use Population size, Expected response rate, or Show calculation details. Closing it treats population and response rate as unused, so n is the uncorrected sample size, even if values stay typed. While open, a population applies the finite-population correction and a response rate above 0 through 100 inflates n. Open and Show calculation details checked, extra rows show uncorrected n, Finite-population correction when it applies, and Adjusted for response rate when a valid rate is typed.

Sample size formulas

Margin of error is entered as a percent and converted to a decimal E for both modes (5% → 0.05). Proportion: n₀ = z² p (1 − p) / E². Mean: n₀ = (z σ / E)². A typed population N as a positive integer applies the finite-population correction n = n₀ N / (n₀ + N − 1). A valid response rate then inflates n / rate. Every step is rounded up to a whole person.

Uncorrected sample size (proportion)
n0=z2p(1−p)E2
Finite-population correction
n=n0Nn0+N−1

Worked examples

Example: 95%, margin 5%, proportion 50%

E = 0.05, p = 0.5, z = 1.96. n₀ = 1.96² × 0.25 ÷ 0.05² = 384.16, which rounds up to 385. That is the headline when population and response rate stay empty.

Example: the same study in a population of 10,000, 80% response

Open Advanced options and enter population 10000. FPC gives about 370 after rounding up. An expected response rate of 80% then inflates to ceil(370 ÷ 0.80) = 463, which becomes the headline. Closing Advanced options returns the uncorrected n of 385, even if 10000 and 80 stay typed. Show calculation details, while open and checked, shows uncorrected n = 385, Finite-population correction yes, and Adjusted for response rate 463.

Example: Mean mode, 95%, margin 5%, σ = 12.5

Margin is still a percent, so E = 0.05, not 5 units of the mean. n₀ = (1.96 × 12.5 ÷ 0.05)² = 240,100. Typed 0 σ is no result. Empty margin is no result.

Things to keep in mind

Leave population blank for a very large or unknown population. Proportions and margins are percents. Results are ceiled to whole people. Closing Advanced options leaves a typed population or response rate out of n. Completed results can be saved in this browser’s local history.

Sample size calculator FAQ

Which fields are required?

Confidence level (default 95%), a margin of error greater than 0% and less than 100%, and either an estimated proportion (Proportion mode, 50% by default) or an estimated σ greater than 0 (Mean mode). Population and response rate are optional Advanced inputs. Advanced options is optional.

What happens when I close Advanced options?

Closing leaves population size and response rate out of n, even if they stay filled. Show calculation details rows are hidden even if the checkbox stays checked. Open the section again to use them. The headline is then the uncorrected n.

Is the margin of error a percent in Mean mode too?

Yes. Both modes convert the typed percent to a decimal E. In Mean mode n₀ = (z σ / E)², so a 5% margin is E = 0.05, not 5 units of the mean.

When is finite-population correction applied?

While Advanced options is open and you type a population as a positive integer. Empty population, or a closed section, skips FPC. The correction is n = n₀ N / (n₀ + N − 1), then rounded up.

What does expected response rate do?

While Advanced options is open, a percent greater than 0 and at most 100 inflates the already-corrected n by dividing by that rate and rounding up. Empty response rate, or a closed section, leaves that inflation out.

Does this sample size calculator store my numbers?

Completed results can be saved in this browser’s local history so you can reopen them later. They stay on your device and are not sent to our servers or to analytics.