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.
3Two means or two proportions
Most simple comparisons fall into two families, and the family you are in decides the formula you use.
- A continuous outcome, such as blood pressure or a lab value, means you are comparing two means. The calculation uses the difference you want to detect and the standard deviation.
- A yes or no outcome, such as response or survival at one year, means you are comparing two proportions. The calculation uses the two rates you expect.
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.
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.
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.