ThisCalculator

Everyday

Statistics t score calculator: formula and use

Updated · Standard formula, shown below

t-score 2.7386
Standard error
1.8257
Result
Degrees of freedom
29
Result
Sample mean
50
You entered

A t-score calculator works out the t-statistic from your sample mean, hypothesized population mean, sample standard deviation, and sample size. You enter those four values, and the calculator returns the t-score, which you then compare to a critical value from a t-distribution table (or use with a p-value calculator) to decide whether your sample result is statistically significant.

Formula

The one-sample t-statistic is calculated as:

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

  • x̄ = sample mean (the average of your collected data)
  • μ = hypothesized population mean (the value you are testing against)
  • s = sample standard deviation (a measure of spread in your sample)
  • n = sample size (number of observations)
  • s / √n = standard error of the mean (how much the sample mean would vary from sample to sample)

The t-score tells you how many standard errors your sample mean is away from the hypothesized mean. A larger absolute t-score means the difference is less likely to be due to random chance.

Worked Example

Using the default values: sample mean = 50, hypothesized mean = 45, sample standard deviation = 10, sample size = 30.

  1. Calculate the standard error: s / √n = 10 / √30 ≈ 10 / 5.477 = 1.8257
  2. Calculate the difference between means: x̄ − μ = 50 − 45 = 5
  3. Divide the difference by the standard error: 5 / 1.8257 ≈ 2.7386

The t-score is approximately 2.7386. With 29 degrees of freedom (n − 1 = 29), you would compare this to a critical t-value (for a two-tailed test at α = 0.05, the critical value is about 2.045). Since 2.7386 > 2.045, the result is statistically significant at the 0.05 level.

When to Use a t-Score vs. a Z-Score

Use a t-score when the population standard deviation is unknown and you are working with a sample. This is the most common situation in real research. Use a z-score when you know the population standard deviation (rare) or when the sample size is very large (typically n > 30) and you are willing to approximate. In practice, many statisticians use the t-distribution for any sample size because it is more conservative and works well even for large samples.

The t-distribution is similar to the normal distribution but has heavier tails, which accounts for the extra uncertainty from estimating the standard deviation from the sample. As the sample size grows, the t-distribution approaches the normal distribution.

Common Mistakes and How to Avoid Them

  • Using the wrong standard deviation: The formula requires the sample standard deviation (s), not the population standard deviation (σ). If you only have the variance, take the square root first.
  • Confusing one-tailed and two-tailed tests: The t-score itself is the same, but the critical value you compare it to changes. A two-tailed test splits the alpha level between both tails, so the critical value is larger.
  • Mixing up degrees of freedom: For a one-sample t-test, df = n − 1. For a paired t-test, df = number of pairs − 1. For an independent two-sample t-test, df is more complex (often calculated by software).
  • Forgetting to check assumptions: The t-test assumes the data are approximately normally distributed (especially for small samples) and that observations are independent. If these are badly violated, consider a non-parametric alternative.
  • Rounding too early: Round only at the final step. Rounding intermediate values can change the t-score noticeably, especially with small samples.

How to Choose the Right t-Test

There are three common types of t-tests, and the calculator above handles the one-sample version. Choose based on your study design:

  • One-sample t-test: Compare a sample mean to a known or hypothesized population mean (e.g., test if the average height of a sample differs from 170 cm).
  • Paired t-test: Compare two related measurements (e.g., before and after a treatment on the same subjects). The t-score is calculated on the differences between pairs.
  • Independent two-sample t-test: Compare the means of two separate groups (e.g., a treatment group vs. a control group). This uses a more complex formula that accounts for the variances and sizes of both samples.

For the two-sample version, you also need to decide whether to assume equal variances (Student’s t-test) or unequal variances (Welch’s t-test). Welch’s test is generally safer because it does not assume equal variances and performs well even when the assumption is true.

Reading the Result and Next Steps

The t-score alone does not tell you whether your result is significant; you must compare it to a critical value or convert it to a p-value. Here is how to proceed:

  1. Determine your significance level (α), commonly 0.05.
  2. Determine whether your hypothesis is one-tailed (directional) or two-tailed (non-directional).
  3. Find the critical t-value for your degrees of freedom from a t-table or use a p-value calculator.
  4. If the absolute value of your t-score is greater than the critical value (or the p-value is less than α), reject the null hypothesis.

For the example above, with t = 2.7386 and df = 29, the two-tailed p-value is approximately 0.010. Since 0.010 < 0.05, you would reject the null hypothesis and conclude the sample mean is significantly different from 45.

Limitations of the t-Score

The t-test is robust but has limits. It is sensitive to outliers, which can inflate the standard deviation and reduce the t-score. It assumes the sample is representative and randomly selected. For very small samples (n < 5), the t-test has low power and may miss real effects. Also, the t-test only tells you whether a difference exists, not how large or practically important that difference is. Always report the effect size (e.g., Cohen’s d) alongside the t-score and p-value.

Frequently Asked Questions

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

A t-score is used when the population standard deviation is unknown and you estimate it from the sample. A z-score is used when the population standard deviation is known (or the sample size is large enough to treat the sample standard deviation as a good approximation). The t-distribution has heavier tails, so t-scores are generally more conservative for small samples.

How do I find the p-value from a t-score?

You need the t-score and the degrees of freedom. Then you can use a t-distribution table, a statistical calculator, or software like Excel (T.DIST.2T for two-tailed) to get the p-value. Many online calculators also do this directly.

Can I use a t-test with a sample size of 5?

Technically yes, but the test has very low power with such a small sample, meaning it is unlikely to detect a real effect unless the effect is very large. Also, the normality assumption becomes more important with small samples. If you have fewer than 5 observations, a non-parametric test like the Wilcoxon signed-rank test may be more appropriate.

What does degrees of freedom mean in a t-test?

Degrees of freedom (df) reflect the number of independent pieces of information available to estimate a parameter. For a one-sample t-test, df = n − 1 because you have used the sample to estimate the mean, leaving n − 1 independent deviations. The df affects the shape of the t-distribution and the critical values.

Is a higher t-score always better?

A higher absolute t-score indicates a larger difference relative to the variability, which makes the result more likely to be statistically significant. However, a very high t-score can also occur with a huge sample size even when the actual difference is trivial. Always consider the effect size and practical importance, not just the t-score.

What if my data are not normally distributed?

The t-test is fairly robust to moderate violations of normality, especially with larger samples (n > 30). For severe skewness or with small samples, consider a non-parametric alternative like the Mann-Whitney U test (for two independent groups) or the Wilcoxon signed-rank test (for paired data). These tests do not assume normality.

Related

Formula used
in xbar | Sample mean | - | 50 | 0
in mu | Hypothesized mean | - | 45 | 0
in s | Sample std. deviation | - | 10 | 0
in n | Sample size | - | 30 | 1
out t | t-score | - | (xbar - mu) / (s / sqrt(n)) | 4
out se | Standard error | - | s / sqrt(n) | 4
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.