Calculate the required sample size for your study using power analysis. Supports t-tests, ANOVA, correlation, chi-square, and proportion tests.
Sample size calculation (also called power analysis) determines the minimum number of participants needed for a study to detect a meaningful effect. It is a critical step in research planning — too few participants and you risk missing a real effect (Type II error); too many and you waste time and resources. Most IRBs (Institutional Review Boards) and grant agencies require a formal power analysis as part of the research proposal.
Every power analysis involves four interconnected parameters. If you know any three, you can solve for the fourth. In practice, researchers most commonly fix alpha, power, and effect size to solve for sample size (N).
1. Effect Size (d, f, r, or w)
The expected magnitude of the effect you want to detect. Larger effects require fewer participants. Use Cohen's d for t-tests, Cohen's f for ANOVA, r for correlation, and Cohen's w for chi-square tests. If you don't know the expected effect size, use conventions: small, medium, or large.
2. Significance Level (α)
The probability of a Type I error — rejecting the null hypothesis when it is actually true (a false positive). The conventional level is α = .05, meaning a 5% chance of incorrectly declaring significance.
3. Statistical Power (1 - β)
The probability of correctly detecting a real effect — avoiding a Type II error (a false negative). The conventional minimum is .80 (80%), meaning an 80% chance of finding the effect if it truly exists. Some fields recommend .90 or higher.
4. Sample Size (N)
The total number of participants required. This is typically the unknown you solve for. More participants increase power but also increase cost and time.
Jacob Cohen (1988) established widely-used conventions for small, medium, and large effect sizes. Use these when you lack pilot data or prior research to estimate the expected effect.
| Test | Measure | Small | Medium | Large |
|---|---|---|---|---|
| T-tests | Cohen's d | 0.20 | 0.50 | 0.80 |
| ANOVA | Cohen's f | 0.10 | 0.25 | 0.40 |
| Correlation | r | 0.10 | 0.30 | 0.50 |
| Chi-square | Cohen's w | 0.10 | 0.30 | 0.50 |
| Proportions | Cohen's h | 0.20 | 0.50 | 0.80 |
A researcher plans to compare exam scores between two teaching methods. Based on prior literature, they expect a medium effect size (Cohen's d = 0.50). They set α = .05 and power = .80.
Parameters
Result
Required sample size: N = 128 (64 per group)
A power analysis for an independent-samples t-test was conducted using an effect size of d = 0.50, α = .05, and power = .80. The required sample size is N = 128 (64 per group).
Include the power analysis in the Participants or Method section of your paper. State the test type, effect size, alpha level, desired power, and resulting sample size.
T-Test Example
An a priori power analysis for an independent-samples t-test was conducted using StatMate (Cohen's d = 0.50, α = .05, power = .80). The required minimum sample size was determined to be N = 128 (64 per group).
ANOVA Example
A power analysis for a one-way ANOVA with 4 groups was conducted using Cohen's f = 0.25 (medium effect), α = .05, and power = .80. The minimum required sample size wasN = 180 (45 per group).
StatMate's sample size calculations use the standard normal approximation method with exact z-scores from the jStat library. For t-tests, the formula is n = (zα/2 + zβ)2 × 2 / d2. Achieved power is computed by back-solving using the calculated sample size. Results have been validated against G*Power and R's pwr package.
T-Test
Compare means between two groups
ANOVA
Compare means across 3+ groups
Chi-Square
Test categorical associations
Correlation
Measure relationship strength
Descriptive
Summarize your data
One-Sample T
Test against a known value
Mann-Whitney U
Non-parametric group comparison
Wilcoxon
Non-parametric paired test
Regression
Model X-Y relationships
Multiple Regression
Multiple predictors
Cronbach's Alpha
Scale reliability
Logistic Regression
Binary outcome prediction
Factor Analysis
Explore latent factor structure
Kruskal-Wallis
Non-parametric 3+ group comparison
Repeated Measures
Within-subjects ANOVA
Two-Way ANOVA
Factorial design analysis
Friedman Test
Non-parametric repeated measures
Fisher's Exact
Exact test for 2×2 tables
McNemar Test
Paired nominal data test
Enter your data and click Calculate
or click "Load Example" to try it out