Try

T-Test Calculator (One-Sample)

One-sample t-statistic and degrees of freedom for a hypothesis test.

t-statistic

2.1909

df = 29 · Significant at p<0.05

Standard error

0.9129

Degrees of freedom

29

Mean difference

2

AI Breakdown & Smart Takeaway

Plain-English insight on your numbers

Get a personalized explanation of what these results mean — and how to improve them.

AdvertisementAd space

How the T-Test Calculator (One-Sample) works

The One-Sample T-Test Calculator computes the t-statistic and degrees of freedom needed to determine whether a sample mean differs significantly from a known or hypothesized population mean. It's designed for students, researchers, and analysts who need to run a formal hypothesis test quickly and accurately without manual computation.

A one-sample t-test answers a deceptively simple question: is the average value you measured from your sample consistent with a specific target or reference value, or is the difference too large to be explained by random chance? To answer this, the calculator takes three inputs—your sample mean, the hypothesized population mean (also called the null hypothesis value), your sample standard deviation, and your sample size—and produces a t-statistic that quantifies how many standard errors your sample mean sits away from the hypothesized value.

The t-statistic is computed by dividing the difference between the sample mean and the hypothesized mean by the standard error of the mean. The standard error itself is calculated as the sample standard deviation divided by the square root of the sample size. A larger absolute t-statistic means your sample result is further from the null hypothesis, making it less likely the difference is due to random variation. The degrees of freedom, always n − 1 for a one-sample test, determine which specific t-distribution is used to evaluate statistical significance.

Once you have the t-statistic and degrees of freedom, you compare it against a critical value from the t-distribution at your chosen significance level (commonly α = 0.05). If the absolute value of your t-statistic exceeds the critical value, you reject the null hypothesis and conclude the sample mean is statistically significantly different from the reference value. Many implementations—including this calculator—also return a p-value directly, which is the probability of observing a t-statistic as extreme as yours (or more so) purely by chance if the null hypothesis were true.

A frequent mistake users make is confusing statistical significance with practical significance. A very large sample size can produce a highly significant p-value even when the true difference between the sample mean and the hypothesized mean is trivially small in the real world. Always pair your t-test result with an effect size measure such as Cohen's d (the mean difference divided by the sample standard deviation) to understand whether the detected difference actually matters in context. Additionally, the one-sample t-test assumes the data are approximately normally distributed or that the sample size is large enough (generally n ≥ 30) for the Central Limit Theorem to apply.

Formula

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

Pro tips

  • Always set your significance level (α) before collecting data, not after seeing results—choosing α based on your p-value inflates the false-positive rate and undermines the integrity of your hypothesis test.
  • If your sample size is below 30, verify that your data are roughly normally distributed (use a histogram or a Shapiro-Wilk test) before trusting the t-test result, since the test's validity depends on this assumption with small samples.
  • Supplement the t-statistic with Cohen's d (d = (x̄ − μ₀) / s) to communicate effect size; a d of 0.2 is small, 0.5 is medium, and 0.8 is large, giving readers practical context that a p-value alone cannot provide.
  • Use a two-tailed test by default unless you had a strong directional prediction before data collection; one-tailed tests are statistically more powerful but only appropriate when you genuinely care about a difference in only one direction.
  • Double-check whether you have the population standard deviation versus a sample standard deviation—if you know the true population σ, you should use a z-test instead of a t-test, which will give a slightly different critical value.

Key terms

T-Statistic
— A standardized value measuring how far the sample mean is from the hypothesized population mean in units of standard error.
Null Hypothesis (H₀)
— The default assumption that the population mean equals a specific hypothesized value, which the t-test attempts to reject.
Degrees of Freedom (df)
— For a one-sample t-test, df = n − 1; this parameter determines the exact shape of the t-distribution used for significance evaluation.
Standard Error of the Mean
— The standard deviation of the sampling distribution of the mean, calculated as the sample standard deviation divided by the square root of the sample size.
P-Value
— The probability of obtaining a t-statistic at least as extreme as the one observed, assuming the null hypothesis is true; smaller values indicate stronger evidence against H₀.
Significance Level (α)
— A pre-set threshold (commonly 0.05) below which the p-value must fall for the result to be declared statistically significant.

Frequently asked questions