Skip to main content

t-statistic Calculator

The t statistic is the single number that carries a t test: it says how many standard errors the observed difference sits from the null value. This calculator produces it for all three designs and reports the degrees of freedom, standard error and effect size that go with it.

Enter summary numbers, or paste the raw observations.

Separate the numbers with commas, spaces or new lines.

The mean, or mean difference, assumed under H₀.

Pair with the matching value from the "after" list by position.

What Is the t-statistic Calculator?

The t statistic is the standardised difference at the heart of Student’s t test. It answers a single question: how many standard errors is the observed difference from the null value?

It exists because the population standard deviation is rarely known in advance. Estimating it from the sample adds uncertainty, and the t distribution is the reference curve that accounts for exactly that.

How Does the t-statistic Calculator Work?

One sample: divide the gap between the sample mean and the null value by s/√n. Two independent samples: divide the gap between the group means by √(s₁²/n₁ + s₂²/n₂). A paired test: divide the mean difference by the standard error of those differences.

Degrees of freedom follow from how much independent information went into the estimate. One sample and paired designs give n − 1. Two samples give n₁ + n₂ − 2 under equal variance, or the Welch–Satterthwaite value when the variances differ.

Effect sizes translate the same result into a unit-free description. Cohen’s d divides by the pooled SD; Hedges’ g adds a small-sample correction so the figure is less optimistic when n is small.

t-statistic Calculator Formula & Variables

The core mathematical equation utilized by this calculator is expressed as:

t=ΔSESE=snSE=s12n1+s22n2SE=sdnt = \frac{\Delta}{\mathrm{SE}} \qquad \mathrm{SE} = \frac{s}{\sqrt{n}} \qquad \mathrm{SE} = \sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}} \qquad \mathrm{SE} = \frac{s_d}{\sqrt{n}}

Variable Definitions

SymbolVariable Meaning & Units
Δdifference between the sample mean and the null value
ssample standard deviation
nsample size
sds_dstandard deviation of the paired differences
dfdegrees of freedom — n − 1, or the Welch expression

Every design reduces to the same shape: a difference divided by the standard error of that difference. What changes is how the standard error is built and how many degrees of freedom remain afterwards. The paired design is the one to watch — it uses the spread of the differences, not of either original sample.

How to Use the t-statistic Calculator

  1. Pick the design that matches how your data were collected. If the same subjects were measured twice, it is paired — never two-sample.
  2. Choose summary numbers or raw observations. Raw input avoids arithmetic slips and lets the calculator derive the mean and SD itself.
  3. For paired data, list the pairs in matching order in the two boxes. Position determines the pair.
  4. Read the standard error alongside the statistic. A large t can come from a big difference or a small standard error, and those have very different practical meanings.

Step-by-Step Example Calculation

A sample with mean 12.8, SD 2.049 and n = 5, tested against 10

Input Values:

design:one_sample
inputMode:summary
mu0:10
mean1:12.8
sd1:2.049
n1:5
Worked Steps: SE = 2.049 ÷ √5 = 0.9165, so t = 2.8 ÷ 0.9165 = 3.055 on 4 degrees of freedom, giving a two-tailed p-value near 0.0378.

Understanding Your Result

The degrees of freedom tell you how much the reference distribution has spread out. Small df means t critical values are large, so you need a bigger t for the same evidence.

The p-value shown here is two-tailed. If your hypothesis is directional, halve it after converting to a single tail.

Cohen’s d and Hedges’ g are magnitudes, not verdicts. A large effect in a tiny sample can be nowhere near significant, and a tiny effect in a huge sample can be reliably detected.

Factors That Affect the Result

  • Sample size, which shrinks the standard error as 1/√n and therefore inflates t for an unchanged difference.
  • Within-group variability. The same difference produces a larger t when the data are tightly clustered.
  • Pairing. Removing subject-level variation can move a marginal result to clearly significant, and conversely a badly matched pairing wastes that advantage.
  • Distance from the null value, which is the only term that reflects your actual findings.

When Should You Use This Calculator?

  • You have summary statistics from a study and want to see the t statistic they imply.
  • You are checking someone else’s reported t against your own calculation.
  • You need the effect size alongside the significance result.
  • Teaching or coursework on how the t statistic is constructed for each design.

Assumptions & Limitations

  • Observations must be independent within each group. Clustered or repeated measures violate this without any visible warning.
  • The data should be approximately normal, or the sample large enough for the CLT to carry the approximation. Small samples from skewed populations are the main failure mode.
  • Outliers dominate. A single extreme value can move both the mean and the SD enough to change the conclusion.
  • Welch’s approximation is itself an approximation in very small samples, though it is a good one.

Frequently Asked Questions

Calculation Accuracy & Reference Note

The t distribution tail probabilities are computed by an accurate incomplete-beta evaluation, which is reliable to many more digits than are displayed.

Standard Reference: Student’s t distribution; Welch–Satterthwaite degrees of freedom; Cohen (1988), Hedges (1981).