Mihsaba›Statistics & Probability›One-Sample T-Test Calculator

One-Sample T-Test Calculator

Calculate the t statistic, degrees of freedom and p-value for a one-sample t-test from sample mean, standard deviation, sample size and hypothesized mean.

The result is mathematical and depends on test assumptions and sampling; it does not replace statistical interpretation of the real context.

Share this free calculator

Send this tool to someone who needs the calculation.

How to use

This one-sample t-test compares a sample mean with a hypothesized mean when the population standard deviation is unknown and the sample standard deviation is used instead. It returns t, degrees of freedom, standard error and p-value.

  1. Enter the sample and hypothesized means.
  2. Enter a positive sample standard deviation and integer n≥2.
  3. Choose the alternative-hypothesis tail.
  4. Review t, df, standard error and p-value.

How it is calculated

t=(x̄−μ₀)/(s/√n), with df=n−1

Example

Example: sample mean 52, hypothesized mean 50, sample SD 8 and n=30 gives t≈1.369 with 29 degrees of freedom. The p-value depends on whether the pre-specified alternative is one- or two-tailed.

Important notes

The test assumes independent observations and an appropriate sampling design; for small samples, the shape of the underlying distribution matters more. The calculator cannot validate study design.

Worked examples and interpreting results

Sample mean 12 versus hypothesized mean 10, sample deviation 4 and size 16 give standard error 1 and t=2 with 15 degrees of freedom.

Worked examples and interpreting results
CaseCalculationResult
Standard error4 ÷ √161
Test statistic(12 − 10) ÷ 12

How to check the result

Enter the four values and choose tails according to a prespecified hypothesis. This tests one sample mean; it assumes independence and, for small samples, a suitable normality assumption.

Frequently asked questions

t versus z?

t is commonly used when population SD is unknown and estimated from the sample.

What are the degrees of freedom?

For this one-sample test, df=n−1.

Is this a two-sample calculator?

No. This page implements the one-sample t-test.

Does a small p-value prove the alternative?

No. It is evidence within a specified model and assumptions, not absolute proof.