# T-Test Sample Size Calculator

Free t-test sample size calculator. Determine how many participants you need for a one-sample, two-sample, or paired t-test. Enter effect size, alpha, and power.

## What this calculates

Calculate the required sample size for your t-test before collecting data. Enter the expected effect size, significance level, and desired power to determine how many participants each group needs.

## Inputs

- **Test Type** — options: One-Sample T-Test, Two-Sample T-Test (Independent), Paired T-Test — The type of t-test you plan to run.
- **Tail Type** — options: Two-Tailed, One-Tailed — Two-tailed tests for any difference; one-tailed tests for a specific direction.
- **Effect Size (Cohen's d)** — min 0.01, max 10 — Standardized effect size. Small = 0.2, Medium = 0.5, Large = 0.8.
- **Significance Level (α)** — min 0.001, max 0.5 — Type I error rate (probability of false positive). Typical values: 0.05 or 0.01.
- **Desired Power (1 - β)** — min 0.5, max 0.999 — Probability of detecting a true effect. Typical values: 0.80 or 0.90.

## Outputs

- **Sample Size per Group** — Number of participants needed per group.
- **Total Sample Size** — Total number of participants across all groups.
- **Achieved Power** — The actual power achieved with the rounded-up sample size.
- **Critical t-Value** — The critical t-value used (approximated from z for large df).
- **Summary** — formatted as text — Plain-language interpretation of the results.

## Details

Planning a study starts with knowing how many participants you need. Too few and you risk missing a real effect (underpowered). Too many and you waste time and resources.

**The Key Inputs:**

- **Effect size (Cohen's d):** How large a difference you expect, in standard deviation units. Small = 0.2, Medium = 0.5, Large = 0.8.
- **Alpha (α):** The probability of a false positive (Type I error). Standard is 0.05.
- **Power (1 - β):** The probability of detecting a real effect. Standard is 0.80 (80%).

**Formulas:**

For a one-sample or paired t-test:
n = ((z_α + z_β) / d)²

For a two-sample t-test:
n per group = 2 × ((z_α + z_β) / d)²

Where z_α and z_β are the critical values of the standard normal distribution.

**Practical Tips:**

- A smaller effect size dramatically increases the required sample size
- Going from 80% to 90% power roughly adds 30% more participants
- Always round up to ensure you meet the target power
- Budget for dropouts by adding 10-20% extra participants

## Frequently Asked Questions

**Q: How do I estimate the effect size before running my study?**

A: Use pilot study data, previous published research on the same topic, or Cohen's conventions (0.2, 0.5, 0.8). If you have no prior data, consider the smallest effect that would be practically meaningful in your field and use that.

**Q: Why is 80% power the standard?**

A: 80% power means a 20% chance of a Type II error (missing a real effect). This is a convention that balances the cost of collecting more data against the risk of missing an effect. For high-stakes research like clinical trials, 90% power is often used instead.

**Q: What is the difference between one-tailed and two-tailed sample size?**

A: A one-tailed test requires fewer participants because it only tests for a difference in one direction. However, you should only use a one-tailed test when you have a strong theoretical reason to predict the direction of the effect before collecting data. Two-tailed is the safer choice.

**Q: Why does a two-sample test need more participants than a one-sample test?**

A: A two-sample test compares two groups, so you need enough participants in each group to estimate both means reliably. The variance of the difference between two means is the sum of both sampling variances, which requires roughly twice the total participants of a one-sample design for the same power.

---

Source: https://vastcalc.com/calculators/statistics/t-test-sample-size
Category: Statistics
Last updated: 2026-04-08
