t-test Calculator

Input your sample data to compute the t-statistic and degrees of freedom.

Sample size: 5

Sample mean: 18.0000

Sample standard deviation: 4.7434

t-statistic: 0.0000

Degrees of freedom: 4

How to Use This Calculator

  1. Select the appropriate t-test type based on study design.
  2. Enter sample data (paired samples must have equal length).
  3. For the one-sample test, specify the null hypothesis mean.
  4. Review the t-statistic, standard errors, and degrees of freedom before using a p-value calculator.

Formula

One-sample: t = (x̄ − μ₀) / (s / √n)

Paired: compute differences d = A − B, then t = (d̄ − 0) / (sd / √n)

Two-sample (pooled): t = (x̄A − x̄B) / √[sp2 (1/nA + 1/nB)] where sp2 = ((nA − 1)sA2 + (nB − 1)sB2) / (nA + nB − 2)

Full Description

The t-test compares sample means assuming approximately normal data with unknown population variance. Select one-sample for a single group, paired for matched observations, and two-sample for independent groups with equal variances.

Use the reported t-statistic and degrees of freedom with the t distribution to determine p-values or confidence intervals.

Frequently Asked Questions

Do I need equal variances for a two-sample t-test?

This calculator assumes equal variances. For unequal variances, use Welch’s t-test.

Can I obtain p-values here?

Use the t-statistic and degrees of freedom with a p-value calculator or t distribution table to determine significance.

How are paired differences handled?

The paired t-test creates a difference series (A − B) and performs a one-sample t-test on those differences.

What if my data are not normally distributed?

For large samples the t-test is often robust, but for small or skewed samples consider nonparametric alternatives.