molecalculator

Moles & Molar Mass

Power Analysis Calculator: G*Power Guide

Calculator No. 01-10038 · Updated · Formula and assumptions shown below

Total sample size (N) 33.4
Power actually achieved
0.50
= 1 − 0.5
Effect size (Cohen's d)
0.5
Set in the form below
Alpha (α)
0.05
Set in the form below
You enter
Effect size (Cohen's d), Alpha (α), Desired power (1-β)
You get
Total sample size (N), Power actually achieved
Rounding
0 dp · 2 dp

For study and lab planning. The result follows from the numbers you enter and the formula shown. Check it against your method before you weigh, mix or dilute anything, follow the safety data sheet and your supervisor, and do not use it for clinical, dosing or medication work.

G*Power is a free statistical software package used to perform power analysis and calculate required sample sizes for a wide range of statistical tests. You input your chosen effect size, alpha level (significance threshold), and desired power (typically 0.80), and G*Power returns the minimum sample size needed to detect that effect, or the power your current sample size provides. This article explains how to use G*Power, what the key inputs mean, and how to interpret its output correctly.

Formula

For a two-tailed independent-samples t-test (the most common scenario), the required total sample size N is approximated by:

N = 2 × ((z1-α/2 + z1-β)² / d²)

Where:

  • N = total sample size (both groups combined)
  • z1-α/2 = the z-score corresponding to the alpha level (for α = 0.05, z = 1.96)
  • z1-β = the z-score corresponding to the desired power (for power = 0.80, z = 0.8416)
  • d = Cohen’s d effect size = (mean difference) / pooled standard deviation

The formula above is the standard approximation for equal group sizes. G*Power uses a more exact iterative calculation, but this formula gives very close results for most practical purposes.

Worked Example

Suppose you plan a two-group experiment (e.g., treatment vs. control) and expect a medium effect size of d = 0.5. You set α = 0.05 and want power = 0.80.

  1. Find the z-scores: for α = 0.05 (two-tailed), z1-α/2 = 1.96. For power = 0.80, z1-β = 0.8416.
  2. Add them: 1.96 + 0.8416 = 2.8016.
  3. Square: 2.8016² = 7.849.
  4. Divide by d²: 7.849 / 0.25 = 31.396.
  5. Multiply by 2 (for two groups): N ≈ 62.79, round up to 63 total participants.

The calculator above gives N = 63 (rounded up), matching the manual calculation. Note that the ‘np’ output in the block is a placeholder; in G*Power you would compute achieved power separately by entering your actual sample size.

Assumptions

  • Two-tailed test (most common default).
  • Equal group sizes (you can adjust for unequal groups in G*Power).
  • Normally distributed data and homogeneous variances (for t-tests).
  • The effect size is estimated from prior research or theory; it is not known from your own data yet.

What Is Power Analysis?

Power analysis is a statistical method to determine the likelihood that a study will detect an effect of a given size, assuming the effect truly exists. The power of a test is 1 − β, where β is the probability of a Type II error (failing to reject a false null hypothesis). A power of 0.80 means you have an 80% chance of detecting the effect if it is real. Power analysis is used in the planning phase of research to decide how many participants or observations you need, and it is also used post-hoc to interpret non-significant results.

How to Use G*Power

G*Power has a straightforward interface. The typical workflow is:

  1. Select the statistical test you plan to use (e.g., t-test, ANOVA, correlation, chi-square).
  2. Choose the type of power analysis: a priori (compute required sample size), post hoc (compute achieved power), or criterion (compute alpha).
  3. Enter the required inputs: effect size, alpha, power (for a priori), and for some tests, the number of groups or predictors.
  4. Click “Calculate” – G*Power displays the sample size, actual power, and a plot showing the relationship between sample size and power.

For example, to compute sample size for an independent t-test, choose “t-tests” → “Means: Difference between two independent means (two groups)” → “A priori”. Enter your effect size d, α = 0.05, power = 0.80, and allocation ratio (usually 1). G*Power will output the total sample size and the sample size per group.

Choosing Effect Size, Alpha, and Power

These three inputs are the core of any power analysis. Here’s how to choose them responsibly:

  • Effect size (d): Use a value from prior literature, a pilot study, or a clinically meaningful difference. Cohen’s conventions: d = 0.2 (small), 0.5 (medium), 0.8 (large). However, these are arbitrary; the best practice is to justify your effect size based on your field’s standards.
  • Alpha (α): Usually set to 0.05, but if you are testing multiple hypotheses, you may use a more stringent alpha (e.g., 0.01) to control the family-wise error rate.
  • Power (1-β): Conventionally 0.80, but higher power (0.90 or 0.95) is often needed in clinical trials or when the cost of missing an effect is high.

Common Mistakes and Misconceptions

One common mistake is entering the effect size as the raw mean difference instead of Cohen’s d. Cohen’s d is the difference divided by the pooled standard deviation, so a raw difference of 5 points with an SD of 10 gives d = 0.5. Another error is using one-tailed tests when the hypothesis is two-tailed; G*Power defaults to two-tailed, but you can change it. A major misconception is that a power analysis guarantees your study will find an effect – it only tells you the probability under certain assumptions. Also, post-hoc power (calculated after a study) is often criticized because it is a deterministic function of the p-value; it is more informative to report confidence intervals instead.

Alternatives and Limitations

G*Power is not the only tool. Other free options include R packages like pwr and WebPower, and commercial software like SPSS SamplePower or nQuery. G*Power is widely used because it is free, user-friendly, and covers many tests. However, it has limitations: it does not handle complex designs like multilevel models or simulations well. For those, you may need to use simulation-based approaches in R or Python. Also, G*Power’s effect size calculator can help convert between different metrics (e.g., odds ratios to Cohen’s d), but always double-check the conversion formula.

Frequently Asked Questions

What is the minimum sample size for a t-test? It depends on your effect size, alpha, and power. For a medium effect (d=0.5), α=0.05, power=0.80, you need about 64 total participants (32 per group). For a small effect (d=0.2), you’d need around 394 per group.

Can I use G*Power for ANOVA? Yes, G*Power supports one-way and factorial ANOVA. For ANOVA, you enter the effect size f (or partial eta-squared), the number of groups, and the degrees of freedom. The output gives the total sample size.

What is the difference between a priori and post hoc power analysis? A priori is done before data collection to determine the sample size needed to achieve a desired power. Post hoc is done after a study to estimate the power you actually had, given your sample size and the observed effect size. Post hoc power is generally discouraged because it doesn’t add information beyond the p-value.

How do I determine the effect size if I don’t know it? You can use Cohen’s conventions (small, medium, large) as a starting point, but it’s better to look for similar studies in your field or run a pilot study. If you have no idea, using d=0.5 is a common conservative choice for a medium effect.

Does G*Power work on Mac? Yes, G*Power is available for Windows, macOS, and Linux. It is free to download from the official website.

What if my groups are unequal in size? G*Power allows you to specify an allocation ratio (e.g., 2:1). The required total sample size will be slightly larger than with equal groups, because the effective sample size is reduced.

Related

Formula used
in d | Effect size (Cohen's d) | - | 0.5 | 0.01
in a | Alpha (α) | - | 0.05 | 0.001
in p | Desired power (1-β) | - | 0.80 | 0.01
out n | Total sample size (N) | - | ( (1.96 + 0.8416)^2 ) / (d^2) + 2 | 0
out np | Power actually achieved | - | 1 - 0.5 | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.

More in this section

The whole Moles & Molar Mass section →