t-Statistic Calculator

T-Statistic Calculator

Calculate a t statistic from summary figures (means, standard deviations and sample sizes) with every step shown, plus its degrees of freedom and p-value.

t = (x̄ − μ₀) ÷ (s ÷ √n)

Use the sample standard deviation (divide by n − 1).

Fill in all the summary figures

What is a T-Statistic?

A t-statistic measures how far an observed difference is from zero, in units of its standard error. A t of 2 means the difference is twice as big as the random wobble you'd expect in it.

It's the heart of every t-test, and of the coefficient tests in regression. Bigger t-values (positive or negative) mean stronger evidence of a real difference; values near zero mean the difference is about as big as chance would produce.

Working from summary figures is common: papers and reports usually give means, SDs and sample sizes rather than the raw data. This page turns those straight into t, its degrees of freedom and a p-value.

T-Statistic Formula

As given in OpenStax Introductory Statistics, sections 9 and 10. See Sources.

1. The difference you observed

One sample: x̄ − μ₀ · two samples: x̄₁ − x̄₂

2. Its standard error

One sample: SE = s ÷ √n
Two samples: SE = √(s₁²/n₁ + s₂²/n₂)

3. Divide

t = difference ÷ SE, df = n − 1 (one sample) or Welch's df

Worked Example: A Sample Mean of 52.3

Given:
A report gives a sample mean of 52.3, SD 6.1, from 25 people. Is that different from 50?
Step 1:
Difference:
52.3 − 50 = 2.3
Step 2:
Standard error:
6.1 ÷ √25 = 1.22
Step 3:
t and p:
2.3 ÷ 1.22 = 1.885 · df 24 · p = 0.072
Result:
t = 1.885, not significant at 5%

The critical value for 24 df is 2.064, so the sample is suggestive but not conclusive. With 100 people and the same mean and SD, t would double to 3.77.

How Sample Size Changes t

The worked example's mean (52.3), SD (6.1) and target (50), with different sample sizes.

t and p for different sample sizes
ntp (two-tailed)
101.1920.2636
251.8850.0716
502.6660.0104
1003.770.0003
4007.5413.175e-13

Common T-Statistic Mistakes

  • Dividing by s instead of s ÷ √n. The t statistic uses the standard error of the mean, not the standard deviation of the data.
  • Using a reported standard error as the SD. Papers often give SE or SEM. Multiply by √n to get the SD before entering it.
  • Wrong degrees of freedom. One sample of 25 has 24 df, not 25.
  • Reading a large t as a large effect. t grows with √n. A huge sample makes even a tiny difference produce a big t.

T-Statistic FAQs

What is a good t-value?

For a two-tailed test at 5% with a reasonable sample, |t| above about 2 is significant. The exact cut-off depends on the degrees of freedom.

Can a t-statistic be negative?

Yes. The sign shows the direction: negative means the sample mean (or group 1) is below the comparison.

What’s the difference between t and z?

z uses a known population SD; t uses the sample SD and allows for the extra uncertainty with heavier tails.

Where does √n come from?

The spread of a sample mean shrinks with the square root of the sample size, so the SE is s ÷ √n.

How do I get t from a paper’s confidence interval?

For a 95% CI from a large sample, SE ≈ (upper − lower) ÷ 3.92. Then t = estimate ÷ SE.

Do I have the raw data instead?

Use the t-test calculator, which works from raw values and also handles paired data.

Why does the two-sample df look odd?

Welch’s formula combines both groups’ variances and sizes, so the df usually isn’t a whole number.

How is t used in regression?

Each coefficient’s t is the coefficient divided by its standard error. It tests whether that coefficient differs from zero.

Sources

Related Tools