Skip to content
Conyso.
Free tools · Statistics

t-test calculator.

Test whether a difference in means is real or just sampling noise. Run a one-sample, two-sample, or paired t-test, and get the t statistic, the degrees of freedom, and an exact two-tailed p-value from the t-distribution, with the tails shaded live so you can see the evidence.

t = (mean − μ₀) / (SD / √n), with df = n − 1.

— two-tailed p-value
t statistic — df — One-tailed p —
Enter values to run the test.
What this number is not A significant p-value is not proof of a large or important effect, and a non-significant one is not proof of no effect (it may just be underpowered). p assumes the data is roughly normal and was not peeked at repeatedly; report an effect size and CI alongside it.
Run the test on your real data.

Bench runs t-tests, ANOVA, and capability straight from your raw columns, checks the assumptions, and shows the working, free.

Open in Bench ↗

How it works

The method.

A t-test asks a single question: is the difference in means bigger than sampling noise would casually produce? It scales the observed difference by its own standard error to get a t statistic, then reads how far into the tails that t sits on the t-distribution. The area in both tails is the two-tailed p-value.

Three jobs live here. One-sample compares one group's mean to a fixed target, using df = n minus 1. Two-sample compares two independent groups with Welch's test, which does not assume equal variances and adjusts the degrees of freedom with the Welch-Satterthwaite formula. Paired compares matched pairs, such as the same units measured before and after, by testing whether the mean of the differences departs from zero.

The p-value comes from the exact t-distribution, the same incomplete-beta computation the confidence interval tool uses, so it is correct for small samples, not a normal approximation.

±t cutoffs
The p-value is the area past the observed t.

The formula

The maths, in the open.

one-sample: t = (x̄ − μ₀) / (s / √n)  ·  two-sample (Welch): t = (m₁ − m₂) / √(s₁²/n₁ + s₂²/n₂)  ·  two-tailed p = Idf/(df+t²)(df/2, ½)

Worked example. One-sample with mean 52, SD 4, n 25 against μ₀ = 50: t = (52 − 50) / (4 / √25) = 2 / 0.8 = 2.5, df = 24. The exact two-tailed p-value is 0.0197, below 0.05, so the difference is significant at the 5% level (but not at 1%).


Watch out

Common pitfalls.

A p-value is not the probability the null is true, and 0.05 is a convention, not a law of nature. Significance depends heavily on sample size: a trivial difference turns significant with enough data, and a real one stays hidden with too little. Choosing one-tailed after seeing the direction, or running the test repeatedly until it crosses the line, both inflate false positives. Pick the paired test when the data is genuinely paired, treating paired data as two independent groups throws away power.


FAQ

t-tests, answered.

What is a t-test?

A test of whether a difference in means is larger than you would expect from sampling noise alone. It turns the difference into a t statistic, then reads a p-value from the t-distribution.

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

One-sample compares one group's mean to a fixed target. Two-sample compares the means of two independent groups. Paired compares matched pairs, such as the same units before and after, by testing the mean of the differences.

What is a p-value in a t-test?

The probability of seeing a difference this large or larger if the true means were equal. A small p-value, below your alpha such as 0.05, means the difference is hard to explain by chance alone.

Why does this use Welch's t-test for two samples?

Welch's t-test does not assume the two groups share the same variance, so it is safer than the classic pooled test and rarely worse. It adjusts the degrees of freedom with the Welch-Satterthwaite formula.

Does a significant p-value mean the effect is large?

No. A small p-value says the difference is unlikely to be pure noise, not that it is big or important. Always report an effect size and a confidence interval alongside the p-value.

Is this calculator free?

Yes, free and no signup, running entirely in your browser.



Embed this calculator

Put it on your site, free.

A clean, responsive widget that runs in your visitor's browser, no signup. Pick an accent to match your brand, then copy the snippet. The Conyso mark stays on the widget.

Accent
Powered by Conyso.