Study assumptions, a selected t-test design, alpha and target power lead to an estimated analyzable sample size.
A planning estimate starts with a defensible mean difference, variability and design.
On this page

What a t-test power analysis estimates

A prospective power analysis connects a target power with the planned mean difference, outcome variability, significance level, test direction and sample size. This calculator solves for a required sample size for three designs: one sample against a reference mean, matched pairs analyzed as within-pair differences, and two independent groups with equal allocation and a common-variance Student t-test.

The calculation is conditional on those inputs. It does not tell you whether a study is important, representative, unbiased or well designed, and it cannot guarantee that the final analysis will have the stated power. Choose and document the outcome, smallest difference worth detecting and variability assumption before looking at study results.

Choose the design and a defensible variability estimate

For a one-sample test, enter the standard deviation of the measured outcome. For a paired test, enter the standard deviation of the within-pair differences, not the standard deviation of each measurement separately. For two independent groups, the current planner assumes equal group sizes and a common standard deviation for the pooled two-sample t-test.

Use evidence relevant to the planned population, measurement scale and protocol: a suitable prior study, pilot estimate or a clearly stated planning range. Do not select a difference or standard deviation simply because it produces a convenient sample size. A paired study also needs a plausible relationship between repeated measurements; the variability of their differences depends on that relationship.

Set alpha, target power and test direction in advance

Alpha is the planned Type I error probability under the null model. Target power is the probability of rejecting that null when the specified alternative and model are true. Choose a two-sided test unless a one-sided direction was justified in the protocol before observing the data; a one-sided test does not provide evidence for an effect in the opposite direction.

If the primary analysis belongs to a family of outcomes or comparisons, multiplicity can change the effective significance level and required sample size. This single-test calculation does not adjust alpha for multiple testing. Record the planned test, outcome, direction, alpha, target power, effect assumption and variability source in the study plan or preregistration.

Read the rounded sample size and its scope

The result rounds the numerically solved requirement up to a whole number. For independent groups it reports the requirement in each equally sized group and the combined total; for a one-sample or paired design it reports observations or complete pairs. It also recalculates the achieved power at that rounded count, so the displayed value may be slightly above the requested target.

The output is the number of analyzable observations or pairs under the specified model. It does not inflate for attrition, incomplete pairs, nonresponse, exclusions, clustering, unequal allocation, covariates, repeated-measures structures beyond a paired test, or a Welch test with unequal variances. Plan those features using a method that matches the full design.

How the calculation models power

For the one-sample and paired designs, the model uses n − 1 degrees of freedom and noncentrality equal to the planned mean difference divided by its standard error. For equal-sized independent groups under a common-variance Student t-test, it uses 2n − 2 degrees of freedom and the pooled two-sample standard error. The selected alpha determines the central t critical value; power is evaluated under the corresponding noncentral t distribution, and a numerical search finds the smallest whole-number count that reaches the target.

This is prospective power for one specified alternative. The computation follows the one- and two-sample t-test planning framework documented for R’s power.t.test function. The source implementation is an in-browser calculation; it does not call R or send the entered values to a server.

Do not mistake a standardized effect for a universal threshold

The ratio of the entered mean difference to the entered standard deviation is shown only as a standardized description of the assumptions. It is not automatically a small, medium or large effect and does not establish educational or practical importance. Explain the raw difference in outcome units and why it matters in the context of the research question.

This is an a priori planning aid, not a post-hoc observed-power calculator. After data collection, report the estimate and an appropriate confidence interval rather than using observed power to reinterpret a non-significant result. Ask a statistician to review the plan when assumptions, allocation or analysis are more complex than the supported designs.

Free statistical planning tool

Estimate a t-test sample size

Use assumptions you can justify before data collection. Your result is a model-based planning estimate, not a guarantee of study quality or power.

The calculation runs in this browser. Inputs are not uploaded or automatically saved.

Enter a justified difference and variability estimate, then calculate.

Questions about this topic

How many participants do I need for a t-test?

There is no single number. The answer depends on the planned design, smallest meaningful mean difference, standard deviation, alpha, target power and direction of the test. This calculator supports one-sample, paired and equal-sized independent-groups Student t-tests under its stated assumptions.

What standard deviation should I enter for a paired t-test?

Enter the standard deviation of the within-pair differences. It is generally not the same as the standard deviation of either measurement alone.

Does this calculator support Welch’s t-test?

No. Its independent-groups calculation assumes equal group sizes and a common variance for the pooled two-sample Student t-test. Use a method designed for unequal variances or unequal allocation when that matches the planned analysis.

Should I choose a one-sided test to reduce the sample size?

No. Choose direction from the research question and protocol before seeing the data. A one-sided test cannot support a conclusion in the unplanned opposite direction.

Does the output include attrition or multiple-comparison adjustments?

No. The result is the required analyzable count for one test under the entered model. Adjust separately using a method that reflects expected missingness, incomplete pairs, multiplicity and the design.

Does reaching the calculated sample size guarantee an adequately powered study?

No. Power depends on the assumptions being reasonable and the planned analysis matching the design. Sampling bias, measurement error, missing data, model violations and a different true effect can all change what the study can show.

Are my planning inputs uploaded or saved?

No. This calculator runs in your browser and does not send or automatically save the values you enter.

Sources and editorial notes

The supporting reading below informs our editorial guidance. Exercises and scenarios illustrate a method; they do not report a completed product test or measured learning outcome. Read our editorial policy or send a correction with a supporting source to info@ai-essay.com.

  1. R stats documentation: power calculations for one- and two-sample t-tests
  2. Penn State STAT 509: power and sample size for tests about means
  3. Penn State STAT 507: power and sample-size relationships for t-tests