Sample size is the question every study has to answer before it collects a single data point. Too small and the study cannot find the effect it was built to find, so a real difference is missed and the paper reads as a null result. Too large and you spend money and expose more participants than you needed to. The number that gets this right comes from four decisions you make in advance, and none of them need heavy maths.

1What sample size actually decides

The sample size sets how small an effect your study can reliably detect. A large trial can pick up a subtle difference. A small pilot can only detect a large one. This is why an underpowered study so often ends with a non-significant result that says nothing. The effect may be real, but the study was never big enough to see it. Deciding the size up front is what protects the whole project.

2The four things you decide first

Four inputs fix the sample size. The effect size, the smallest difference that would matter to you clinically. The variability of the outcome, usually its standard deviation. The significance level, alpha, almost always 0.05 two-sided. And the power, the chance of detecting the effect if it is really there, usually 80% or 90%. Change any one of them and the number moves, so they belong in the protocol and not in a footnote written after the fact.

The four inputs that fix your sample size δ Effect size to detect SD Outcome variability α Significance level 1−β Statistical power Sample size, n per group
Figure 1. Four inputs, one number. Fix the effect size, the variability, the significance level and the power, and the sample size follows. Move any one of them and the number moves with it.

3Two means or two proportions

Most simple comparisons fall into two families, and the family you are in decides the formula you use.

Two means δ the two means differ Two proportions 50% 70% a gap between two rates
Figure 2. The two most common comparisons. A difference between two means for a continuous outcome, and a gap between two rates for a yes or no outcome. Each has its own formula, but the four inputs are the same.

4Sample size or power, the two questions

The same relationship answers two questions. Before a study you fix the power you want and solve for the sample size you need. When the number of participants is capped by what is feasible, you fix that number and solve for the power it gives you. One caution here. Computing power from the effect you actually observed, so-called post-hoc power, tells you nothing new, and reviewers will say so. Power belongs to the planning stage.

Power grows with the sample size Power Participants per group 80% target n = 63 underpowered well powered
Figure 3. Power is not fixed, it grows with the sample. A study below the curve can miss a real effect. The convention is to choose the smallest sample that reaches 80% power for the effect you care about.

5The mistakes reviewers catch

A few errors come up again and again, and each is visible from the methods section alone. Hold your own plan against the short list before you submit.

Five sample size errors reviewers catch A sample size with no justification at all A one-sided test chosen only to lower the number An effect size picked to be easy, not clinically meaningful No allowance for dropout, so the study ends underpowered Post-hoc power used to explain away a null result
Figure 4. Every item here is a planning error, not an analysis that is merely hard. Each is visible from the methods section alone, which is exactly why reviewers find them so fast.

6Calculate your sample size in seconds, free

You can work out the number with our free sample size and power calculator. Pick two means or two proportions, enter your effect size and assumptions, and it returns the participants you need per group along with a paste-ready sentence and the matching R code. Everything runs in your browser. The harder designs, survival, clustered, adaptive or multi-arm, need more than a formula, and that is exactly where a statistician earns their fee.