t-Statistic Calculator

Quick answer

The t-statistic calculator computes t = (x̄ − μ) ÷ (s/√n) from a sample mean, population mean, standard deviation and sample size, with the standard error, degrees of freedom, p-values and critical t. It can also work backwards to the sample mean that gives a target t.

t-statistic
1.8447
Sample mean (x̄)
103.5
Degrees of freedom (n − 1)
39
Standard error (s/√n)
1.89737
p-value for the chosen test
0.07
Two-tailed p-value
0.07
One-tailed p-value (in the direction of t)
0.04
Decision
Do not reject H₀ at α = 0.05 – p = 0.0727 > 0.05, so t = 1.8447 is not extreme enough.
Critical t
±2.0227
Confidence interval for the mean (1 − α)
95% CI: 99.6622 to 107.3378
Effect size (Cohen's d)
0.2917
t distribution with rejection region

The t statistic measures how many standard errors a sample mean lies from a hypothesised population mean. It is the heart of Student’s t-test, used whenever the population standard deviation is unknown and must be estimated from the sample, which is almost always. The standard error s ÷ √n shrinks as the sample grows, so the same difference in means gives a larger t with more data.

Because s is itself an estimate, t does not follow the normal distribution exactly. It follows Student’s t distribution with n − 1 degrees of freedom, which has heavier tails than the normal for small samples and approaches it as n increases. That is why a t of 2 is significant at 5% with 60 observations but not with 5.

The distribution was published in 1908 by William Sealy Gosset, a chemist at the Guinness brewery who wrote under the pen name “Student”. Use this calculator to get t quickly, check homework, or find the sample mean that would be needed to reach a given t.

How to use the t-Statistic Calculator

  1. Calculate
  2. Sample mean (x̄)
  3. t-statistic
  4. Population (hypothesised) mean (μ)
  5. Sample standard deviation (s)
  6. Sample size (n)
  7. Test type
  8. Significance level (α)

Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.

How it works

Enter the sample mean, the hypothesised population mean, the sample standard deviation and the sample size. The calculator divides the difference in means by the standard error and evaluates the t distribution with n − 1 degrees of freedom for the p-value and critical value. Switch the mode to find the sample mean from a t value.

Worked example

A teacher’s 40 students score a mean of 103.5 with a standard deviation of 12 on a test whose national mean is 100. SE = 12 ÷ √40 = 1.897, so t = 3.5 ÷ 1.897 = 1.845 with 39 degrees of freedom.

The two-tailed p-value is 0.073 and the critical t at α = 0.05 is ±2.023, so the class is not significantly different from the national mean in a two-tailed test. A right-tailed test (H₁: μ > 100) gives p = 0.036, which would be significant, but only if that direction was chosen in advance.

Critical t values (two-tailed)

df α = 0.10 α = 0.05 α = 0.01
5 2.015 2.571 4.032
10 1.812 2.228 3.169
20 1.725 2.086 2.845
30 1.697 2.042 2.750
60 1.671 2.000 2.660
∞ 1.645 1.960 2.576

Formula

t = (x̄ − μ) ÷ (s / √n) · SE = s / √n · df = n − 1 · x̄ = μ + t × s / √n

Worked example

Inputs: Calculate: t-statistic from the sample mean; Sample mean (x̄): 103.5; Population (hypothesised) mean (μ): 100; Sample standard deviation (s): 12; Sample size (n): 40; Test type: Two-tailed (H₁: not equal); Significance level (α): 0.05.
Results: t-statistic = 1.8447; Sample mean (x̄) = 103.5; Degrees of freedom (n − 1) = 39; Standard error (s/√n) = 1.89737; p-value for the chosen test = 0.07; Two-tailed p-value = 0.07.

Key terms

t-statistic
The difference between sample and hypothesised mean in units of the standard error.
Standard error (SE)
s ÷ √n, the standard deviation of the sample mean.
Degrees of freedom
n − 1 for a one-sample t statistic.
Cohen's d
The difference in means divided by the standard deviation, giving the effect size in SD units.

Frequently asked questions

How do I calculate a t-statistic?

Subtract the hypothesised mean from the sample mean and divide by s ÷ √n. For x̄ = 103.5, μ = 100, s = 12 and n = 40: SE = 1.897 and t = 1.845.

What is a good t-statistic?

There is no fixed value, as it depends on df and α. With large samples |t| > 1.96 is significant at 5% two-tailed; with 10 df you need |t| > 2.228.

What is the difference between a t-score and a z-score?

A z-score uses the known population standard deviation; a t-score uses the sample standard deviation and so follows the t distribution.

Can a t-statistic be negative?

Yes. A negative t means the sample mean is below the hypothesised mean; for a two-tailed test only |t| matters.

Why is it called Student's t?

William Gosset published it in 1908 under the pseudonym "Student" because his employer, Guinness, did not allow staff to publish under their own names.

What sample mean gives t = 2?

x̄ = μ + 2 × s ÷ √n. With μ = 100, s = 12 and n = 40 that is 103.79.

Sources

  1. NIST/SEMATECH e-Handbook of Statistical Methods
  2. OpenStax: Introductory Statistics 2e
  3. Khan Academy: Statistics and probability

Cite this calculator

Speedy Calculator. (2026). t-Statistic Calculator. Speedy Calculator. https://speedycalculator.com/calculators/statistics/t-statistic/