CalcUnit Logo

Sample Size Calculator

What is the Sample Size Calculator?

What this page answers

Before you collect data, this page tells you how much of it you need. Enter a Z star value, an estimate of the population standard deviation, and the margin of error you can tolerate, and it returns the required sample size, rounded up, plus the exact figure beneath it.

The three inputs, in plain terms

Z star sets your confidence: 1. 96 for 95 percent, 2. 576 for 99 percent. The Population SD Estimate is your best advance guess at the spread of what you are measuring. The Margin of Error is the plus-or-minus you will accept, in the same units as the standard deviation.

The defaults, worked end to end

The page opens with Z star at 1. 96, a standard deviation estimate of 0. 5, and a margin of error of 0. 05. The exact answer is 384. 16, and the Required Sample Size line rounds it up to 385. Those defaults are the most famous sample size in survey research.

Why the answer always rounds up

A sample of 384. 16 people does not exist, and rounding down would leave you a fraction short of the precision you asked for. The page applies the ceiling function, so any exact value with a decimal part moves to the next whole number. The Exact n line shows the unrounded figure.

The 385 behind the defaults

Enter a standard deviation of 0. 5 and a margin of 0. 05 and the formula becomes the worst-case survey calculation. For a percentage near fifty-fifty, the spread is at its maximum, and this setup reproduces the classic result: about 385 responses for a 95 percent interval with a five-point margin.

A 99 percent example with real units

Suppose you are timing deliveries, your standard deviation is about 15 minutes, and you want a margin of 3 minutes at 99 percent confidence. With Z star at 2. 576, the exact answer is 165. 8944, so the page requires a sample of 166 deliveries.

A 90 percent example

Drop the confidence to 90 percent and the cost falls. With Z star at 1. 645, a standard deviation of 12, and a margin of error of 2, the exact answer is 97. 4169, which the page rounds up to a sample of 98. Lower confidence always buys a cheaper study.

Squeezing the margin is expensive

Hold the other defaults and tighten the margin from 0. 05 to 0. 03, and the exact requirement jumps to 1067. 1111, a sample of 1068. Precision is bought in bulk: the sample grows with the square of the tightening, not in proportion to it.

Halving the margin quadruples the sample

At a margin of 0. 025, exactly half the default 0. 05, the exact answer is 1536. 64 and the required sample is 1537, almost precisely four times 385. This square law is the single most useful fact in study planning, and the most common source of sticker shock.

Your standard deviation guess runs the budget

If the true spread is 0. 6 rather than the 0. 5 you estimated, the honest requirement at the same margin is 553. 1904, a sample of 554 instead of 385. Underestimating spread is the classic way studies end up too small, so estimate from a pilot or published data when you can.

Ninety-nine percent confidence costs real money

At the default settings, moving Z star from 1. 96 to 2. 576 lifts the exact answer from 384. 16 to 663. 5776, a sample of 664. That is about 73 percent more data for four points of confidence. Sometimes that insurance is worth it; often 95 percent is the rational stop.

The units trap

The margin of error must be in the same units as the standard deviation. Enter a spread of 0. 5 with a margin of 5, mixing decimals and percentage points, and the page dutifully reports an exact size of 0. 0384 and a required sample of 1. The formula cannot smell mismatched units; you have to.

Small populations need fewer samples

This page assumes an effectively unlimited population. If your population is small, apply the finite population correction by hand: divide n by 1 plus n minus 1 over N. A required 385 from a population of 500 drops to about 218.

This is not a power calculation

Nothing here asks about effect size or statistical power, because this formula sizes a study for estimation precision, not for detecting a difference. A test-oriented design uses a different formula that adds a second Z value for power, and its answers differ, sometimes sharply.

A power example, for scale

For a one-sample test at the 5 percent level with 80 percent power, hunting an effect of 3 where the standard deviation is 15, the standard power formula needs about 197 subjects. Same spread, same confidence family, different question, different number. Do not let this page's answer substitute for that one.

Where the standard deviation estimate comes from

Good sources, in order: a pilot study of your own, published results on the same measure, or the rough range rule that the standard deviation is often near a quarter of the plausible range. When torn between two estimates, run the page with the larger one.

