Determine Sample Size Calculator
Sample Size Calculator works out Recommended sample size and Unrounded requirement from Study design, What to calculate and Basis. The default figures on this page give recommended sample size of 385; change any entry and the result, the working and the sources update together.
Your figures
Updates as you typeHow this is worked out
3 steps
- alpha = 1 - 95/100 = 0.05, two-sided, so z(alpha) = 1.959963985.
- z(beta) for 80% power = 0.841621234.
- n = z^2 p(1-p) / e^2 = 3.841458821 x 0.25 / 0.0025 = 384.145882
Its 5 worked examples are re-run on every release, last on 15 September 2026. What changed
Sources and references
9 sources
What the Sample Size Calculator calculates
Computes the sample size needed for a survey proportion, a mean, a comparison of two proportions or two means, a paired study, a correlation, a noninferiority or equivalence trial, a log-rank survival study, a diagnostic-accuracy study or a cluster-randomised trial, and works backwards to the margin of error or the power of a sample you already have.
How to use this Sample Size Calculator
Enter Study design, What to calculate, Basis and Confidence level. Recommended sample size updates as you type, and “Use a worked example” loads checked figures you can adjust. Change one figure at a time to see what drives the result.
How the result is worked out
Open “How this is worked out” beside the result for the step-by-step calculation behind Recommended sample size, Unrounded requirement and Per group (group 1).
The method follows Cochran, W.G. (1977), Sampling Techniques, 3rd edition, Wiley, chapters 4 and 5, Raosoft Inc., Sample Size Calculator - stated formula, Fleiss, J.L., Levin, B. & Paik, M.C. (2003), Statistical Methods for Rates and Proportions, 3rd edition, Wiley, chapter 4, Chow, S.-C., Shao, J. & Wang, H. (2008), Sample Size Calculations in Clinical Research, 2nd edition, Chapman & Hall and Schoenfeld, D.A. (1983), "Sample-size formula for the proportional-hazards regression model", Biometrics 39(2), 499-503.
The classic survey: 95% confidence, +/-5%, unknown population example
With Study design: one-proportion, Confidence level: 95, Margin of error: 5, Expected proportion (group 1): 50, the calculator returns Recommended sample size: 385, Unrounded requirement: 384.145882, z for the confidence level: 1.95996398. This example is checked against an independent source in the test suite.
What you can compare
Change one input at a time to see how it affects Recommended sample size, Unrounded requirement and Per group (group 1). The inputs you can vary are Study design, What to calculate, Basis, Confidence level, Statistical power and Test sidedness.
Understanding Recommended sample size, Unrounded requirement and Per group (group 1)
Sample-size calculations for clinical, regulatory or published research should be confirmed by a qualified statistician against the actual analysis plan before a study is registered or a protocol is finalised.
Results are general information, not financial, tax, legal, medical or engineering advice. Check any decision that matters with a qualified professional.
See something wrong? Report a problem with this calculator
Frequently asked questions
How do I calculate my sample size?
Computes the sample size needed for a survey proportion, a mean, a comparison of two proportions or two means, a paired study, a correlation, a noninferiority or equivalence trial, a log-rank survival study. Open “How this is worked out” beside the result to see each step for your own figures.
Is there an app that can calculate sample size?
It needs Study design, What to calculate, Basis, Confidence level, Statistical power and Test sidedness. Nothing else is required, and the figures stay in your browser.
What is the 30 sample size rule?
On the figures this page opens with — confidence level 95%, expected proportion (group 1) 50%, margin of error 5% and population size 0 — the recommended sample size is 385. No single number fits everyone: change any figure above and the answer updates as you type, with each step of the arithmetic beside it.
Who calculator for sample size?
Computes the sample size needed for a survey proportion, a mean, a comparison of two proportions or two means, a paired study, a correlation, a noninferiority or equivalence trial, a log-rank survival study. On the figures this page opens with — confidence level 95%, expected proportion (group 1) 50% and margin of error 5% — the recommended sample size is 385. Put your own figures in their place and the working updates beside the result.
What information do I need for the Sample Size Calculator?
You need Study design, What to calculate, Basis, Confidence level, Statistical power, Test sidedness, Expected proportion (group 1) and Expected proportion (group 2). The page opens with default figures that give recommended sample size of 385, so you can see the scale before entering your own.
What does this Sample Size Calculator show?
It shows Recommended sample size, Unrounded requirement, Per group (group 1), Per group (group 2), Total across all groups, Recruit this many to allow for attrition, Required number of events and Design effect (DEFF), with the working and any warnings for your entries.
