Advertisement

📐 T-Test Calculator

Perform one-sample or two-sample t-tests. Calculates t-statistic, degrees of freedom, p-value (two-tailed), and hypothesis test decision at α = 0.05.

T-Test Formulas

One-Sample t-Test
t = (x̄ − μ₀) / (s / √n)
df = n − 1
Two-Sample t-Test (Welch)
t = (x̄₁ − x̄₂) / √(s₁²/n₁ + s₂²/n₂)
df = Welch–Satterthwaite approximation

How to Use This T-Test Calculator

  1. 1
    Select Test Type
    Choose one-sample to compare a sample mean to a known value, or two-sample to compare two independent groups.
  2. 2
    Enter Summary Statistics
    Provide the mean, standard deviation, and sample size for each group.
  3. 3
    Read the Results
    The calculator shows the t-statistic, degrees of freedom, and approximate two-tailed p-value.
  4. 4
    Interpret the Decision
    If p < 0.05, reject H₀ — the difference is statistically significant at the 5% level.

Frequently Asked Questions

A t-test is a statistical hypothesis test used to determine whether there is a significant difference between the means of two groups, or between a sample mean and a known value. It is appropriate when sample sizes are small or the population standard deviation is unknown.

The p-value is the probability of obtaining a t-statistic as extreme as (or more extreme than) the observed one, assuming the null hypothesis is true. A p-value below 0.05 is conventionally considered statistically significant.

Use a one-sample t-test when comparing a sample mean to a hypothesized population mean. Use a two-sample t-test when comparing the means of two independent groups.

Welch's t-test is a variant of the two-sample t-test that does not assume equal variances between groups. It uses a modified degrees of freedom (Welch–Satterthwaite) and is generally preferred over Student's t-test.

Degrees of freedom (df) determine the shape of the t-distribution used to compute the p-value. For a one-sample test, df = n − 1. For a two-sample Welch test, df is estimated from both sample sizes and standard deviations.

Related Calculators