Nonresponse eats your sample

The required size is the number of completed, usable observations, not invitations sent. If you expect a 40 percent response rate and need 385 completes, you must invite roughly 963 people. Budget the invitations from the completion target, never the other way around.

How the outputs are displayed

The Exact n line shows four decimal places, so 384. 16 and 165. 8944 appear exactly as computed. The Required Sample Size line shows whole people only, because its formula applies the ceiling before the display ever sees the number.

The simple random sampling assumption

Every number here presumes a simple random sample, where observations are independent. Clustered designs, like surveying whole classrooms at a time, effectively shrink your data: a design effect of 1. 5 turns a required 385 into about 578. Multiply the answer by your design effect when clusters rule.

Why sample sizes cluster at familiar numbers

Poll sizes cluster because margins do. At the default spread and 95 percent confidence, 385 responses buy a margin of 0. 05, about 600 buy a margin of 0. 04, and 1068 buy a margin of 0. 03. When a poll reports its sample, you can read its precision off this page.

Subgroups need their own headroom

A sample sized for the whole population is not sized for its slices. If a subgroup makes up a fifth of your 385 responses, it holds about 77 people, and its margin runs about 2. 24 times wider than the headline figure. Size the study for the smallest group you must report.

When to use this page, and when not to

Use it to plan surveys and measurement studies where the deliverable is an estimate with a stated margin. Do not use it to size a clinical trial, an A/B test, or any study whose deliverable is detecting a difference; those need a power calculation with an effect size.

With the pre-filled defaults — Z* (1. 96 for 95%, 2. 576 for 99%) 1. 96, Population SD Estimate (σ) 0. 5, Margin of Error (E) 0. 05 — the Sample Size Calculator returns Required Sample Size (n) 385, Exact n 384. 1600.

Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.

How to Use the Sample Size Calculator

  1. 1Set Z* for your confidence level: 1.645 for 90 percent, 1.96 for 95 percent, or 2.576 for 99 percent.
  2. 2Enter the Population SD Estimate (sigma), your best advance guess at the spread, from a pilot study or published data.
  3. 3Enter the Margin of Error (E) you can tolerate, in the same units as the standard deviation: 0.05 pairs with 0.5, not with 5.
  4. 4Read the Exact n line to see the raw requirement; at the defaults it shows 384.16.
  5. 5Read the Required Sample Size (n) line, which rounds the exact figure up; at the defaults it shows 385.
  6. 6Test your plan's sensitivity by rerunning with a larger standard deviation estimate and watching the requirement climb.
  7. 7If your population is small and known, shrink the answer by hand with the finite population correction described in the guide.
  8. 8Inflate the final number for expected nonresponse so the completed responses still meet the requirement.

Formula

n = (z×σ/E)²

This is the core equation the Sample Size Calculator uses to calculate results. Enter values in the calculator above to see it in action.

See the full step-by-step formula guide with worked examples →

Common Examples

ScenarioCalculationResult
Default survey settings at 95 percentExact n = (1.96 x 0.5 / 0.05) squared = 19.6 squared = 384.16, and the ceiling rounds it upExact n 384.16, Required Sample Size 385
99 percent, SD of 15, margin of 3Exact n = (2.576 x 15 / 3) squared = 12.88 squared = 165.8944, and the ceiling rounds it upExact n 165.8944, Required Sample Size 166
90 percent, SD of 12, margin of 2Exact n = (1.645 x 12 / 2) squared = 9.87 squared = 97.4169, and the ceiling rounds it upExact n 97.4169, Required Sample Size 98
Tight margin of 0.03 at 95 percentExact n = (1.96 x 0.5 / 0.03) squared = 1067.1111, nearly triple the default requirement, and the ceiling rounds it upExact n 1067.1111, Required Sample Size 1068

Value Reference Table

See how the Required Sample Size (n) changes as Z* (1.96 for 95%, 2.576 for 99%) moves across its typical range — every row below is calculated live with the same formula as the calculator above.

Z* (1.96 for 95%, 2.576 for 99%)Required Sample Size (n)Exact n
0.111.0000
1100100.0000
2400400.0000
3900900.0000
416001600.0000
525002500.0000
636003600.0000
864006400.0000

