Statistics & Data Analysis

Student’s t-test Calculator

Run one-sample, Welch or pooled independent, and paired t-tests from observations or summaries; inspect the mean difference, SE, p-value and interval.

Choose by data structure · Welch default · pre-specify H₁ and α

Inputs

Test type
Input method

Separate values with commas, spaces or newlines. Use consistent units; omit unit signs and thousands separators. Up to 10,000 observations.Observations: 8

Alternative hypothesis H₁

For example, 0.05 = 5%; supported range: 0.000001 to 0.5.

Raw observations are processed only in this tab. Shared cards contain calculated summaries; recalculate after editing inputs.

Results

Start with your numbers

Review or adjust your inputs, then calculate to see your results and interpretation.

Understand this calculation

The t statistic measures the estimated departure from the null in standard errors. With the same mean gap, greater dispersion usually raises SE; more independent observations usually lower it. A p-value is the probability of a statistic at least as extreme under H₀ and the model assumptions, not the probability that H₀ is true.

See calculation method and assumptions

Formula

One-sample and paired differences

Welch mean difference and SE

Pooled equal variance and two-sided interval

Variables, rates and periods

H₀ / H₁
Null and alternative; choose direction before inspecting data.
x̄, μ₀, s, n
Sample mean, null mean, sample SD and count.
vA, vB, ν
sA²/nA, sB²/nB and Welch degrees of freedom, which can be fractional.
sp², SE
Pooled variance and standard error; pooling assumes equal variances.
dᵢ, δ₀
Paired A−B difference and null difference.
α, p
Preset significance level and extremeness probability under the null model.

Define the question first

  • For one sample, H₀ specifies a population mean μ₀.
  • Independent and paired tests usually specify a mean difference Δ₀.
  • H₁ may be unequal, greater or less.
  • Choose α, the planned Type I error rate, and the direction before examining the outcome.

SD, SE and effect size

  • Sample SD describes individual dispersion;
  • SE describes sampling variation in the estimate.
  • A tiny mean difference can become significant in a large sample while remaining unimportant.
  • Ask how large the difference is, how uncertain it is and whether it changes a decision.

Independent and paired observations

  • Two groups of different units need an independent-sample method.
  • Before–after observations on the same units need aligned differences.
  • Handle missing pairs together;
  • independently removing blanks and pairing the remaining rows changes the data.

Conditions for t inference

  • Observations or pair differences should be representative and independent.
  • Small samples need approximately normal errors without severe outliers.
  • Larger samples do not automatically fix selection bias, serial dependence or heavy tails.
  • More trading days are not necessarily more independent information.

Run one-sample, Welch or pooled independent, and paired t-tests from observations or summaries; inspect the mean difference, SE, p-value and interval.

Worked example

  1. Choose one-sample and enter data or n=20, mean=53 and sample SD=6.
  2. Set μ₀=50 and α=0.05; choose the alternative before looking at results.
  3. Read the estimated difference, SE, df, p-value and matching interval, then check sampling assumptions.

Frequently asked questions

Why is Welch the independent-sample default?

Welch allows unequal population variances and uses a separate SE contribution from each group with approximate df. Pooled t adds an equal-variance assumption; equal sample sizes alone do not justify it.

How does pairing change the test?

A paired test is a one-sample t-test of within-unit differences. Shared individual variation may cancel, but the differences still need independence and suitable distribution assumptions.

Why is a one-tail interval one-sided?

A directional alternative has a one-sided confidence bound and an unbounded opposite end. The tool labels that end as unbounded rather than inventing a finite number. Two-sided tests have two-sided intervals.

Related calculators