Sample size for a proportion calculator

The Sample size for a proportion calculator computes sample size for a proportion from the relation n = z^2 p(1-p) / E^2. It takes 3 inputs (z* (e.g. 1.96), expected proportion, margin of error) and returns the required sample size. Because this is a pure mathematical or physical formula rather than a jurisdiction-specific rule, the result never changes over time: the same inputs always produce the same answer, so you can rely on it whether you are checking homework, sizing a design, or sanity-checking another tool. Enter your values in the fields below and the result updates instantly; you can also share a permalink that pre-fills the exact calculation, which is useful for teaching, reports, or collaboration. For example, with z* (e.g. 1.96) = 2, expected proportion = 0.5, margin of error = 0.1, the required sample size works out to 100, and the worked example further down the page shows every step so you can follow the arithmetic and reproduce it by hand. The method is the standard form documented by NIST/SEMATECH e-Handbook of Statistical Methods, and the figure above each result carries the date it was last verified. This tool is general information and is not a substitute for professional engineering, medical, financial, or scientific advice; always check critical results against the primary source and your own judgement.

With z* (e.g. 1.96) = 2, Expected proportion = 0.5, Margin of error = 0.1, the result is 100.

Formula: n = z^2 p(1-p) / E^2. Source: NIST/SEMATECH e-Handbook of Statistical Methods, as at 2026-06-22.

Required sample size100

Applies to: any numeric inputs. Method source: NIST/SEMATECH e-Handbook of Statistical Methods, checked 2026-06-22.

The formula

n = z^2 p(1-p) / E^2

Worked example

With z* (e.g. 1.96) = 2, Expected proportion = 0.5, Margin of error = 0.1:

  1. n = z^2 p(1-p) / E^2
  2. Required sample size = 100

This worked example is one of the automated golden-value tests this calculator must pass before it can publish.

What this assumes

  • Inputs are real numbers in the units shown.
  • The result is the exact value of n = z^2 p(1-p) / E^2; general information, not professional advice.

Frequently asked questions

What formula does this use?

n = z^2 p(1-p) / E^2, the standard form documented by NIST/SEMATECH e-Handbook of Statistical Methods.

Does the result ever change over time?

No. This is a pure formula with no external rate, so the same inputs always give the same result.

Official sources and verification

Reviewed by the CalculatorHub team, edited by James Graham, 2026-06-22. See our methodology. General information, not professional advice.