How Do You Calculate a T Score? Formula + Steps (2026)

By culbreath Editorial · 2026-10-11 · 6 min read

To calculate a t score, subtract the population mean from the sample mean, then divide that difference by the standard error of the mean — the sample standard deviation divided by the square root of the sample size. In formula form, that is t = (x̄ − μ) ÷ (s ÷ √n). The result expresses how many standard errors your sample mean sits away from the population mean, which is what you need for hypothesis testing and confidence intervals.

T Score Formula

The one-sample t score formula is:

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

Each variable has a specific role:

  • x̄ (sample mean): the average of the values you measured.
  • μ (population mean): the hypothesized or known average you are testing against.
  • s (sample standard deviation): how spread out your sample values are around x̄.
  • n (sample size): the number of observations in your sample.

The denominator, s ÷ √n, is the standard error of the mean. It estimates how much a sample mean would vary from sample to sample if you repeated the study many times. Dividing the mean difference by the standard error converts a raw difference into a standardized score, which is why results from different studies can be compared.

Why the Formula Looks Like This

A t score and a z score share the same logic: both measure distance from a mean in units of standard error. The difference is that a z score uses the true population standard deviation (σ), while a t score uses the sample standard deviation (s) as an estimate. Because s is estimated from limited data, it carries extra uncertainty, and the t-distribution accounts for that with heavier tails than the normal curve.

Step-by-Step Calculation

Here is the process for a one-sample t test, in order.

Step 1: State the Hypotheses

Define the null hypothesis (usually H₀: μ = some value) and the alternative (μ ≠, >, or < that value). The direction you choose affects whether the test is two-tailed or one-tailed.

Step 2: Collect and Identify Your Values

Gather your sample data, then find four numbers: x̄, μ, s, and n. The population mean μ comes from the claim you are testing, not from your data.

Step 3: Compute the Sample Standard Deviation

If it is not given, calculate s from your raw data. In most spreadsheets and statistical software, use the sample standard deviation function (often labeled STDEV.S), not the population version. Using the wrong one changes the result.

Step 4: Calculate the Standard Error

Divide s by the square root of n: SE = s ÷ √n. Larger samples shrink the standard error, which tends to produce larger t values for the same mean difference.

Step 5: Compute the t Score

Substitute into the formula: t = (x̄ − μ) ÷ SE. Keep the sign — a negative t means your sample mean fell below the hypothesized mean.

Step 6: Find Degrees of Freedom and Compare

For a one-sample test, degrees of freedom (df) equal n − 1. Look up the critical value for your df and chosen significance level, or compute a p-value, then decide whether to reject H₀.

Worked Example

Suppose a coffee shop claims its medium latte contains 120 mg of caffeine (μ = 120). You test 16 lattes (n = 16), finding a sample mean of 126 mg (x̄ = 126) and a sample standard deviation of 8 mg (s = 8).

  1. Mean difference: 126 − 120 = 6
  2. Standard error: 8 ÷ √16 = 8 ÷ 4 = 2
  3. t score: 6 ÷ 2 = 3.00
  4. Degrees of freedom: 16 − 1 = 15

A t of 3.00 with 15 df is large enough to be statistically significant at the common 0.05 level for a two-tailed test, suggesting the true mean likely differs from 120 mg.

For an independent two-sample t test, the formula becomes:

t = (x̄₁ − x̄₂) ÷ √(s₁²/n₁ + s₂²/n₂)

This version is the Welch test, which does not assume equal variances. Software handles the degrees of freedom for this test, which are calculated from the sample variances and sizes rather than simply n₁ + n₂ − 2.

Interpreting Results

A t score on its own is just a number. To interpret it, you need degrees of freedom, the shape of the t-distribution, and a comparison standard such as a critical value or p-value.

Degrees of Freedom

Degrees of freedom reflect how much independent information went into estimating variability. For a one-sample test, df = n − 1. For an independent two-sample test with equal variances assumed, df = n₁ + n₂ − 2. Larger df produce a t-distribution closer to the normal curve.

The T-Distribution

The t-distribution is a family of symmetric, bell-shaped curves centered at zero. Smaller samples yield heavier tails, meaning you need a larger t score to reach significance. As df grows, the tails thin out and the curve approaches the standard normal distribution.

Critical Values and P-Values

Two equivalent approaches exist. With the critical value method, you compare your t score against a cutoff from a t table at your df and significance level (often 0.05). If |t| exceeds the cutoff, you reject the null hypothesis. With the p-value method, you find the probability of observing a t score at least as extreme as yours if the null hypothesis were true. If p is below your significance level, you reject H₀.

A few practical notes: the sign of t tells you direction, not strength. A t of −2.5 is just as extreme as +2.5. And a large t does not automatically mean a large or important effect — with very large samples, even tiny differences can produce significant t scores, so report effect sizes alongside the test result.

Key Takeaways

  • The one-sample t score formula is t = (x̄ − μ) ÷ (s ÷ √n), where the denominator is the standard error of the mean.
  • The t score measures how many standard errors the sample mean lies from the population mean.
  • Degrees of freedom for a one-sample test equal n − 1; for a pooled two-sample test, n₁ + n₂ − 2.
  • Compare your t score to a critical value or convert it to a p-value to decide whether to reject the null hypothesis.
  • Larger samples reduce the standard error, which generally increases the t score for a given mean difference.
  • A significant t score signals statistical evidence, not necessarily practical importance — always consider effect size and context.

Frequently Asked Questions

What is the formula for calculating a t score?
The t score formula is t = (x̄ − μ) / (s / √n), where x̄ is your sample mean, μ is the population mean, s is the sample standard deviation, and n is the sample size. The denominator s / √n is the standard error of the mean.
How do you calculate a t score step by step?
First find your sample mean and the claimed population mean, then compute the sample standard deviation and divide it by the square root of your sample size to get the standard error. Subtract the population mean from the sample mean and divide that difference by the standard error.
What is the difference between a t score and a z score?
A z score is used when the population standard deviation is known, while a t score is used when it is unknown and you estimate it from the sample. T scores also rely on degrees of freedom (n − 1) and have heavier tails, which matters more with small samples.
How do you find the t score for a one-sample t test?
Use t = (x̄ − μ) / (s / √n) with your sample mean, hypothesized population mean, sample standard deviation, and sample size. Then compare the result to a critical t value from the t distribution using df = n − 1 at your chosen significance level.
Can you calculate a t score in Excel?
Yes. You can compute it manually with =(AVERAGE(range)-μ)/(STDEV.S(range)/SQRT(COUNT(range))), or use the T.TEST function to get the p-value directly. Excel's T.INV.2T function gives the critical t value for your confidence level and degrees of freedom.
t scoret statisticstatisticshypothesis testingt teststandard error

References

← Back to home