Determining the right sample size is one of the most important steps in planning a statistical study. A sample that is too small may fail to detect a meaningful effect, while an unnecessarily large sample can consume additional time, money, participants, and resources. The G*Power Sample Size Calculator helps researchers estimate the number of participants needed for a two-group comparison based on an expected effect size, significance level, statistical power, test direction, and allocation ratio.
G*Power Sample Size Calculator
This calculator is designed around an approximate normal-theory sample-size calculation for two independent groups using Cohen's d. It allows you to enter an expected effect size and choose commonly used significance levels and statistical power targets. You can also specify whether the hypothesis test is one-tailed or two-tailed and determine whether the two groups should have equal or unequal sample sizes.
The tool reports the required sample size for Group 1, Group 2, and the total sample size. It also displays the effect size, significance level, and statistical power used in the calculation, making it easier to review your assumptions.
Whether you are preparing a research proposal, planning an experiment, designing a clinical or behavioral study, or checking the approximate sample size for an academic project, understanding how these statistical inputs affect sample size can help you make better research decisions.
What Is a G*Power Sample Size Calculator?
A G*Power sample size calculator is a statistical planning tool used to estimate how many observations or participants are required to achieve a specified level of statistical power for a planned analysis.
G*Power is widely known as statistical power-analysis software, but the underlying concepts can also be used in specialized online calculators. The calculator presented here focuses specifically on a two-independent-group situation using Cohen's d as the effect-size measure.
The basic idea is simple:
Choose the effect you expect to detect, determine how much statistical evidence you require, select the desired probability of detecting that effect, and calculate the corresponding sample size.
The main inputs in this calculator are:
- Effect size (Cohen's d)
- Significance level (α)
- Statistical power
- Test type
- Allocation ratio
The resulting calculation provides sample sizes for the two groups and their combined total.
Why Is Sample Size Important?
Sample size directly affects the ability of a statistical study to identify meaningful differences.
Suppose a researcher wants to compare two independent groups. If the true difference between the groups is relatively large, fewer participants may be necessary to detect it. If the expected difference is small, considerably more participants may be needed.
A sample-size calculation helps balance two competing concerns:
Too few participants: The study may have insufficient power and produce inconclusive results.
Too many participants: The study may use more resources than necessary and, depending on the research context, expose more participants than required.
A properly planned sample size therefore supports both statistical efficiency and responsible research planning.
Key Inputs in the G*Power Sample Size Calculator
Understanding each input is essential before interpreting the result.
1. Effect Size — Cohen's d
The first input is Effect Size (Cohen's d).
Cohen's d measures the standardized difference between two group means. It expresses the difference relative to the variability of the observations.
A common formula is:
d = (Mean₁ − Mean₂) / SDpooled
where:
- Mean₁ = mean of Group 1
- Mean₂ = mean of Group 2
- SDpooled = pooled standard deviation
The calculator requires a positive value for Cohen's d.
A larger absolute effect size generally requires fewer participants because larger differences are easier to detect statistically.
Common Cohen's d Interpretations
Cohen's commonly cited benchmarks are approximately:
| Cohen's d | General Interpretation |
|---|---|
| 0.20 | Small effect |
| 0.50 | Medium effect |
| 0.80 | Large effect |
| 1.00+ | Very large effect |
These are useful reference points, but they should not automatically be applied to every field. What constitutes a practically important effect depends on the research question and subject area.
For sample-size planning, it is generally better to estimate the expected effect from previous research, pilot data, or a scientifically meaningful minimum difference rather than simply choosing a conventional benchmark.
2. Significance Level (α)
The significance level, represented by alpha (α), controls the probability threshold used for statistical significance.
The calculator provides four options:
| Alpha | Percentage |
|---|---|
| 0.10 | 10% |
| 0.05 | 5% |
| 0.01 | 1% |
| 0.001 | 0.1% |
The default is:
α = 0.05
An alpha of 0.05 is commonly used in statistical hypothesis testing, but the appropriate significance level depends on the study design and consequences of false-positive findings.
A smaller alpha generally makes the statistical test more stringent. Consequently, keeping the effect size and power fixed while reducing alpha generally increases the required sample size.
For example, moving from α = 0.05 to α = 0.01 usually requires more participants because stronger evidence is required before rejecting the null hypothesis.
3. Statistical Power
The calculator provides the following statistical power choices:
- 80%
- 85%
- 90%
- 95%
- 99%
The default is 80% power.
Statistical power is the probability of detecting an effect when a real effect of the specified size exists under the assumptions of the analysis.
In simplified terms:
Power = 1 − β
where β represents the probability of a Type II error.
A study with 80% power has a 20% Type II error probability under the specified assumptions.
Increasing power generally increases the required sample size.
For example, a study planned for 95% power will generally require more participants than an otherwise identical study planned for 80% power.
4. Test Type: One-Tailed or Two-Tailed
The calculator allows you to select:
- Two-tailed
- One-tailed
This choice should be based on the research hypothesis and statistical test being planned.
Two-Tailed Test
A two-tailed test considers deviations in both directions.
For example, a researcher might hypothesize that two treatments differ without specifying which treatment will have the larger mean.
The alternative hypothesis is conceptually:
Group 1 ≠ Group 2
Two-tailed testing is commonly appropriate when effects in either direction are scientifically relevant.
One-Tailed Test
A one-tailed test focuses on a specified direction.
For example:
Group 1 > Group 2
or
Group 1 < Group 2
A one-tailed test should not be selected merely because it produces a smaller sample size. The direction should be justified by the research question and study design before data collection.
5. Allocation Ratio
The calculator also includes an Allocation Ratio (Group 2 / Group 1).
The default ratio is:
1
A ratio of 1 means the groups have equal sample sizes.
For example:
- Group 1 = 100
- Group 2 = 100
- Ratio = 1
An unequal ratio can be useful when recruiting participants into one group is easier, cheaper, or otherwise more practical.
For example, a ratio of 2 means Group 2 is planned to have approximately twice as many participants as Group 1.
Unequal allocation can affect the total sample size required for a given level of power. Equal allocation is generally efficient when the costs and recruitment possibilities of both groups are similar.
How to Use the G*Power Sample Size Calculator
Using the calculator involves five main steps.
Step 1: Enter Cohen's d
Enter the expected effect size.
For example:
0.50
This represents a standardized mean difference of 0.50.
Step 2: Select the Significance Level
Choose the desired alpha level.
For a conventional planning assumption, you might select:
0.05
Step 3: Select Statistical Power
Choose the target power.
For example:
80%
Higher power requires a larger sample under otherwise identical assumptions.
Step 4: Select the Test Type
Choose either:
Two-tailed
or
One-tailed
Make this selection based on the hypothesis and planned statistical analysis.
Step 5: Enter the Allocation Ratio
Use:
1
for equal group sizes.
If you intentionally plan unequal group sizes, enter the desired Group 2 / Group 1 ratio.
Finally, click Calculate.
The calculator will display the required sample size for each group and the total sample size.
G*Power Sample Size Formula
The calculator uses an approximate normal-theory formula for two independent groups based on Cohen's d.
The core calculation for Group 1 is:
n₁ = (zα + zβ)² × (1 + 1/r) / d²
where:
- n₁ = required sample size for Group 1 before rounding
- zα = critical standard-normal value determined by alpha and whether the test is one- or two-tailed
- zβ = standard-normal value associated with desired power
- r = allocation ratio of Group 2 / Group 1
- d = Cohen's d
The Group 2 sample size is then determined from the allocation ratio:
n₂ = r × n₁
Because participants cannot normally be represented as fractions, the calculator rounds the required group sample sizes upward to whole numbers.
For equal allocation, where:
r = 1
the formula becomes:
n per group = 2 × (zα + zβ)² / d²
This simplified equation illustrates the major relationships between effect size, alpha, power, and sample size.
Why Effect Size Has Such a Strong Impact
Notice that Cohen's d appears in the denominator as d².
This means the sample size is highly sensitive to changes in the expected effect size.
If the expected effect becomes smaller, the required sample size can increase substantially.
For example, assuming all other parameters remain unchanged:
- d = 0.80 generally requires fewer participants
- d = 0.50 requires more
- d = 0.30 requires substantially more
- d = 0.20 can require a very large sample
This is one of the most important concepts in statistical power analysis.
Worked Example
Suppose a researcher wants to compare the average outcome between two independent groups.
The planned assumptions are:
| Parameter | Value |
|---|---|
| Cohen's d | 0.50 |
| Significance level | 0.05 |
| Power | 80% |
| Test | Two-tailed |
| Allocation ratio | 1 |
Because the allocation ratio is 1, the study uses equal group sizes.
For a two-tailed test with α = 0.05, the critical standard-normal value is approximately:
zα ≈ 1.96
For 80% power:
zβ ≈ 0.84
Using the equal-allocation formula:
n = 2 × (1.96 + 0.84)² / 0.50²
First add the z-values:
1.96 + 0.84 = 2.80
Square the result:
2.80² = 7.84
Multiply by 2:
7.84 × 2 = 15.68
Square the effect size:
0.50² = 0.25
Then:
15.68 ÷ 0.25 = 62.72
Rounding upward gives approximately:
63 participants per group
Therefore, the approximate total is:
126 participants
The calculator performs this type of calculation automatically and displays the group-specific and total sample sizes.
Sample Size Comparison by Effect Size
The following table illustrates the general relationship between effect size and sample requirements under a common two-group planning scenario. These figures are illustrative rather than universal.
| Effect Size | General Effect | Expected Sample Requirement |
|---|---|---|
| 0.20 | Small | High |
| 0.30 | Small | Moderately high |
| 0.50 | Medium | Moderate |
| 0.80 | Large | Lower |
| 1.00 | Very large | Lower still |
The exact sample size depends on alpha, power, one- versus two-tailed testing, allocation ratio, and the statistical model.
How Statistical Power Changes Sample Size
Holding other inputs constant, higher power generally requires more participants.
| Statistical Power | General Sample-Size Effect |
|---|---|
| 80% | Common planning target |
| 85% | Higher than 80% |
| 90% | Higher than 85% |
| 95% | Substantially more than 80% in many settings |
| 99% | Very demanding sample requirement |
There is no single "correct" power level for every study. Researchers should select power based on study objectives, expected effect size, consequences of missed effects, available resources, and relevant methodological standards.
How Alpha Affects Sample Size
A stricter significance threshold generally increases the sample size needed to maintain the same statistical power.
| Alpha | Relative Stringency |
|---|---|
| 0.10 | Less stringent |
| 0.05 | Common conventional choice |
| 0.01 | More stringent |
| 0.001 | Very stringent |
For example, reducing alpha from 0.05 to 0.01 means the study requires stronger statistical evidence to reject the null hypothesis. More observations may therefore be necessary to preserve the desired power.
Equal vs. Unequal Group Allocation
Equal allocation is represented by:
Ratio = 1
For example:
Group 1 = 100
Group 2 = 100
Unequal allocation might use:
Ratio = 2
meaning Group 2 is planned to be approximately twice the size of Group 1.
For example:
Group 1 = 50
Group 2 = 100
However, unequal allocation is not automatically more efficient. The best allocation depends on recruitment availability, costs, expected variability, and study design.
If participants are equally easy and inexpensive to recruit in both groups, equal allocation is often a practical choice.
What Does the Total Sample Size Mean?
The calculator reports:
Total Sample Size = Group 1 + Group 2
For example:
| Group | Required Participants |
|---|---|
| Group 1 | 63 |
| Group 2 | 63 |
| Total | 126 |
The total is the number of participants required across both groups under the specified statistical assumptions.
Researchers should also distinguish between the analyzable sample size and the number they need to recruit.
If some participants are expected to withdraw, be lost to follow-up, or provide unusable data, the recruitment target may need to be higher than the minimum analyzable sample.
Adjusting for Expected Dropout
Suppose a study requires 126 analyzable participants but expects a 10% dropout rate.
A simple adjustment is:
Adjusted Recruitment = Required Sample ÷ (1 − Dropout Rate)
Therefore:
126 ÷ (1 − 0.10)
126 ÷ 0.90 = 140
The researcher may therefore need to plan for approximately 140 recruits to end up with around 126 participants after a 10% loss rate, subject to the study's actual recruitment and analysis plan.
This dropout adjustment is separate from the calculator's core power calculation.
Common Mistakes in Sample Size Planning
Choosing an Effect Size Arbitrarily
One of the most common mistakes is selecting an effect size simply because it produces a convenient sample size.
Instead, justify the expected effect using previous research, pilot data, subject-matter knowledge, or a minimum effect that would be practically meaningful.
Automatically Choosing 80% Power
Although 80% is common, it is not mandatory for every study. Some research questions may justify 90%, 95%, or another target.
Selecting One-Tailed Testing to Reduce Sample Size
A one-tailed test should be selected because the research hypothesis genuinely has a justified directional prediction, not simply because it can reduce the required sample size.
Ignoring Attrition
If participants may drop out, the recruitment target should account for expected losses.
Ignoring Unequal Allocation
If the study will deliberately use unequal group sizes, the allocation ratio should reflect that design during sample-size planning.
Treating the Calculator Result as a Complete Study Design
Sample-size planning depends on more than a mathematical equation. The chosen statistical test, assumptions, measurement quality, study design, eligibility criteria, missing data, and analysis plan can all affect the final research strategy.
Practical Tips for Better Sample Size Planning
Use the Most Defensible Effect Size
Look for relevant previous studies and estimates from pilot research. The effect size should represent what you realistically expect or what would be scientifically meaningful to detect.
Perform Sensitivity Analysis
Rather than relying on only one effect-size assumption, calculate sample sizes under several plausible values.
For example:
- d = 0.30
- d = 0.50
- d = 0.70
This can show how sensitive the required sample is to uncertainty about the expected effect.
Consider Recruitment Feasibility
A mathematically appropriate sample may still be difficult to recruit. Consider available participants, recruitment duration, budget, study location, and expected attrition.
Predefine the Statistical Analysis
The sample-size calculation should correspond to the analysis you actually intend to perform.
Document Your Assumptions
For research proposals and academic publications, record:
- Expected effect size
- Alpha
- Desired power
- Test type
- Allocation ratio
- Statistical test
- Any anticipated dropout adjustment
This makes your planning transparent and reproducible.
Understanding the Calculator's Output
After pressing Calculate, the tool provides six important results.
Required Sample Size — Group 1
This is the calculated whole-number sample requirement for the first group.
Required Sample Size — Group 2
This represents the required sample for the second group based on the specified allocation ratio.
Total Sample Size
This is the sum of both group requirements.
Effect Size
The calculator repeats the Cohen's d value used in the calculation so you can verify the input.
Significance Level
The selected alpha value is displayed for reference.
Statistical Power
The selected power target is shown as a percentage.
These outputs make it easier to confirm that the final result corresponds to the assumptions entered.
Limitations of This Calculator
This calculator is useful for approximate planning, but it should not automatically be considered a replacement for a complete statistical power analysis performed for a specific research design.
The calculation is based on an approximate normal-theory approach for two independent groups using Cohen's d.
Real research designs can involve additional considerations such as:
- Paired or repeated measurements
- More than two groups
- Regression models
- Analysis of covariance
- Binary outcomes
- Count outcomes
- Survival outcomes
- Clustered observations
- Repeated-measures correlation
- Non-normal distributions
- Unequal variances
- Complex missing-data mechanisms
Such designs may require different power-analysis methods.
For high-stakes research, clinical studies, grant applications, or formal academic work, researchers should verify the calculation using an appropriate statistical method and consult a statistician when necessary.
Frequently Asked Questions
1. What is a G*Power Sample Size Calculator?
A G*Power Sample Size Calculator estimates the number of participants required for a statistical test based on assumptions such as effect size, significance level, statistical power, test direction, and allocation ratio.
2. What is Cohen's d?
Cohen's d is a standardized measure of the difference between two group means. It expresses the difference relative to the variability of the observations.
3. What Cohen's d should I use?
The appropriate value depends on the research question and expected difference. Previous studies, pilot data, subject-matter knowledge, or a scientifically meaningful minimum effect can help determine an appropriate value.
4. What is a typical statistical power?
80% is a commonly used planning target, but some studies may use 90%, 95%, or another value depending on the consequences of failing to detect a real effect and other design considerations.
5. What does alpha = 0.05 mean?
An alpha of 0.05 represents the selected significance threshold for the hypothesis test. It is commonly used, although the appropriate value depends on the research context.
6. Should I use a one-tailed or two-tailed test?
Use the test type that matches your research hypothesis. A one-tailed test requires a defensible directional hypothesis established before analyzing the data. Do not choose it solely to obtain a smaller required sample.
7. What does an allocation ratio of 1 mean?
An allocation ratio of 1 means equal allocation between the two groups. For example, if Group 1 contains 60 participants, Group 2 will also contain approximately 60 participants.
8. Does a larger effect size require more participants?
Generally, no. Larger effects are easier to detect, so the required sample size usually decreases as the expected absolute effect size increases, assuming other inputs remain unchanged.
9. Does higher statistical power require a larger sample?
Generally, yes. Increasing the desired power while keeping effect size, alpha, and other assumptions constant generally increases the number of participants needed.
10. Can I use this calculator for any type of statistical study?
No. This calculator is specifically based on an approximate two-independent-group calculation using Cohen's d. Studies involving different outcomes, repeated measurements, multiple groups, clustered data, survival analysis, or other complex designs may require a different power-analysis method.
Conclusion
The G*Power Sample Size Calculator provides a convenient way to estimate the sample size required for a two-group statistical comparison using Cohen's d. By entering the expected effect size, selecting a significance level and statistical power, choosing one- or two-tailed testing, and specifying the allocation ratio, you can quickly obtain an approximate sample requirement for each group and for the study as a whole.
The most important concept to remember is that sample size is closely connected to effect size, alpha, power, and allocation. Smaller expected effects generally require larger samples, while higher statistical power and stricter significance levels also tend to increase the number of participants needed.
For equal group sizes, an allocation ratio of 1 provides a straightforward design, while other ratios can be used when unequal recruitment is intentional. The calculator also rounds group requirements upward to whole participants, making the displayed values practical for planning.
However, a sample-size estimate is only as reliable as the assumptions behind it. Choosing a defensible effect size is particularly important. Researchers should use evidence from previous studies, pilot data, or meaningful scientific differences whenever possible rather than selecting an effect size simply to obtain a convenient participant count.
It is also important to distinguish the calculated sample size from the number of people who must actually be recruited. Expected dropout, missing observations, eligibility failures, and other forms of attrition may require additional recruitment.
Finally, this calculator should be viewed as a planning aid for the specific two-independent-group Cohen's d scenario it represents. More complicated research designs may require specialized power calculations. For formal research, clinical investigations, grant proposals, or high-stakes statistical decisions, verify the assumptions and calculation with the statistical method appropriate to your study.
Used thoughtfully, a sample-size calculator can help researchers plan studies that are more efficient, better powered, and more transparent from the beginning.