Quick answer
The one-sample t statistic is t = (x̄ − μ₀) ÷ (s ÷ √n). With x̄ = 52, μ₀ = 50, s = 10 and n = 25, t = 1 with 24 degrees of freedom and a two-tailed p = 0.3273.
Enter the sample mean, hypothesised mean, SD, sample size and test type. The calculator returns t, degrees of freedom, p-value and standard error.
Related tools: Chi-Square Statistic Calculator: Goodness-of-fit chi-square from observed and expected counts. P-Value Calculator: P-value from a z, t, chi-square or F statistic. Critical Value Calculator: Critical values for z, t, chi-square and F distributions.
How to use the T Statistic Calculator
- Enter sample mean.
- Enter hypothesised mean.
- Enter sample standard deviation (s) (above 0).
- Enter sample size (a whole number, 2 or more).
- Choose test type: Two-tailed, Left-tailed and Right-tailed.
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| Sample mean | A number | — |
| Hypothesised mean | A number | — |
| Sample standard deviation (s) | A number | > 0 |
| Sample size | A whole number | ≥ 2 |
| Test type | Choose one: Two-tailed; Left-tailed; Right-tailed | Starts at Two-tailed |
Formula and method
Formula
t = (x̄ − μ₀) ÷ (s ÷ √n)
IEEE-754 double precision; shown to at most 6 decimal places.
Same computation as the one-sample t-test.
Worked examples
This example is verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: Sample mean = 52; Hypothesised mean = 50; Sample standard deviation (s) = 10; Sample size = 25; Test type = Two-tailed.
| Result | Value |
|---|---|
| t statistic | 1 |
| Degrees of freedom | 24 |
| p-value | 0.327287 |
| Standard error | 2 |
The first line is the headline result (t statistic). Below it the t Statistic Calculator lists degrees of freedom, p-value and standard error, which describe the same case from other angles. IEEE-754 double precision; shown to at most 6 decimal places.
Worked example
SE = 10 ÷ 5 = 2, so t = 2 ÷ 2 = 1. A t of 1 is well inside the typical range, so the p-value of 0.33 gives no evidence the mean differs from 50.
Conditions
The test assumes roughly normal data, or a large n. n must be at least 2. For a known population σ, use the z-test.
How the result changes with sample mean
Holding every other input at the first worked example, this table changes only sample mean. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.
| Sample mean | t statistic | Degrees of freedom | p-value |
|---|---|---|---|
| 26 | -12 | 24 | 0 |
| 52 | 1 | 24 | 0.327287 |
| 104 | 27 | 24 | 0 |
| 208 | 79 | 24 | 0 |
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- Sample standard deviation (s): entering "0" shows "Sample standard deviation (s) must be greater than 0." beside that field and no result.
Choosing between the T Statistic Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Chi-Square Statistic Calculator](/statistics/chi-square-statistic-calculator/) | observed counts and expected counts | Chi-square |
| [P-Value Calculator](/statistics/p-value/) | test statistic, statistic value and test type | p-value |
| [Critical Value Calculator](/statistics/critical-value/) | distribution, significance level and tails | Critical value |
| [Degrees of Freedom Calculator](/statistics/degrees-of-freedom/) | test and n₁ | Degrees of freedom |
| [One-Sample T-Test Calculator](/statistics/t-test-calculator/) | sample mean, hypothesised mean and sample standard deviation | t statistic |
Background: hypothesis testing and inference
A hypothesis test compares a test statistic with what the null hypothesis predicts. The decision rule is to reject the null hypothesis when the p-value is at or below the significance level α, which you should choose before seeing the data (0.05 is conventional, not special). For a two-tailed z test the p-value is 2 × (1 − Φ(|z|)); for a one-sample t test the statistic is (x̄ − μ₀) ÷ (s ÷ √n) with n − 1 degrees of freedom.
Failing to reject the null hypothesis does not prove it true, and a statistically significant result can still be too small to matter in practice.
Assumptions and limitations
- n ≥ 2
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for sample standard deviation (s) to confirm this.
Frequently asked questions
What t is significant at df 24?
With 24 degrees of freedom the two-tailed 5% critical value is about ±2.064.
What is a one-tailed test?
Tests one direction.
What if I have two samples?
Use a two-sample t-test.
What does the T Statistic Calculator calculate?
t statistic from summary statistics. It returns t statistic, Degrees of freedom, p-value and Standard error.
What formula does the T Statistic Calculator use?
t = (x̄ − μ₀) ÷ (s ÷ √n). Same computation as the one-sample t-test.
What do I need to enter in the t Statistic Calculator?
You enter Sample mean, Hypothesised mean, Sample standard deviation (s), Sample size and Test type.
How is the result rounded or limited?
IEEE-754 double precision; shown to at most 6 decimal places. n ≥ 2.
What does the “Test type” option change?
It sets how the t Statistic is worked out. The choices are Two-tailed, Left-tailed and Right-tailed.
What is an example of a t Statistic result?
With sample mean 52, hypothesised mean 50, sample standard deviation (s) 10, sample size 25 and test type Two-tailed, the t statistic is 1.
Related calculators
- Chi-Square Statistic Calculator — Goodness-of-fit chi-square from observed and expected counts.
- P-Value Calculator — P-value from a z, t, chi-square or F statistic.
- Critical Value Calculator — Critical values for z, t, chi-square and F distributions.
- Degrees of Freedom Calculator — Degrees of freedom for one- and two-sample t-tests.
- One-Sample T-Test Calculator — One-sample t-test from summary statistics.
- One-Sample Z-Test Calculator — Z-test for a mean with known population standard deviation.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods (itl.nist.gov/div898/handbook)
- Standard textbook definitions (e.g. Moore, McCabe & Craig, Introduction to the Practice of Statistics)
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.