About Sample Size for a Mean Calculator
This calculator gives the sample size needed to estimate a population mean within a chosen margin of error, from the population standard deviation and the confidence level. It is free, needs no sign-up and runs in your browser, so nothing you enter is uploaded.
You need an estimate of the standard deviation before you collect data. Take it from a pilot study, an earlier study of the same measurement or a published figure. The result is the number of observations to plan for, always rounded up.
The page opens on a standard deviation of 15 and a margin of 2 at 95% confidence. Switch to 99% and the sample grows, because a more confident interval needs more data for the same width.
How to use Sample Size for a Mean Calculator
- Choose what to calculate: survey size, margin of error, a mean, or an A/B test.
- For a survey, set the confidence level, the margin of error in percentage points and the expected proportion. Use 50% if you are unsure.
- If your population is small, type its size to apply the finite population correction.
- For an A/B test, enter the baseline rate, the change to detect, the power and the significance level.
- Read the result, then open the working to copy the formula into your methods section.
Features
- Survey sample size for a proportion at 90%, 95% or 99% confidence.
- Margin of error for a given sample size, with finite population correction.
- Sample size to estimate a mean from the standard deviation and the margin of error.
- A/B test sample size per group from baseline rate, minimum detectable change, power and significance.
- Finite population correction when the population is known and small.
- A bell curve of the confidence level and step-by-step KaTeX working.
Sample size for a mean
The formula uses the normal critical value. It is the standard planning formula and slightly optimistic for small samples, where t would be used.
n0 = (z · σ / E)²
n = n0 / (1 + (n0 − 1) / N) (finite population only)Worked examples
σ = 15, margin ±2, 95% gives 217 observations (n0 = 216.08)
σ = 15, margin ±2, 99% gives 374 observations
Privacy: how it works
- All formulas run in your own browser tab. Nothing you type is sent to Ulkaa or to any other server.
- There is no account and nothing is stored once you close the tab.
Tips
- If you do not know the expected proportion, use 50%. It gives the largest sample and so a safe margin.
- Smaller margins are expensive: moving from ±5 to ±2.5 points roughly quadruples the sample.
- For an A/B test, decide the smallest change that would matter to the business. Detecting tiny lifts takes very large samples.
- A population much larger than the sample barely changes the answer. The correction matters when the sample is more than about 5% of the population.
Frequently asked questions
Is it really free?
Yes. There is no price, no trial and no credit card. Ulkaa Tool does the work with your own device, so there is no server bill to pass on to you.
Do I need an account?
No. There is no sign-up and no login. Open the page and use it. An Ulkaa account is not needed for anything on this tool.
Does it run in my browser?
Yes. Your numbers are processed by code running in your browser tab, on your own device.
Is my data uploaded?
No. Your numbers are never sent to Ulkaa or to anyone else. You can check this yourself by watching the Network tab in your browser developer tools while you use the tool.
What if I do not know the standard deviation?
Run a small pilot study and use its standard deviation, or use one from similar published work. If the guess is too low the sample will be too small.
Why is the answer a whole number?
You cannot collect a fraction of an observation, and rounding down would miss the target margin, so the result is always rounded up.
More Sample Size Calculator pages
- Sample Size CalculatorFind how many responses a survey needs, the margin of error of a sample, or how many people an A/B test needs.
- Survey Sample Size CalculatorSet a confidence level, a margin of error and your population size to find how many responses to collect.
- Margin of Error CalculatorType the sample size and get the margin of error for a survey result.
- A/B Test Sample Size CalculatorEnter your baseline conversion rate and the smallest lift you care about to find the sample per group.