Skip to content
FiftyCalc Free calculators for all 50 states

T-Statistic Calculator

Test cases replayed : 3 of 3 match · Methodology · No outside source listed

Enter your sample mean, the mean under the null hypothesis, the sample standard deviation and the sample size.

Result

Sample figures

t statistic—

Degrees of freedom (n − 1) —

  • Two-tailed p-value—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

T-Statistic Calculator

Sample mean (x̄): enter a number. Prefilled example: 52.3.

Hypothesized mean (μ₀): enter a number. Prefilled example: 50.

Sample standard deviation (s): enter 0 or more. Prefilled example: 6.1.

Sample size (n): enter 2 or more. Prefilled example: 20.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Sample mean (x̄): enter a number.
  2. Hypothesized mean (μ₀): enter a number.
  3. Sample standard deviation (s): enter 0 or more.
  4. Sample size (n): enter 2 or more.
  5. Read the result: t statistic; the panel also shows Degrees of freedom (n − 1) and Two-tailed p-value.

How this calculator works

t = (x̄ − μ₀) ÷ (s ÷ √n), with n − 1 degrees of freedom, where x̄ is the sample mean, μ₀ the hypothesized mean, s the sample standard deviation and n the sample size.

The two-tailed p-value is P(|T| ≥ |t|) under Student's t distribution, computed with the regularized incomplete beta function.

The formula

  1. T=x̄−mu0s÷n
Symbols used in the formula
SymbolMeaning
x̄Sample mean
mu0Hypothesized mean (μ₀)
sSample standard deviation (s)
nSample size
Tt statistic

Worked example

Sample mean (x̄)52.3
Hypothesized mean (μ₀)50
Sample standard deviation (s)6.1
Sample size (n)20
Degrees of freedom (n − 1)19
Two-tailed p-value0.1081
  1. T=52.3−506.1÷20=1.68622

t statistic 1.6862

Each step uses the unrounded value of the step before it; figures on this page are rounded for display.

Frequently asked questions

When do I use a t statistic instead of a z statistic?

When the population standard deviation is unknown and you use the sample's standard deviation, which is almost always the case.

What is a large t statistic?

With 19 degrees of freedom, |t| above 2.093 is significant at α = 0.05 (two-tailed).

Questions answered

Related calculators