ThisCalculator

Everyday

How to Calculate a t Score: Formula and Examples

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

How to Calculate a t Score: Formula and Examples

A t score shows how far a sample result is from a reference value, measured in standard-error units. Enter the sample mean, hypothesized mean, sample standard deviation, and sample size to calculate a one-sample t score; the result can help you assess how unusual the sample mean is under the null hypothesis.

Formula

For a one-sample t test, subtract the hypothesized population mean from the sample mean, then divide the difference by the estimated standard error:

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

  • t is the t score, a unitless value.
  • x̄ (sample mean) is the average of the sample measurements. Use the same measurement unit as the hypothesized mean.
  • μ₀ (hypothesized mean) is the reference population mean specified by the null hypothesis, in the same unit as x̄.
  • s is the sample standard deviation, in the measurement unit of the data.
  • n is the number of observations, a positive whole number.
  • √n is the square root of the sample size. The denominator, s/√n, is the standard error of the sample mean.

For this one-sample test, the degrees of freedom are df = n − 1. The calculator accepts any consistent measurement unit because the units cancel in the ratio. For example, use inches throughout or centimeters throughout; do not mix them.

Worked Example

Using the calculator’s default values, the sample mean is 12, the hypothesized mean is 10, the sample standard deviation is 3, and the sample size is 9.

  1. Find the difference between the means: 12 − 10 = 2.
  2. Calculate the square root of the sample size: √9 = 3.
  3. Calculate the standard error: 3 / 3 = 1.
  4. Divide the difference by the standard error: t = 2 / 1 = 2.000.
  5. Calculate degrees of freedom: df = 9 − 1 = 8.

The t score is 2.000, and the standard error is 1.000 in the same unit as the measurements. A positive score means the sample mean is above the hypothesized mean; a negative score would mean it is below.

What You’ll Need

  • The sample mean and the hypothesized mean, expressed in the same unit.
  • The sample standard deviation, not the population standard deviation, for the usual one-sample t calculation.
  • The number of observations in the sample.
  • A clear choice of test: this guide and calculator use a one-sample t score. Other t tests require different formulas or inputs.

Step-by-Step

  1. Identify the question and test type. A one-sample t test compares one sample mean with a fixed reference mean. If you are comparing two independent groups, paired measurements, or a sample against a regression estimate, do not use this formula unchanged; choose the matching t-test procedure.
  2. Set the reference mean. Write down the null-hypothesis value, μ₀. It is the benchmark you are testing against, not a value calculated from the sample. Keep its units consistent with the sample data.
  3. Find the sample mean. Add the sample observations and divide by their count, or use a correctly calculated mean. Record it as x̄.
  4. Calculate the sample standard deviation. This describes how spread out the observations are around the sample mean. For a sample, the standard deviation uses n − 1 in its variance calculation. Do not substitute the standard error here: the standard error is calculated next.
  5. Count the observations. Enter n as the number of usable data points. It must be greater than zero, and for this one-sample t test it must be at least 2 to calculate a sample standard deviation and degrees of freedom.
  6. Calculate the standard error. Divide s by the square root of n: SE = s/√n. This estimates how much sample means typically vary from sample to sample under the model.
  7. Calculate the t score. Subtract μ₀ from x̄, then divide by SE. Preserve the sign: a result above zero indicates x̄ is greater than μ₀; a result below zero indicates it is less.
  8. Find degrees of freedom and interpret the result. For a one-sample t test, calculate df = n − 1. To get a p-value or compare the result with a critical t value, use the appropriate t distribution, degrees of freedom, and the test’s one-sided or two-sided alternative. The t score alone is not a p-value or proof of an effect.

Common Mistakes

  • Using the wrong standard deviation. The formula needs the sample standard deviation s in the numerator of the standard error. Dividing s by √n produces the standard error; do not divide by √n twice.
  • Mixing units. A sample mean in centimeters and hypothesized mean in inches cannot be subtracted directly. Convert one so both means and the standard deviation use the same unit.
  • Using the wrong test formula. A two-sample or paired t test does not generally use the one-sample formula. Select the formula based on how the observations were collected.
  • Rounding too soon. Keep full precision for the standard error and division, then round the final t score. Early rounding can change the result, especially near a decision threshold.
  • Confusing t with a probability. A t score can be positive, negative, or zero. A p-value is a probability derived from the t score and its reference distribution, not the t score itself.

Tips

  • Write the formula and label each number before substituting values; this makes it easier to spot a mismatched input.
  • Keep the unrounded mean and standard deviation available if you are calculating from raw observations.
  • Report the result with context, such as t(8) = 2.00, and include the p-value or confidence interval when your analysis requires one.
  • Check the assumptions relevant to your design. A one-sample t procedure assumes independent observations and, especially for small samples, data without severe skew or influential outliers.
  • Use a statistical calculator or software for the p-value and confidence interval when you need them; specify the correct degrees of freedom and whether the test is one- or two-sided.

Troubleshooting

  • The result is unexpectedly negative: Check the subtraction order. The formula is sample mean minus hypothesized mean. A negative score may be correct if the sample mean is lower.
  • The calculator shows an error or cannot calculate: Confirm that n is at least 2, all entries are numeric, and the sample standard deviation is not missing. If s is zero, the standard error is zero and this formula cannot produce a finite t score; investigate whether all observations are identical or the input was entered incorrectly.
  • Your answer differs from software: Verify that both calculations use the same test type, observations, hypothesized mean, and sample standard deviation. Check whether the software uses a paired test, handles missing data differently, or displays more or fewer decimals.
  • You need a p-value but have only t: You also need the degrees of freedom and the test direction. For a one-sample test, df = n − 1. Use a t distribution function or table and select a one- or two-sided probability as specified by the hypothesis.
  • The data have strong outliers or dependence: Do not assume the t score gives a reliable inference. Check the study design and distribution, and consider whether a different analysis is appropriate.

Frequently Asked Questions

What does a t score tell you?
It measures the difference between a sample mean and its hypothesized mean in estimated standard-error units. Its sign shows the direction of the difference.

Can a t score be negative?
Yes. A negative score means the sample mean is below the hypothesized mean when the formula uses sample mean minus hypothesized mean.

Is a t score the same as a t statistic?
In a t test, the calculated t score is commonly called the t statistic. It is compared with a t distribution to obtain a p-value or critical-value decision.

How do I calculate degrees of freedom?
For the one-sample t test described here, subtract one from the sample size: df = n − 1. Other t-test designs can use different degrees-of-freedom formulas.

Can I calculate a t score without a standard deviation?
Not with this formula. You need the sample standard deviation, or the raw observations so you can calculate it. If a population standard deviation is known, a z procedure may be appropriate instead.

What is a good t score?
There is no universal good value. Interpretation depends on the degrees of freedom, whether the test is one- or two-sided, the chosen significance level, and the practical importance of the difference.

Related

Formula used
in x | Sample mean | - | 12 | 
in m | Hypothesized mean | - | 10 | 
in s | Sample standard deviation | - | 3 | 0
in n | Sample size | - | 9 | 1
out t | t score | - | (x - m) / (s / sqrt(n)) | 3
out df | Degrees of freedom | - | n - 1 | 0
out se | Standard error | - | s / sqrt(n) | 3

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.