ThisCalculator

Everyday

How to Calculate T-Score in Statistics

Updated · Standard formula, shown below

t-score 1.826
Standard error
2.739
Result
Degrees of freedom
29
Result
Sample mean
105
You entered

This calculator works out the t-score (also called t-statistic) for a one-sample or paired t-test. You enter the sample mean, the population mean (or hypothesized mean), the sample standard deviation, and the sample size. The calculator returns the t-score, which tells you how many standard errors the sample mean is from the hypothesized mean. A larger absolute t-score means stronger evidence against the null hypothesis.

Formula

The t-score formula for a one-sample t-test is:

t = (x̄ – μ) / (s / √n)

  • x̄ = sample mean (unit of the data)
  • μ = hypothesized population mean (same unit)
  • s = sample standard deviation (same unit)
  • n = sample size (count, dimensionless)
  • s / √n = standard error of the mean (same unit as x̄)

The t-score measures the difference between the sample mean and the hypothesized mean in units of standard error. The degrees of freedom (df) for this test is n – 1, used when looking up the p-value in a t-table or with statistical software.

Worked Example

Using the default values from the calculator:

  • Sample mean (x̄) = 105
  • Hypothesized mean (μ) = 100
  • Sample standard deviation (s) = 15
  • Sample size (n) = 30

Step 1: Compute the difference between the sample mean and the hypothesized mean.

105 – 100 = 5

Step 2: Compute the standard error (SE).

SE = s / √n = 15 / √30 ≈ 15 / 5.477 = 2.7386

Step 3: Divide the difference by the standard error.

t = 5 / 2.7386 ≈ 1.826

So the t-score is approximately 1.826. The calculator shows the same result. With df = 29, this t-score would correspond to a two-tailed p-value of about 0.078 (you would need a t-table or software to get the exact p-value).

When to Use This T-Score

Use this t-score when you have a sample from a normally distributed population (or a large sample, thanks to the Central Limit Theorem) and you do not know the population standard deviation. It is the correct statistic for:

  • One-sample tests: comparing a sample mean to a known or hypothesized value.
  • Paired tests: compute the differences between paired observations, then run a one-sample t-test on those differences with μ = 0.

If you know the population standard deviation, use a z-score instead. If you are comparing two independent samples, use a two-sample t-test formula (which is different).

How to Read the Result

The t-score itself is not the final answer; you need to convert it to a p-value or compare it to a critical value from a t-distribution table. The p-value tells you the probability of observing a t-score as extreme as yours (or more) if the null hypothesis (μ = hypothesized mean) were true. A small p-value (typically less than 0.05) suggests the sample mean is significantly different from the hypothesized mean.

For a one-tailed test, the p-value is the area in one tail of the t-distribution beyond your t-score. For a two-tailed test, it is double that. The calculator gives the t-score, not the p-value, because the p-value depends on the degrees of freedom and whether the test is one- or two-tailed.

Common Mistakes

  • Using the sample standard deviation instead of the standard error. The denominator must be s/√n, not just s. This is the most common error.
  • Forgetting to use n-1 for degrees of freedom. For a one-sample test, df = n-1, not n.
  • Mixing up the sample mean and the population mean. The numerator is always (sample mean – hypothesized mean), not the other way around.
  • Using the t-score when the population standard deviation is known. In that case, use a z-score.
  • Ignoring the sign. The sign of the t-score shows the direction of the difference. A negative t-score means the sample mean is below the hypothesized mean.

Tips

  • Always check that your sample standard deviation is calculated with n-1 in the denominator (sample standard deviation), not n (population standard deviation). Most calculators and software give the sample version by default.
  • If your sample size is large (say n > 30), the t-score and z-score will be very close. But the t-score is still more accurate for small samples.
  • Use a t-table or statistical software to get the p-value. Many online calculators can do this if you enter the t-score and degrees of freedom.
  • Before running a t-test, check for outliers and approximate normality. For very skewed data or small samples, consider a nonparametric alternative.

Troubleshooting

My t-score seems too large or too small. Check your inputs: a small standard error (s/√n) will produce a large t-score. Make sure you entered the sample standard deviation, not the variance. Also verify that the sample mean and hypothesized mean are in the same units.

I get a negative t-score. That is fine. It simply means the sample mean is less than the hypothesized mean. The sign matters for one-tailed tests but not for two-tailed tests.

My sample size is 1. The formula still works, but the t-test is meaningless with n=1 because you cannot estimate the standard deviation from one observation. You need at least two observations to compute a standard deviation.

The calculator gives an error or a weird result. Make sure the sample size is a positive integer, the standard deviation is not zero (unless all data points are identical, in which case the t-test is undefined), and the sample mean is a real number.

I need a p-value, not a t-score. This calculator only gives the t-score. Use a t-table or a p-value calculator with your degrees of freedom (n-1) and the desired tail (one or two).

Frequently Asked Questions

Q: What is the difference between a t-score and a z-score?
A: A z-score is used when the population standard deviation is known or the sample size is very large. A t-score is used when the population standard deviation is unknown and estimated from the sample. The t-distribution has heavier tails, which accounts for the extra uncertainty with small samples.

Q: What does a t-score of 0 mean?
A: A t-score of 0 means the sample mean is exactly equal to the hypothesized mean. There is no evidence of a difference.

Q: How do I find the p-value from the t-score?
A: You need the degrees of freedom (n-1) and the t-score. Use a t-table or statistical software. For a two-tailed test, the p-value is the probability of getting a t-score with absolute value greater than your t-score.

Q: Can I use this formula for a paired t-test?
A: Yes. Compute the difference for each pair, then treat those differences as your sample. Use the mean, standard deviation, and sample size of the differences in this formula, with the hypothesized mean typically set to 0.

Q: What if my data is not normally distributed?
A: For small samples, the t-test assumes approximate normality. If the data is heavily skewed or has outliers, consider a nonparametric test like the Wilcoxon signed-rank test. For large samples (n > 30), the t-test is robust to non-normality due to the Central Limit Theorem.

Q: What is the critical value for a t-test?
A: The critical value depends on your chosen significance level (e.g., 0.05) and degrees of freedom. You look it up in a t-table. If the absolute value of your t-score exceeds the critical value, you reject the null hypothesis.

Related

Formula used
in xbar | Sample mean | - | 105 | 0
in mu | Hypothesized mean | - | 100 | 0
in s | Sample standard deviation | - | 15 | 0
in n | Sample size | - | 30 | 1
out t | t-score | - | (xbar - mu) / (s / sqrt(n)) | 3
out se | Standard error | - | s / sqrt(n) | 3
out df | Degrees of freedom | - | n - 1 | 0

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.