🔒 100% private — runs in your browser, nothing is uploaded

T Test Calculator

One-sample and two-sample (Welch) t tests with t, degrees of freedom and two-tailed p-values.

A t test compares a mean (or a difference of means) with its own standard error, asking whether the observed gap is large relative to the noise the sample size implies. The one-sample test on this page’s default data — (5, 6, 7, 8, 9) against μ₀ = 5 — has mean 7, standard error 0.7071, so t = 2.828 on 4 degrees of freedom and the two-tailed p ≈ 0.0474: just under the conventional 0.05 line, which makes it a tidy illustration of how arbitrary that line is. The two-sample version is Welch’s, which estimates its degrees of freedom from the data (that is why they can be fractional) and does not force the two groups to share a variance.

A t test leans on assumptions: the observations are independent, and the data (or, in larger samples, the mean) are roughly normally distributed — the two-sample version here is Welch’s, which does not assume equal variances. Small samples with strong skew or outliers can make the p-value misleading, and a p-value is never the probability that the null hypothesis is true.

Quick answers

How do you calculate a one-sample t test?

t = (sample mean − μ₀) ÷ (s ÷ √n). For (5, 6, 7, 8, 9) against μ₀ = 5: mean 7, s ≈ 1.581, standard error ≈ 0.707, so t ≈ 2.828 on 4 df, two-tailed p ≈ 0.0474.

The p-value comes from the t distribution, which has heavier tails than the normal at small samples — that is the penalty for estimating the spread from the same small sample.

What does “not significant” actually mean?

That this sample, at this size, does not provide enough evidence (conventionally p ≥ 0.05) to reject the null — nothing stronger. A real effect can hide under an underpowered test, and “no evidence of a difference” is not “evidence of no difference”.

Likewise a significant p is not a measure of importance: with a huge sample, a trivially small difference can be highly significant. Report the size of the difference alongside the p-value, always.

How to use

  1. Choose the test: one sample against a known μ₀, or two independent samples (Welch version).
  2. Paste the sample (and the second sample, in two-sample mode) with values separated by commas, spaces or new lines.
  3. In one-sample mode, enter the μ₀ you are testing against — the worked default tests (5, 6, 7, 8, 9) against 5.
  4. Read t, the degrees of freedom and the two-tailed p-value, then weigh them against the assumption notes before concluding anything.

About this tool

The assumptions are the substance, not fine print. The test presumes independent observations; it presumes the underlying data are roughly normal — with larger samples the mean’s own distribution does much of this work, but with n of 5 or 6, skew and outliers can move the p-value materially, and no output line can warn you about data the page cannot see. A p-value is the probability of data at least this extreme if the null held — never the probability that the null is true — and “p ≥ 0.05” means “not enough evidence here”, not “no effect”. This page computes the textbook statistics correctly, including p-values from the t distribution via the incomplete beta function; it does not endorse any medical, scientific or business conclusion you draw from them, and real decisions deserve the study design, not just the statistic.

Frequently asked questions

What is the difference between the one-sample and two-sample tests?

One-sample tests a single group’s mean against a fixed reference value μ₀ (a specification, a target, a published norm). Two-sample tests two groups’ means against each other. The machinery is the same — estimate divided by standard error — but the question and the standard error differ.

Why is the two-sample test labelled Welch?

Because it does not assume the two groups have equal variances: each group’s variance enters the standard error separately, and the degrees of freedom are estimated (Welch–Satterthwaite), often landing between the two group sizes minus two. It is the safer default; the older pooled test is only better when variances really are equal, which you rarely know in advance.

What does a p-value of 0.047 mean?

If the null hypothesis were true (the population mean really equals μ₀), data at least this far from μ₀, in either direction, would occur about 4.7% of the time over repeated sampling. It is not a 95.3% probability that the effect is real, and it says nothing about whether the difference is big enough to matter.

How many observations do I need?

Two is the arithmetic minimum — and nearly meaningless, because the standard error from two points is extremely unstable. The t distribution’s fat tails are exactly the price of small samples. There is no magic number, but treat any conclusion from single-digit n as provisional, however clean the p-value looks.

📦 Embed this tool on your site

<iframe src="https://verystep.com/embed/t-test-calculator/" title="T Test Calculator" width="100%" height="520" loading="lazy" style="border:0"></iframe>

Free to use. The embed shows a small "Powered by Verystep" link.

First time embedding? Read the step-by-step guide →

More free tools