Calculator

What the Sample Size Calculator does

Sample Size Calculator: calculates Sample Size (ceil) from z Critical, Estimated Proportion p and Margin of Error e. Example: z critical 1.96, estimated proportion p 0.5 and margin of error e 0.05 gives sample size (ceil) 385.

Give the Sample Size Calculator your z Critical, Estimated Proportion p and Margin of Error e and it works out Sample Size (ceil). There is no submit step; the numbers move as you adjust them.

It is mostly used by someone sanity-checking a spreadsheet. The method matters as much as the answer when you are still learning the topic.

Nothing leaves the tab. You can watch your browser network panel while you use it and see for yourself.

The field table, the method and a worked example are documented after the tool for anyone who wants to check the working.

What do the Sample Size Calculator fields mean?

The Sample Size Calculator uses 3 inputs. Rather than an empty form you get a filled one, useful when you only want to test a single change.

FieldWhat to enterDefault
z Critical required 1.96
Estimated Proportion p accepts 0 to 1 0.5
Margin of Error e required 0.05

How does the Sample Size Calculator work?

Sample Size (ceil) and What this means ← f(z Critical, Estimated Proportion p, Margin of Error e)

Each output is derived from the inputs above in a single pass; there is no hidden state carried between runs, so the same inputs always give the same calculation.

Inputs are validated before anything is computed, so a bad entry is reported rather than quietly producing a wrong answer.

Worked example

These are the values the Sample Size Calculator loads by default, and the result it produces from them. The defaults produce the result shown here; change any of them and the answer moves.

Inputs
z Critical1.96
Estimated Proportion p0.5
Margin of Error e0.05
Result
Sample Size (ceil)385
What this meansSuggested sample size ≈ 385

Beyond the formula: sample size for a proportion

The sample-size formula for estimating a proportion depends heavily on one input people often guess blindly (the estimated proportion p itself), and using p=0.5 (this calculator’s default) is a deliberate, conservative choice, since that’s the value requiring the largest sample for a given margin of error.

Common mistakes and sanity checks

  • If you have a genuine prior estimate for p (say, a pilot study showing a 20% response rate), plugging that in instead of the conservative 0.5 default can shrink the required sample size substantially, sometimes by half or more.
  • Required sample size scales with the square of how tight you want the margin of error. Halving the margin of error (say from 5% to 2.5%) roughly quadruples the sample size needed, not doubles it.
  • This formula assumes simple random sampling from a large, effectively infinite population. For surveying a small, finite population, a finite-population correction further reduces the required sample size.

How to use it

  1. Set z Critical.
  2. Put Estimated Proportion p (0 to 1).
  3. Key in Margin of Error e.
  4. Results update continuously rather than on submit.
  5. Check Sample Size (ceil) and What this means on the right.
  6. If you need a record, Copy Link saves the inputs and Print produces a clean page.

What this tool does not do

  • Very large or very small numbers hit JavaScript floating-point limits (about 15 significant digits).
  • Displayed values are rounded; the underlying calculation keeps full precision.
  • There is no history: reload the page and the previous run is gone.

Frequently asked questions

3 things: z Critical, Estimated Proportion p and Margin of Error e. A starting value is in place for each, so nothing is mandatory before you see a result.

Estimated Proportion p accepts 0 to 1. Go outside it and you get an error against that specific field instead of a misleading number.

With the values loaded when the page opens, sample size (ceil) comes out as 385. Edit any input and that figure moves with it.

No. Your browser is doing the computing, so we could not see the values even if we wanted to.

No cost and no account. Use it as often as you like.

It is exact within the stated method. Anything the method does not model is simply out of scope.

YoursTools Team
Product & Engineering

Builds and maintains every calculator on YoursTools.