What this calculator does
A proportion test asks whether a proportion differs from a fixed value, or whether two groups differ from each other. This page answers the planning question that comes before it: how many observations do I need? Give it the effect size you want to be able to detect, the significance level and the power you want, and it returns the smallest sample that reaches that power.
If you already have your sample sizes and want the power they give you, use the proportion power calculator instead.
The effect size is Cohen's h, not a difference in proportions
For proportions the effect size is h, the difference between the two values after the arcsine transform:
h = 2·arcsin(√p₁) − 2·arcsin(√p₂)
Cohen's conventions are 0.2 small, 0.5 medium and 0.8 large. Use the Calculate h button if you would rather enter two proportions and let the page do the transform.
The transform matters, and this is the part readers most often find surprising: the same gap between two proportions is a bigger effect near 0 or 1 than it is near 0.5. Going from 0.05 to 0.10 is h = 0.191, while going from 0.50 to 0.55 is only h = 0.100 — both are five percentage points, but the first is twice the effect and needs about a quarter of the sample. That is not an artefact of the formula: a proportion near 0.5 simply varies more from sample to sample, so a small shift there is harder to see.
One sample or two
With one sample you are comparing an observed proportion against a fixed number you already believe — a published rate, a contractual threshold, a previous year. The answer is the number of observations you need.
With two samples you are comparing two groups you will both collect. The power then depends on the effective sample size n₁n₂/(n₁+n₂), which is why two groups of 100 are worth roughly the same as one sample of 50. By default the page finds one balanced group size; the allocation ratio under More options lets you fix the second group at a multiple of the first, for designs where one group is cheaper or more plentiful than the other.
What the answer assumes
The power comes from a normal approximation — the arcsine transform is what makes it work, by holding the variance roughly constant across the range of p. It is accurate at the sample sizes this page usually returns. Where it can drift is at very small samples, or with proportions very close to 0 or 1.
A useful check once you have the answer: the expected number of both outcomes, np and n(1−p), should be at least about 10 in every group. If your proportion is 0.02 and the answer is 300, you expect only 6 events, and an exact method such as a binomial test will describe the study better than this approximation does.
How to read the power curve
The curve shows the power the test would have at every sample size, with your target marked as a dashed line and the answer marked on the curve. Hover it to read the power at any n. The curve is steep at first and then flattens: past a certain point extra observations buy very little power, which is usually the most useful thing the picture tells you.
If the required sample size is impractical
Small effects need large samples, and for proportions the demand grows quickly: h = 0.2 at 80% power needs about 200 observations, while h = 0.1 needs about 785. If the answer is out of reach, the honest options are to accept a lower power, to target a larger effect, or to ask whether a difference that small is one you need to detect at all. Raising α also works, at the cost of more false positives.
Related calculators
- Proportion power calculator — the power of a design you already have.
- One sample proportion test — run the test itself on your data.
- Two sample proportion test
- Effect size calculator
- Confidence interval sample size — for estimating a proportion rather than testing it.
- All sample size calculators
- What statistical power means