G*Power Sample Size Calculator
An easy-to-use tool for calculating the required sample size for your research study, inspired by the principles of G*Power.
Results
Total Sample Size (N)
Per Group: 64 participants
Formula: A priori power analysis for an independent samples t-test.
What is Calculating Sample Size Using G*Power?
Calculating sample size is a critical step in designing a research study. A sample size that is too small may fail to detect a real effect, leading to a Type II error (a false negative), while a sample that is too large wastes resources and may expose more participants to unnecessary risk. G*Power is a free, specialized software program widely used by researchers to perform accurate and flexible power analyses. The process of calculating sample size using G*Power involves determining the minimum number of participants needed to have a high probability of detecting a statistically significant effect of a certain size, given a specific level of risk for making an error.
This process is also known as an a priori power analysis. It requires the researcher to specify several key parameters: the desired statistical power (1-β), the significance level (α), and the expected effect size. By inputting these values, G*Power (and this calculator) can provide an estimate that helps ensure a study is neither underpowered nor overpowered, but just right for its scientific goals. For more on the fundamentals, see our statistical power analysis guide.
Sample Size Formula and Explanation
While G*Power uses complex algorithms involving non-central distributions, the core logic for a two-group independent samples t-test can be approximated with formulas based on Z-scores. The formula calculates the required sample size per group (n) based on the inputs.
A simplified but effective formula for calculating the sample size per group (n) is:
n = 2 * ( (Zα/2 + Zβ)2 * σ2 ) / Δ2
This can be simplified further by using Cohen’s d (effect size), where d = Δ/σ. The formula becomes:
n = 2 * (Zα/2 + Zβ)2 / d2
The total sample size (N) is simply 2 * n for two equal groups. Our calculator uses this principle to provide an accurate estimation. Understanding the inputs is key to a good effect size calculation.
| Variable | Meaning | Unit | Typical Range |
|---|---|---|---|
| n | Sample size per group | Subjects/Participants | Calculated value |
| Zα/2 | Z-score for the significance level (two-tailed) | Standard Deviations | 1.96 for α=0.05 |
| Zβ | Z-score for the statistical power | Standard Deviations | 0.84 for Power=0.80 |
| d | Cohen’s d (Effect Size) | Unitless ratio | 0.2 (small) to 0.8+ (large) |
Practical Examples
Example 1: Clinical Drug Trial
A team of researchers is planning a study to test a new antidepressant drug against a placebo. They hypothesize that the new drug will have a medium effect on reducing depression scores.
- Inputs:
- Effect Size (d): 0.5 (medium)
- Significance Level (α): 0.05
- Statistical Power (1-β): 0.80
- Tails: Two-tailed
- Results:
- Required Sample Size per Group (n): 64
- Total Required Sample Size (N): 128
The researchers need to recruit 128 participants in total (64 in the drug group and 64 in the placebo group) to have an 80% chance of detecting a medium-sized effect if one truly exists.
Example 2: Educational Intervention Study
An educational psychologist wants to evaluate if a new teaching method improves math scores more than the standard method. Based on prior research, they expect a small effect. They want to be very confident in their ability to detect the effect, so they aim for higher power.
- Inputs:
- Effect Size (d): 0.3 (small-to-medium)
- Significance Level (α): 0.05
- Statistical Power (1-β): 0.90
- Tails: Two-tailed
- Results:
- Required Sample Size per Group (n): 234
- Total Required Sample Size (N): 468
To achieve 90% power to detect a small effect of d=0.3, the psychologist needs a much larger sample: 468 students in total. This illustrates how detecting smaller effects requires a larger sample, a crucial part of any research study design.
Sample Size vs. Effect Size
How to Use This G*Power Sample Size Calculator
- Select the Statistical Test: Choose the test family that matches your research design (e.g., t-Tests for comparing two groups).
- Enter Effect Size (Cohen’s d): Input the expected effect size. If you are unsure, use established conventions (0.2 for small, 0.5 for medium, 0.8 for large) or conduct a pilot study. Explore our t-test sample size resources for more info.
- Set Significance Level (α): This is your risk of a false positive. 0.05 is the most common choice in many fields.
- Set Statistical Power (1-β): This is your desired probability of finding a true effect. 0.80 (or 80%) is a standard goal.
- Choose Tails: Select ‘Two-tailed’ unless you have a strong, directional hypothesis (e.g., you are certain the effect can only go in one direction).
- Interpret the Results: The calculator will instantly show the ‘Total Sample Size (N)’ required for your study and the number of participants needed ‘Per Group’.
Key Factors That Affect Sample Size
- Effect Size: This is the most critical factor. Larger effects are easier to detect and require smaller sample sizes. Smaller effects require much larger samples to be found reliably.
- Statistical Power (1-β): Higher power (e.g., 90% or 95% instead of 80%) requires a larger sample size because you are increasing the certainty of detecting an effect.
- Significance Level (α): A lower (more stringent) alpha level (e.g., 0.01 instead of 0.05) makes it harder to declare a result significant, thus requiring a larger sample size to reach that threshold.
- Variability in the Population: Higher variance (more “noise” in the data) makes it harder to spot a true effect, thus increasing the required sample size. This is implicitly included in the effect size calculation.
- One-tailed vs. Two-tailed Test: A one-tailed test has more power to detect an effect in a specific direction, so it requires a slightly smaller sample size than a two-tailed test. However, two-tailed tests are generally preferred for their rigor.
- Allocation Ratio: While this calculator assumes equal group sizes (Allocation Ratio = 1), unequal groups require a larger total sample size to maintain the same power. G*Power’s full software allows you to adjust this.
Frequently Asked Questions (FAQ)
If there’s no prior research, you can run a small pilot study to estimate it. Alternatively, decide on the smallest effect size that would be clinically or practically meaningful. If all else fails, using a conventional medium effect size (d=0.5) is a common starting point for an a priori sample size calculation.
It represents a convention that balances the risk of a Type II error (20% chance of a false negative) against the practical constraints of recruiting participants. It implies a 4:1 trade-off between the risk of a false negative (Beta) and a false positive (Alpha, typically 5%).
This calculator is a simplified tool for the most common scenario: an a priori sample size calculation for an independent t-test. The full G*Power software offers a much wider range of statistical tests (ANOVA, regression, chi-square, etc.), types of power analysis (post-hoc, sensitivity), and more detailed input options.
No. The calculated sample size is the number of participants you need to complete the study. You should always recruit more participants than the required sample size to account for expected dropouts. For example, if you expect a 20% dropout rate, you should increase the calculated sample size by about 25% (N / (1 – 0.20)).
While the calculator is primarily designed for a two-group t-test, the principles are similar for a one-way ANOVA. For a precise calculation, especially with more than two groups, you should use the full G*Power software and select the F-test family. An ANOVA power calculator would provide more precise results.
Cohen’s d is a standardized effect size. It represents the difference between two means in terms of standard deviations. For example, d=0.5 means the difference between the two group averages is half a standard deviation. This standardization allows for comparison across different studies and measures.
A p-value is the probability of observing your data (or more extreme data) if the null hypothesis (no effect) is true. If your p-value is less than your alpha level (e.g., p < 0.05), you reject the null hypothesis. Power analysis ensures you have a large enough sample to get a small p-value when a true effect exists. For a deeper dive, read our guide on understanding p-values.
Not necessarily. While a larger sample size increases power, there are diminishing returns. An excessively large sample is wasteful of time and money and can make trivial effects appear statistically significant. The goal of a power analysis is to find an optimal, not maximal, sample size.