Statistics & genetics

Sample Size & Power Calculator

Find the number of subjects or pairs for a t-test, or the group size for a two-proportion test, with exact noncentral-t power and a power table.

Sample Size & Power CalculatorRuns in your browser; nothing is uploaded
Checking your sign-in…

Learn the method behind this result in Biostatistics & Experimental Design, a Vedicgen course with a certificate · from ₹6,999 + GSTView course

What a sample size calculation answers

A power calculation states how many subjects are needed to detect an effect of a given size, with a stated false-positive rate and a stated chance of success. Alpha is the probability of claiming an effect that is not there (a type I error); power, 1 − β, is the probability of finding one that is. A study with 80 % power misses one true effect in five, so 80 % is a floor rather than a target to be proud of.

The calculation needs an effect size, and the effect size must come from outside it: a pilot experiment, a published estimate or the smallest difference that would change a decision. Using the effect you hope for rather than the effect you expect is the most common way sample sizes become fiction.

t-tests: the exact noncentral-t calculation

For a two-sample t-test the standardised effect is Cohen’s d, the difference between the means divided by their common standard deviation. Under the alternative hypothesis the test statistic follows a noncentral t distribution with df = 2n − 2 and noncentrality d·√(n/2) for n per group. Power is the probability that this statistic falls beyond the critical value: 1 − F(tcrit; df, ncp) + F(−tcrit; df, ncp) for a two-sided test.

For a paired or one-sample test, d is the mean difference divided by the SD of the differences, df = n − 1 and the noncentrality is d·√n; n is then the total number of pairs, not the number per group. The tool finds the smallest integer n whose exact power reaches the target, and shows the power at nearby n so you can see how steep the curve is.

Two proportions and the assumptions

For two independent proportions the usual planning formula uses the normal approximation: n = (z₁₋α/₂·√(2·p̄·(1−p̄)) + z_power·√(p₁(1−p₁) + p₂(1−p₂)))² ÷ (p₁ − p₂)², where p̄ is the average of the two proportions, rounded up. It is a good approximation when the expected counts are large and the proportions are not near 0 or 1; with small counts or rare events, plan from an exact test instead, which generally needs more subjects.

All three modes assume independent observations, equal group sizes and a correct model. They do not account for dropout, clustering, multiple comparisons or non-compliance: inflate the answer for expected loss to follow-up, and correct alpha when you test several endpoints. This is a planning aid only; it assumes equal group sizes, normal data and equal variances.

Cite, link or share this tool

Cite this tool

Solagene. Sample Size & Power Calculator [online tool]. Nayancode, Solagene; 2026. Available at: https://solagene.com/nayancode/tools/sample-size-calculator/ (accessed 2026-11-23).

Add it to your lab or course page

<a href="https://solagene.com/nayancode/tools/sample-size-calculator/" title="Free Sample Size & Power Calculator by Solagene">Sample Size & Power Calculator</a> (free, runs in your browser) by <a href="https://solagene.com/">Solagene</a>

FAQ

Frequently asked questions

Not answered here? Send us your question and we will reply by e-mail.

The smallest effect that would matter clinically or biologically, estimated from pilot or published data, not the largest one you hope to see. If you have difference and SD rather than d, switch the effect-size control and enter them directly; the calculator forms d for you.

Some tools use the normal approximation or a simple formula rather than the exact noncentral t, and some use a one-sided test or a different default power. This page computes exact t power and searches for the first integer n that reaches your target, so small differences are expected. Compare the assumptions before comparing the numbers.

No. The calculation runs in your browser with JavaScript. Nothing you enter is sent to a server.

Work with us

Want this done for you?

Send us your data and a short note. We reply with a fixed price.

Sent securely to Solagene. Your details are used only to answer this request.

Or order directly: Order an analysis.