STATISTICS CALCULATOR

Sample Size Calculator

Calculate the sample size needed for a target margin of error, with the finite population correction.

Reviewed by the Calculator.nu math team
Updated August 2026
percentage points
%
Sample size needed
1067
With finite population correction
1045
Sample needed to halve the margin
4268

The formula

n = z² × p(1 − p) ÷
# finite correction: n ÷ (1 + (n − 1) ÷ N)

How to calculate sample size

Sample size is driven by the precision you want, not by the size of the population. That is the counterintuitive result at the heart of survey design: 1,000 people gives similar precision for a town or a country.

When the expected proportion is unknown, use 50% — it maximises p(1 − p) and therefore gives the most conservative sample size. Any other value produces a smaller requirement.

Here is what each field means:

  • Target margin of error (percentage points)
  • Expected proportion (%) — use 50 when unknown — it needs the largest sample
  • z-score for the confidence level
  • Population size

Everything recalculates as you type, and the numbers in the address bar update with it, so a link to this page carries your figures with it.

The calculation runs on exactly the numbers currently in the fields above, recomputed in full each time — there is no dependency on the order values are entered in, so adjusting one input to test a scenario and then changing it back leaves the result exactly where it started.

Why sample size matters

The formula behind sample size is standard and appears in the same form across textbooks and reference material; what a calculator adds is speed and the ability to see instantly how the result responds to a change in any one of the inputs, which is far slower to do by hand.

Beyond a single check, the same calculation is worth rerunning whenever a measured input changes — a new reading, a corrected value, an updated assumption — since the result here always reflects exactly what is currently in the fields above rather than a value calculated once and then left stale.

It is worth remembering that a formula is only ever as good as the assumptions built into it, and most of the standard equations used across science and statistics carry at least one simplifying assumption — a linear approximation, an idealised gas, a normally distributed error term — that holds well in most ordinary cases and breaks down at the extremes. The result here reflects the standard formula exactly; whether that formula's assumptions are appropriate for your particular situation is a separate judgement worth making deliberately rather than assuming automatically.

It is worth keeping a note of which inputs were used to produce a given result, particularly where the figure is going into a report or a further calculation — reproducing a result later, or explaining how it was reached, is far easier with the original inputs to hand than by trying to reverse-engineer them from the output alone.

Worked example

Work through the defaults on this page:

  • Target margin of error: 3 percentage points
  • Expected proportion: 50 %
  • z-score for the confidence level: 1.96
  • Population size: 50,000

That gives:

  • Sample size needed: 1,067
  • With finite population correction: 1,045
  • Sample needed to halve the margin: 4,268

The figures above are the calculator's own default values, shown purely so the working is visible rather than hidden — the same steps apply exactly to your own numbers, entered in the fields at the top of this page.

Reading the result

The third output shows the cost of precision. Halving the margin of error requires four times the sample, which is why surveys cluster around ±3 points rather than ±1.

Where this goes wrong. This gives the number of completed responses needed, not invitations to send. At a 20% response rate you would need to contact five times as many people, and non-responders differ systematically from responders.

A result that is wrong by an exact factor of ten, a hundred or a similar round number is almost always a units error rather than a mistake in the formula itself — checking each input against the unit stated beside it is the fastest way to track it down.

For ±3 points, about 1,067 responses; for ±5 points, about 384. Both assume a 50% expected proportion and a large population.

Hardly at all beyond a few thousand. The finite population correction matters only when the sample is a substantial fraction of the whole group.

The answer it gives you is sample size needed. With 3 percentage points target margin of error, 50 % expected proportion and 1.96 z-score for the confidence level, that comes to 1,067. Change any field and the figure moves with it.

Generally, no more than the least precise input justifies — a result reported to six decimal places from inputs measured to two significant figures is implying a precision the calculation does not actually have. The calculator shows full precision so you can round appropriately for your own use.

Yes — the equation shown in the formula section above is the standard form used in textbooks and reference material for this calculation, not a simplified or approximate version.

Yes, in the sense that it applies the correct standard formula and returns an accurate result for the inputs given — but check your own course or publication's requirements for how results should be rounded, presented and referenced, since those conventions vary and are not something a calculator can know on your behalf.

Was this calculator helpful?

Tap a star to rate it. Your feedback helps us improve the tools people rely on most.