Sample Size Calculator (Power Analysis)
Estimate the minimum sample size required for a two-sample, two-sided test with equal group sizes using basic power analysis. This tool is often used when planning clinical trials, surveys, and field studies.
Common values include α = 0.05 for a 5% significance level in two-sided tests.
Power is the probability of detecting an effect if it is truly present. 80% is a common planning target.
Cohen's d is the difference in means divided by the standard deviation. Rough guidelines: 0.2 (small), 0.5 (medium), 0.8 (large).
You may also like:
How This Sample Size Power Calculator Works
Determining an appropriate sample size is a key step in designing any study, whether it is a clinical trial, a survey, or a field experiment. Collecting too few observations can make it difficult to detect meaningful effects, while collecting far more data than necessary can use time and resources without added benefit. This Sample Size Calculator uses a simple power analysis framework to estimate the minimum number of participants needed per group for a two-sample, two-sided test with equal group sizes.
The calculation is based on three core inputs: the significance level (α), the desired power (1 − β), and the effect size expressed as Cohen's d. The significance level controls the probability of a Type I error, or false positive, and is often set at 0.05 for conventional two-sided tests. Power represents the probability of detecting an effect of a given size when it is truly present. Many study designs target 80% or 90% power as a balance between sensitivity and feasibility. Cohen's d captures the size of the difference between two means in standard deviation units, with values around 0.2, 0.5, and 0.8 sometimes described as small, medium, and large effects in many contexts.
Under these assumptions, the required sample size per group is approximated using z-scores for the chosen significance level and desired power. The formula combines z1−α/2 for the two-sided test with zpower for the target power, and divides by the squared effect size. The calculator then rounds the result up to the next whole number and doubles it to obtain the total sample size across both groups. This is a commonly taught approach in introductory power analysis and is suitable for early planning and classroom use.
In practice, real studies may involve additional design features such as unequal group sizes, covariates, clustering, non-normal outcome distributions, or time-to-event endpoints. Those situations often require more specialized formulas or simulation-based power analysis. The present tool focuses on a straightforward two-group comparison and is intended to give researchers, students, and teams a quick and transparent starting point for thinking about sample size. It should not be used as a substitute for professional guidance when making high-stakes decisions in clinical, regulatory, or policy settings.
Frequently Asked Questions
What is statistical power?
Statistical power is the probability that a study will detect an effect of a specified size if that effect is truly present in the population. Higher power reduces the chance of missing real effects, but usually requires larger sample sizes.
How should I choose the significance level α?
Many studies use α = 0.05 for two-sided tests, meaning there is a 5% Type I error rate under the assumptions of the model. Some situations may justify more conservative choices such as α = 0.01. The decision should be guided by the study goals and relevant standards in your field.
What is Cohen's d?
Cohen's d is a standardized effect size used for comparing two means. It is defined as the difference in group means divided by the pooled standard deviation. Specifying d helps translate a practical difference of interest into a quantity that can be used in power calculations.
Is this calculator enough for complex study designs?
This tool is designed for a simple two-sample, two-sided comparison with equal group sizes. More complex designs, such as clustered trials, longitudinal studies, or non-standard endpoints, typically require tailored methods or specialist software. When study decisions have important clinical or policy implications, consulting a statistician is recommended.