G*Power Sample Size Calculator
Estimate the required sample size for your study based on key statistical power parameters.
The standardized magnitude of the effect you expect. Common values are 0.2 (small), 0.5 (medium), and 0.8 (large).
The probability of finding an effect if it truly exists. Enter as a decimal (e.g., 0.80 for 80%).
The probability of a Type I error (false positive). Enter as a decimal (e.g., 0.05 for 5%).
Select one-tailed if your hypothesis is directional (e.g., Group A > Group B), otherwise use two-tailed.
Sample Size vs. Effect Size
Sample Size at Different Power Levels
| Power (1 – β) | Required Total Sample Size |
|---|---|
| 0.80 | — |
| 0.85 | — |
| 0.90 | — |
| 0.95 | — |
What is Using G*Power to Calculate Sample Size?
Using G*Power to calculate sample size is the process of performing an *a priori* power analysis to determine the minimum number of participants needed in a study to detect an effect of a certain size at a desired level of statistical power. G*Power is a free, specialized software tool widely used in the social, behavioral, and biomedical sciences to conduct various types of power analyses. Power analysis is a critical step in research design, as it helps prevent Type II errors (failing to detect a real effect) by ensuring the study is adequately “powered.”
Essentially, before you collect any data, you specify how large of an effect you expect to find (effect size), how certain you want to be that you’ll find it if it’s there (power), and your threshold for statistical significance (alpha). G*Power then calculates the sample size required to meet these criteria. This proactive approach to sample size justification is a hallmark of rigorous scientific research and is often required by grant-funding agencies and ethics boards.
The Formula and Explanation for Sample Size Calculation
While G*Power handles many complex calculations, a common analysis is for a two-sample t-test. The calculator on this page uses a formula to approximate the sample size per group (n) for this test:
n = 2 * ( (Z_alpha/2 + Z_beta) / d )^2
This formula is a cornerstone of using G*Power to calculate sample size for comparing two independent groups. It balances the risks of false positives and false negatives against the magnitude of the effect you’re looking for.
Variables Table
| Variable | Meaning | Unit | Typical Range |
|---|---|---|---|
| n | Sample size per group | Participants | Calculated value |
| d | Cohen’s Effect Size | Standard deviations (unitless) | 0.2 – 0.8 |
| Zα/2 | Z-score for the significance level (alpha), adjusted for a two-tailed test. | Standard deviations | 1.96 for α=0.05 |
| Zβ | Z-score for the desired statistical power (1 – beta). | Standard deviations | 0.84 for Power=0.80 |
Practical Examples
Example 1: Medium Effect Size
A clinical researcher plans a study to see if a new drug lowers blood pressure more than a placebo. Based on prior research, they expect a medium effect size.
- Inputs: Effect Size (d) = 0.5, Power = 0.80, Alpha = 0.05, Tails = Two-tailed
- Results: The calculator shows a required total sample size of 128 participants (64 in the drug group and 64 in the placebo group).
Example 2: Small Effect Size
A psychologist is testing a new subtle cognitive intervention. They hypothesize it will have a small but meaningful effect on memory recall.
- Inputs: Effect Size (d) = 0.2, Power = 0.80, Alpha = 0.05, Tails = Two-tailed
- Results: To reliably detect this smaller effect, the required total sample size jumps to 788 participants (394 per group). This demonstrates the crucial relationship between effect size and sample size.
For more on this topic, see this article on statistical power analysis.
How to Use This G*Power Sample Size Calculator
- Enter Effect Size (d): Estimate the expected effect size of your intervention. If unsure, use conventions: 0.2 for a small effect, 0.5 for medium, and 0.8 for large.
- Set Statistical Power: The standard for most fields is 0.80 (or 80%). This means you have an 80% chance of detecting a true effect. Higher power (e.g., 0.90) requires more participants.
- Choose Significance Level (α): This is your p-value threshold, almost universally set at 0.05.
- Select Test Type: Choose ‘Two-tailed’ unless you have a strong, pre-specified directional hypothesis (e.g., you are certain the effect can only go in one direction).
- Interpret Results: The primary result is the ‘Total Sample Size’ needed for your study. The calculator also provides the size per group and a dynamic chart and table illustrating how sample size changes with other parameters.
Key Factors That Affect Sample Size Calculation
- Effect Size: This is the most influential factor. Detecting smaller effects requires exponentially larger sample sizes.
- Statistical Power (1 – β): Increasing power from 80% to 90% or 95% will increase the required sample size, as you’re demanding greater certainty in your ability to find an effect.
- Significance Level (α): A stricter alpha (e.g., 0.01 instead of 0.05) makes it harder to achieve statistical significance, thus requiring a larger sample size to reach that threshold.
- One-tailed vs. Two-tailed Test: A one-tailed test is more powerful and requires fewer participants, but it’s only appropriate if an effect in the opposite direction is impossible or of zero interest.
- Variability in the Data (Standard Deviation): Higher variability within the population necessitates a larger sample to detect a consistent effect. Our calculator uses a standardized effect size (Cohen’s d) which already accounts for this.
- Study Design: The statistical test used (e.g., t-test, ANOVA, regression) changes the formula. This calculator is specifically for a two-independent-group comparison, a common scenario for using G*Power.
Understanding these factors is key to planning effective research. For a deeper dive, consider this resource on effect size for sample size calculation.
Frequently Asked Questions (FAQ)
- What is a good power level for a study?
- A power of 0.80 (80%) is the widely accepted minimum standard in many fields. This represents a 4:1 trade-off between the risk of a Type II error (beta = 0.20) and a Type I error (alpha = 0.05).
- What if I don’t know my effect size?
- If you cannot conduct a pilot study or find comparable literature, the conventional approach is to use Cohen’s guidelines: d=0.2 (small), d=0.5 (medium), or d=0.8 (large). It’s often wise to calculate sample sizes for all three to understand the range needed.
- Why is this called an ‘a priori’ power analysis?
- ‘A priori’ means ‘from the former’ in Latin. This analysis is done *before* data collection to plan the sample size. This is different from a ‘post hoc’ analysis, which is done after the study and is generally considered less useful.
- Does this calculator work for all statistical tests?
- No. This calculator is specifically for an independent samples t-test. G*Power software itself can handle many other tests, such as ANOVAs, regressions, and chi-squared tests.
- Is a bigger sample size always better?
- Not necessarily. While a larger sample size increases power, it also increases the cost, time, and ethical considerations of the study. The goal of using G*Power to calculate sample size is to find the *optimal*, not the maximum, number of participants.
- What is the difference between power and significance?
- Significance (alpha) is the probability of finding an effect that isn’t real (a false positive). Power is the probability of finding an effect that *is* real (a true positive).
- Should I account for dropouts?
- Yes. The calculated sample size is the number you need to have *complete data for* at the end of the study. You should inflate your initial recruitment target to account for expected attrition (e.g., if you expect a 20% dropout rate, divide your target sample size by 0.80).
- Where can I download the actual G*Power software?
- The official G*Power software can be downloaded for free from the Heinrich-Heine-University Düsseldorf website.
Related Tools and Internal Resources
Explore other statistical and financial calculators to aid in your research and planning:
- p-value calculator: Understand the statistical significance of your results.
- confidence interval calculator: Calculate the range in which the true population parameter likely lies.
- standard deviation calculator: Measure the variability in your dataset.
- roi calculator: Evaluate the return on investment for your projects.