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.
Alternative hypothesis
p-value = 0.4854 · Fail to reject H0 at α = 0.05
- 1
Sample mean x̄
5.05Sum of all observations divided by n. - 2
Sample SD s (n−1 denominator)
0.2173 - 3
Standard error SE = s ÷ √n
0.2173 ÷ √10 = 0.068718 - 4
t statistic
(5.05 − 5) ÷ 0.068718 = 0.7276
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
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
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
TG we-Calculate Editorial Team. "One-Sample t-Test Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/one-sample-t-test-calculator.
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
@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?
