Skip to main content

Limited time: save up to 25% on spreadsheet models and templates.

Explore templates
10XSheets

Free calculator

t-test calculator

Compare means using Student’s t from summary statistics (n, mean, sample SD). Choose one-sample (vs a reference mean), two independent samples (pooled or Welch), or paired differences. You get t, degrees of freedom, and a two-sided p-value—plus Google Sheets & Excel patterns with T.TEST and T.DIST. Educational spreadsheet math, not clinical trials or survey design software.

Educational and illustrative only. This is not professional statistical advice, not a substitute for study protocols or regulated reporting, and not automated assumption checking—confirm methods with your instructor or team when results matter.

When to use this calculator

Quick t-test checks from the same numbers you would type into T.TEST—transparent formulas, not a full statistics suite.

  • One-sample: test whether a sample mean differs from a fixed reference μ₀ (known benchmark, spec line, legacy average).
  • Two-sample: compare independent group means with either pooled variance (classical equal-variance t) or Welch when spreads may differ.
  • Paired: same subjects or matched pairs—use the mean and SD of differences after you have already formed after − before (or equivalent) in a sheet.
  • Need SD from raw rows first? Use the standard deviation calculator, then paste n, mean, and s here.
How do you compare means with a t-test?

A t-test asks whether an observed mean difference is larger than we would expect from random sampling alone, under a Student t reference with degrees of freedom tied to your sample sizes and (for two samples) variance assumptions.

One-sample t

t = (x̄ − μ₀) / (s / √n) with df = n − 1, where is your sample mean, s the sample SD, n the count, and μ₀ the reference mean under the null. The page reports the two-sided p-value 2 × min(F(t), 1 − F(t)) for the symmetric t CDF F.

Two independent samples

Pooled: assume a common variance; sp² pools sums of squares across groups, SE uses sp√(1/n₁ + 1/n₂), t = (x̄₁ − x̄₂) / SE, df = n₁ + n₂ − 2. Welch: do not assume equal variances; SE = √(s₁²/n₁ + s₂²/n₂) and df follow the Welch–Satterthwaite formula.

Paired t

On differences d with mean d̄ and sample SD s_d over n pairs: t = d̄ / (s_d / √n), df = n − 1. This is equivalent to a one-sample t on the difference column with μ₀ = 0.

Interpreting the p-value

The two-sided p-value is the probability under the null of observing |t| at least as extreme as your statistic (symmetric tails). It is not the probability that the null is “true”; use institutional α rules and context when you declare significance.

The UI shows a two-sided p-value only—one-sided p, confidence intervals on contrasts, effect sizes, normality tests, and power are not included here; use statistics software or extend a spreadsheet model when you need them.

To obtain s from a pasted list, open the standard deviation calculator and align sample vs population SD with your course.

For standardizing one value on a normal model (not a t on a mean), open the z-score calculator.

For two-sided confidence intervals on a mean (known σ with z, unknown σ with t) or Wald proportions, open the confidence interval calculator.

FAQs cover pooled vs Welch, paired vs independent, Excel T.TEST, and what is out of scope for v1.

Google Sheets & Excel

In Google Sheets and Microsoft Excel (English function names), T.TEST runs paired, two-sample equal variance, or two-sample unequal variance tests on ranges of data. This page mirrors the summary-statistics path: enter n, mean, and s you would derive from AVERAGE and STDEV.S. T.DIST.2T(abs(t), df) matches the two-sided p-value shown here when t and df align with your test definition. Replace cell references with your values; confirm T.TEST’s tails and type arguments against your syllabus.

Two-sample unequal variance (Welch-style)
=T.TEST(A2:A15,B2:B12,2,3)

2 = two tails. 3 = two-sample unequal variance (Welch). Use paired ranges with type 1 instead when your data are matched.

Two-sided p from t and df
=T.DIST.2T(ABS(D2),E2)

D2 = t statistic, E2 = df. Uses the Student t distribution; matches this page when t and df are defined the same way.

More tools in Statistics

Browse all tools

Frequently asked questions

What is a t-test?

A t-test compares means using a t statistic whose reference distribution is Student’s t with a chosen degrees of freedom. This page uses summary statistics (n, mean, sample SD) instead of pasting raw columns.

Which mode should I pick?

One-sample tests a sample mean against a fixed μ₀. Two-sample compares independent groups. Paired compares matched measurements via the mean and SD of differences.

When should I use pooled vs Welch?

Pooled assumes a common population variance for both groups (classical equal-variance two-sample t). Welch relaxes that assumption and adjusts df—often preferred when spreads may differ and you are not sure pooling is safe.

What does the two-sided p-value mean?

It is the symmetric-tail probability under the null of seeing |t| at least as large as yours. Compare it to your chosen α (often 0.05) only in the way your course or organization prescribes—p alone is not a substitute for design and diagnostics.

Do you show one-sided p-values?

Not in v1 (UI stays two-sided only). In Excel, T.TEST with tails = 1 gives a one-tailed path when that matches your hypothesis wording.

How is this different from a z-test?

z tests often assume a known population σ or rely on large-sample normal approximations. t uses a sample s and df tied to n, which matters more when n is small. See the z-score page for standardizing one value vs μ and σ on a normal model.

Which Google Sheets or English Excel functions relate to this page?

T.TEST(range1, range2, tails, type) compares data ranges; type picks paired, two-sample equal, or two-sample unequal variance. T.DIST.2T(abs(t), df) reproduces a two-sided p-value from t and df when definitions match.

What are the German Excel names for T.TEST and T.DIST.2T?

Typical Excel (Deutsch) names include T.TEST (same) or legacy variants, and T.VERT.2S for the two-tailed cumulative t density check—confirm in your Insert function dialog; separators may be semicolons.

What are the French Excel names for T.TEST and T.DIST.2T?

Typical Excel (français) names include TEST.STUDENT for T.TEST and LOI.STUDENT.BILATERALE for T.DIST.2T—verify on your install.

Can I get a confidence interval for the mean difference here?

Not in v1. Use the confidence interval calculator when you need two-sided intervals for a mean (z with known σ, t with unknown σ, or pasted raw data).

Is this suitable for clinical or regulatory work?

No. This page is a free educational calculator. Clinical and regulated workflows need protocol-driven statistics, documented software validation, and qualified review.

Can I paste raw before/after columns?

Not in v1. Compute and s_d in Sheets or Excel first (difference column, then AVERAGE and STDEV.S), then use paired mode here.

Is this professional statistics advice?

No. It helps you check t, df, and a two-sided p-value from summary statistics with transparent formulas—use qualified help when decisions depend on the result.