Intermediate

One-Sample t-Test Calculator

Run a one-sample t-test to decide whether your sample mean is significantly different from a hypothesized population value.
Comma- or space-separated values
Null-hypothesis value to test against

Alternative hypothesis

t statistic
0.7276

p-value = 0.4854 · Fail to reject H0 at α = 0.05

tt statistic on the null distribution (df = 9)
Sample mean
5.05
Sample SD
0.2173
Standard error
0.0687
Sample size (n)
10
Degrees of freedom
9
p-value
0.485351
Step by step
  1. 1

    Sample mean x̄

    5.05
    Sum of all observations divided by n.
  2. 2

    Sample SD s (n−1 denominator)

    0.2173
  3. 3

    Standard error SE = s ÷ √n

    0.2173 ÷ √10 = 0.068718
  4. 4

    t statistic

    (5.05 − 5) ÷ 0.068718 = 0.7276
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

A one-sample t-test checks whether your sample mean differs from a hypothesized value μ0. It computes t = (x̄ − μ0)/(s/√n) with n − 1 degrees of freedom, then a p-value from the Student-t distribution. If p is below 0.05, you reject the null hypothesis that the true mean equals μ0.

Formula
t = (x̄ − μ0) / (s / √n), df = n − 1
How this is calculated

Enter your raw sample values (comma- or space-separated), the hypothesized population mean μ0 you want to test against, and the alternative hypothesis (two-tailed or one-tailed). The calculator computes the sample mean x̄, the sample standard deviation s (using n − 1 in the denominator), the standard error s/√n, and the sample size n.

The test statistic is t = (x̄ − μ0) / (s/√n) with df = n − 1 degrees of freedom. The p-value comes from the Student-t distribution evaluated with the regularized incomplete beta function: a two-tailed test uses 2·P(T > |t|), a right-tailed test uses P(T > t), and a left-tailed test uses P(T < t). If the p-value is below the conventional α = 0.05 threshold, the null hypothesis that the population mean equals μ0 is rejected.

The test assumes the observations are independent and approximately normally distributed (or n is large enough for the central limit theorem to apply). It needs at least two values, and a non-zero standard deviation; a sample with no variation makes the standard error zero and the t statistic undefined. The RangeMeter places t on a scale against the approximate ±1.96 critical bounds so you can see how far into the rejection region it falls.

Frequently asked questions

Use a one-sample t-test when the population standard deviation is unknown and you estimate it from the sample, which is almost always the case in practice. The t-distribution accounts for the extra uncertainty, especially with small samples.

It is the probability of observing a sample mean at least as extreme as yours if the true population mean were exactly μ0. A small p-value (below 0.05) suggests the observed difference is unlikely under the null hypothesis, so you reject it.

Estimating the standard deviation from the sample uses up one degree of freedom, so the t-distribution for the test has n − 1 degrees of freedom rather than n.

Also known as

one sample t test
single sample t test
t test
hypothesis test mean
student t test
1 sample t test
compare mean to value
t test one sample

APA

TG we-Calculate Editorial Team. (2026). One-Sample t-Test Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/one-sample-t-test-calculator

Chicago

TG we-Calculate Editorial Team. "One-Sample t-Test Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/one-sample-t-test-calculator.

IEEE

TG we-Calculate Editorial Team, "One-Sample t-Test Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/one-sample-t-test-calculator

BibTeX

@misc{wecalculate_one_sample_t_test_calculator, title = {One-Sample t-Test Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/one-sample-t-test-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?