Sample Size Calculator
Calculate the required sample size for estimating a population mean with a specified margin of error and confidence level. Essential for survey design and experimental planning across all disciplines.
This free online sample size calculator provides instant results with no signup required. All calculations run directly in your browser — your data is never sent to a server. Enter your values below and see results update in real time as you type. Perfect for everyday calculations, homework, or professional use.
Z critical value for desired confidence: 1.645 (90%), 1.96 (95%), 2.576 (99%).
Estimated population standard deviation.
Maximum acceptable margin of error.
How to Use This Calculator
Enter your input values
Fill in all required input fields for the Sample Size Calculator. Most fields include unit selectors so you can work in your preferred unit system — metric or imperial, whichever matches your problem.
Review your inputs
Double-check that all values are correct and that you have selected the right units for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.
Read the results
The Sample Size Calculator instantly computes the output and displays results with units clearly labeled. All calculations happen in your browser — no loading time and no data sent to a server.
Explore parameter sensitivity
Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.
Formula Reference
Sample Size Calculator Formula
See calculator inputs for the governing equation
Variables: All variables and their units are labeled in the calculator interface above. Input fields accept values in multiple unit systems — select your preferred unit from the dropdown next to each field.
When to Use This Calculator
- •Use the Sample Size Calculator when you need accurate results quickly without the risk of manual computation errors or unit conversion mistakes.
- •Use it to verify calculations made by hand or in spreadsheets — an independent check can catch errors before they lead to costly decisions.
- •Use it to explore how changing input parameters affects the output — a quick way to develop intuition and identify the most influential variables.
- •Use it when collaborating with others to ensure everyone is working from the same numbers and applying the same assumptions.
About This Calculator
The Sample Size Calculator is a free, browser-based calculation tool for engineers, students, and technical professionals. Calculate the required sample size for estimating a population mean with a specified margin of error and confidence level. Essential for survey design and experimental planning across all disciplines. It implements standard formulas and supports both metric (SI) and imperial unit systems with automatic unit conversion. All calculations are performed instantly in your browser with no data sent to a server. Use this calculator as a quick reference and sanity-check tool during design, analysis, and learning. Always verify results against primary engineering references and applicable standards for any safety-critical application.
About Sample Size Calculator
The sample size calculator determines how many observations you need to estimate a population mean within a specified margin of error at a desired confidence level. Proper sample size planning is critical for any study: too few observations lead to imprecise estimates and underpowered tests, while too many waste resources. This calculator is used by market researchers designing surveys, clinical trialists planning drug studies, quality engineers establishing inspection plans, and social scientists conducting polls. The formula balances three factors: the desired precision (margin of error), the variability of the population (standard deviation), and the level of confidence.
The Math Behind It
Formula Reference
Sample Size for Mean
n = (z* * sigma / E)^2
Variables: z* = critical value; sigma = std dev; E = margin of error
Worked Examples
Example 1: Market research survey
Estimate average spending within $3 at 95% confidence. Prior data suggests sigma = $15.
You need at least 97 respondents.
Example 2: Clinical trial
Estimate mean blood pressure reduction within 2 mmHg at 99% confidence. sigma = 8 mmHg.
The trial needs at least 107 participants.
Common Mistakes & Tips
- !Rounding down instead of up, which gives a slightly larger margin of error than desired.
- !Using an unrealistic estimate of sigma, which can lead to an insufficient or excessive sample.
- !Ignoring non-response and attrition; plan for a larger initial sample to account for dropouts.
Related Concepts
Used in These Calculators
Calculators that build on or apply the concepts from this page:
Frequently Asked Questions
What if I do not know the population standard deviation?
Use data from a pilot study, prior research, or a conservative estimate. For proportions, using p = 0.5 gives the maximum (most conservative) sample size.
Why does halving the margin of error quadruple the sample size?
Because n is proportional to (1/E)^2. Halving E means squaring 2, which is 4. Precision comes at an increasing cost.
Should I apply a finite population correction?
Yes, if your sample is more than about 5% of the population. The correction reduces the required sample size: n_adj = n / (1 + (n-1)/N).