How this t-test calculator works
This calculator runs a t-test from summary statistics. Test type defaults to One-sample. You can switch to Two-sample (Welch's) or Paired. The headline is t(df) = …, p = the two-tailed p-value. Details always show Standard error, One-tailed p, and Cohen's d — those rows do not wait on Advanced options.
Empty on a required field is no result. Each standard deviation must be greater than 0. Sample sizes (and Number of pairs) must be integers of at least 2 (decimals are floored). Two-sample (Welch's) allows unequal variances for the t statistic, but Cohen's d still uses a pooled SD. p-values come from the exact Student’s t CDF.
How to use the t-test calculator
- Choose One-sample (default), Two-sample (Welch's), or Paired.
- For one-sample enter Sample mean, Baseline / null mean, Sample SD, and Sample size. For two-sample enter both groups’ means, SDs, and sizes. For paired enter Mean difference, SD of differences, and Number of pairs.
- Read t(df) and two-tailed p in the headline, plus Standard error, One-tailed p, and Cohen's d in the details.
- Advanced options can be opened, but it only shows Reserved for future design details. Closing it does not change t or p.
Advanced options, and closing them
This section is empty of extra inputs. It only shows Reserved for future design details. Standard error, One-tailed p, and Cohen's d do not wait on Advanced options. Closing the section does not change the live result.
T-test formulas
One-sample: t = (mean − μ₀) / (s / √n), df = n − 1, d = (mean − μ₀) / s. Two-sample (Welch's): SE = √(s₁²/n₁ + s₂²/n₂), df from Welch–Satterthwaite, and d uses pooled SD — not the Welch SE. Paired: t = mean difference / (s_diff / √n), df = n − 1, d = mean difference / s_diff. Two-tailed p = 2 × min(F(t), 1 − F(t)) from Student’s t. One-tailed p is the smaller tail. Extremely small p displays as < 1e-12.
Worked examples
Example: one-sample, mean 105 vs 100, SD = 10, n = 30
Keep One-sample. SE ≈ 1.8257. t(29) ≈ 2.739. Two-tailed p is about 0.010. One-tailed p is about 0.0052. Cohen's d = 0.5. Empty n or typed 0 for SD is no result.
Example: paired, mean difference 5, SD of differences 8, 30 pairs
Switch to Paired. SE ≈ 1.4606. t(29) ≈ 3.423. Two-tailed p is about 0.0018. Cohen's d = 5 ÷ 8 = 0.625. Closing Advanced options does not change these figures.
Example: Welch two-sample, 105 / 10 / 30 vs 100 / 12 / 30
Switch to Two-sample (Welch's). SE ≈ 2.852. t is about 1.753 with Welch df about 56. Two-tailed p is about 0.085. Cohen's d still uses the pooled SD (about 11.045), so d ≈ 0.453 — not SE-based. n = 1 is no result.
Things to keep in mind
The headline p is two-tailed. Two-sample (Welch's) is not a pooled-variance t for the test statistic. Completed results can be saved in this browser’s local history.
T-test calculator FAQ
Which fields are required?
The summary statistics for the selected Test type. One-sample: Sample mean, Baseline / null mean, Sample SD > 0, Sample size ≥ 2. Two-sample (Welch's): both groups’ means, SDs > 0, and sizes ≥ 2. Paired: Mean difference, SD of differences > 0, Number of pairs ≥ 2. Empty required fields are no result. Advanced options is optional and currently unused.
What happens when I close Advanced options?
Nothing in the result changes. The section only shows Reserved for future design details. Standard error, One-tailed p, and Cohen's d stay visible.
Is the headline one-tailed or two-tailed?
Two-tailed. One-tailed p is always in the details as the smaller tail. This page does not decide significance for you; compare p with your own α.
Does Two-sample (Welch's) pool the variances?
Not for t. The standard error allows unequal variances (Welch). Degrees of freedom use Welch–Satterthwaite. Cohen's d in the details still uses a pooled SD, as the widget computes it.
Are sample sizes floored?
Yes. Each size (and Number of pairs) is floored to an integer of at least 2. n = 1 is no result. Typed 0 for an SD is no result.
Does this t-test calculator store my numbers?
Completed results can be saved in this browser’s local history so you can reopen them later. They stay on your device and are not sent to our servers or to analytics.