Docelora
ToolsAboutContact
Statistics

t-Test Calculator

Test whether a mean differs from a value, or whether two means differ, using Student’s t distribution. Enter summary statistics or paste your raw data.

Quick answer: for two groups with means 52.1 and 48.3, standard deviations 6.2 and 5.8 and 30 people each, Welch’s t = 2.45 with about 57.8 degrees of freedom, giving a two-tailed p-value of about 0.017 – significant at the 5% level.

t-Test Calculator

Enter your figures and select Calculate. Everything is worked out in your browser.

Result
Formula / method: One-sample: t = (x̄ − μ) ÷ (s/√n), df = n − 1. Welch: t = (x̄₁ − x̄₂) ÷ √(s₁²/n₁ + s₂²/n₂), df by Welch–Satterthwaite. Paired: one-sample test on the differences. p from Student’s t distribution.

How to use the calculator

1. Choose the testOne sample, two independent samples or paired.
2. Enter dataPaste raw numbers, or type the means, standard deviations and sizes.
3. Choose the alternativeTwo-tailed unless you predicted a direction in advance.

Which t-test?

TestUse when
One-sampleComparing one group’s mean with a known value
Welch two-sampleComparing two independent groups; does not assume equal variances
PairedThe same people measured twice, or matched pairs

t-tests assume the data (or differences) are roughly normally distributed, or that samples are large enough for the central limit theorem to help. A p-value below your significance level – commonly 0.05 – suggests the difference is unlikely to be due to chance alone, but says nothing about how large or important it is; report an effect size and confidence interval too. The p-value is computed from the exact Student’s t distribution.

Related calculators

Frequently asked questions

What does a t-test do?

It tests whether a mean, or a difference between means, is statistically different from a value.

What is a p-value?

The probability of a result at least this extreme if the null hypothesis were true.

What is Welch’s t-test?

A two-sample t-test that does not assume equal variances.

When should I use a paired t-test?

When each value in one group is linked to one in the other, such as before and after.

One-tailed or two-tailed?

Two-tailed unless you specified a direction before collecting data.

What are degrees of freedom?

A parameter of the t distribution related to sample size.

Is p < 0.05 always meaningful?

No – it does not measure size or importance of an effect.

Does it need normal data?

Roughly, especially for small samples.

What if my data are not normal?

Consider a non-parametric test such as Mann–Whitney or Wilcoxon.

Can I paste data from Excel?

Yes – columns or rows of numbers work.

What is Student’s t-test?

The equal-variance version; Welch’s is generally recommended instead.

How accurate is the p-value?

It uses the exact t distribution via the incomplete beta function.

What sample size do I need?

Use a power analysis or sample size calculator.

What is a t statistic?

The difference divided by its standard error.

Is my information stored?

No. Everything is calculated in your browser.

Does it work on a phone?

Yes. The calculator is designed for mobile and desktop browsers.

Is it free?

Yes, with no sign-up.

Can I copy the result?

Yes – use the Copy result button.

Does it work for small samples?

Yes, from two observations, though power will be low.

Can I test against a non-zero difference?

Yes – enter it as the hypothesised difference.

Docelora calculators give estimates for general information and planning. They are not financial, tax, legal or medical advice. Check important figures with the official source or a qualified professional.

Last reviewed: 7 November 2026.