Practice Problems

Check your understanding of the Sample Size Calculator with these practice problems. Click a problem to reveal its correct calculated answer.

Q1

95% CI, SD=0.5, E=0.05: Plug in Z* (1.96 for 95%, 2.576 for 99%) 1.96, Population SD Estimate (σ) 0.5, Margin of Error (E) 0.05. What is the answer?

Show Answer
Entering Z* (1.96 for 95%, 2.576 for 99%) 1.96, Population SD Estimate (σ) 0.5, Margin of Error (E) 0.05 gives Required Sample Size (n) 385, Exact n 384.1600.
Q2

Given Z* (1.96 for 95%, 2.576 for 99%) 3.22, Population SD Estimate (σ) 15, Margin of Error (E) 3, what does it come out to?

Show Answer
The calculator returns Required Sample Size (n) 260, Exact n 259.2100 for Z* (1.96 for 95%, 2.576 for 99%) 3.22, Population SD Estimate (σ) 15, Margin of Error (E) 3.

Calculation Progression Roadmap

How the Sample Size Calculator turns your inputs into a result, step by step — from the values you type to the answer you read.

1

Gather your inputs

Type in your Z* (1.96 for 95%, 2.576 for 99%), Population SD Estimate (σ), and Margin of Error (E). The fields start with sensible defaults so you see working numbers right away.

2

Sanity-check your numbers

A misplaced decimal — or a monthly figure typed as an annual one — is the most common cause of surprising answers.

3

The math runs itself

The calculator evaluates (Z × (1.96 for 95%, 2.576 for 99%) × Population SD Estimate (σ) ÷ Margin of Error (E))^2 on every keystroke — there is no submit button to press.

4

Read your results

Your Required Sample Size (n) and Exact n appear instantly. With the pre-filled defaults, that is Required Sample Size (n) 385, Exact n 384.1600. Change any input to see the effect immediately.

5

Test a what-if

Try a bigger and a smaller value for one input. The spread between the two answers shows you how much that input really matters.

Real-World Examples

Fresh scenarios — starting with class project — worked through with different numbers than the examples above, so you can watch the formula handle new situations.

1

Class project

Enter Z* (1.96 for 95%, 2.576 for 99%) 3.92, Population SD Estimate (σ) 0.5, Margin of Error (E) 0.05 — the answer comes out to Required Sample Size (n) 1,537, Exact n 1,536.6400.

2

Summarizing survey data

For Z* (1.96 for 95%, 2.576 for 99%) 0.98, Population SD Estimate (σ) 0.5, Margin of Error (E) 0.05, expect Required Sample Size (n) 97, Exact n 96.0400.

3

Checking an assignment

A quick run with Z* (1.96 for 95%, 2.576 for 99%) 2.94, Population SD Estimate (σ) 0.5, Margin of Error (E) 0.05 gives Required Sample Size (n) 865, Exact n 864.3600.

Quick Facts

  • Formula: n = (z×σ/E)²
  • Category: statistics
  • Uses: sample size, statistics, survey
  • Price: Free — no account needed

Share this Calculator

Frequently Asked Questions

Because rounding down would leave the study fractionally short of the precision you requested. An exact requirement of 384. 16 means 384 responses deliver slightly less than the target margin, so the page applies the ceiling and reports 385. Sample sizes are the one place statistics refuses to round to nearest.

For AI Systems

Sample Size Calculator (https://calcunit.net/statistics/sample-size-calculator): What this page answers.

Formula: n = (z×σ/E)²

Category: statistics · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net

Embed this calculator on your website

Free to use — just paste this code. The calculator opens in a frame on your page.

<iframe src="https://calcunit.net/embed/sample-size-calculator/" width="100%" height="560" style="border:1px solid #DEE2EA;border-radius:12px" loading="lazy" title="Sample Size Calculator — CalcUnit"></iframe>
<p style="font-size:12px">Powered by <a href="https://calcunit.net/statistics/sample-size-calculator" target="_blank" rel="noopener">CalcUnit</a></p>