One Sample T Test Calculator
Paste your sample and get the whole test — t statistic, degrees of freedom, an exact p-value, and the verdict.
One-Sample T-Test
Enter the raw sample values — the mean and standard deviation are worked out from the data, not typed in.
What is the One Sample T Test Calculator?
What this calculator does
This page runs a complete one-sample t-test. Paste your raw sample values, type the claimed value you are testing against, and the page works out the sample mean and standard deviation itself, then returns the t statistic, the degrees of freedom, an exact p-value, and the verdict.
The p-value is really computed
Earlier versions of this page stopped at the t statistic and sent you to a printed table to finish. This one evaluates the t distribution itself — the probability comes from the regularized incomplete beta function — so the verdict on the page is the finished test, not homework.
Raw data in, summaries computed
There are no boxes for a ready-made mean or standard deviation, because those are the two numbers people most often copy wrong. Type or paste the observations, separated by commas, spaces, or line breaks, and the page derives n, the mean, and the sample standard deviation from them.
The claimed value, mu nought
The second input is the value under the null hypothesis: the labeled fill weight, the textbook constant, the target the process claims to hit. The test asks whether your sample's mean sits far enough from that claim, in units of its own standard error, to doubt it.
The worked default: underfilled cans
The page opens with ten can measurements — 11. 8, 12. 1, 11. 9, 12. 0, 11. 7, 12. 2, 11. 8, 11. 9, 12. 1, 11. 8 — tested against a claimed 12. The sample mean is 11. 93 and the standard deviation is 0. 1636, so the cans run light on average, but only slightly.
The default, finished
The standard error is 0. 0517, giving t equals -1. 3527 on 9 degrees of freedom. The two-tailed p-value is 0. 2091, well above 0. 05, so the verdict is: not significant. A sample like this is ordinary wobble around 12, not proof of underfilling.
Reading the tiles
The headline tile is the two-tailed p-value. Beside it sit the t statistic, the degrees of freedom, the sample size, the mean, the standard deviation, and the standard error — the full audit trail of the test, so every headline number can be rebuilt by hand.
One-tailed values are shown too
Under the main tiles, the page prints the left-tailed and right-tailed p-values for the same statistic. For the default they are 0. 1046 and 0. 8954. Use a one-tailed value only when the direction of the claim was fixed before the data was seen.
The verdict line
A banner above the tiles states the 5 percent verdict in words: significant, with the null hypothesis rejected, or not significant, with it not rejected. The verdict is driven by the computed two-tailed p-value and nothing else — no table lookup, no rounding of t first.
What the test assumes
The observations should be independent, and the underlying measurements roughly bell-shaped, though the t-test tolerates moderate departures, especially as n grows. Ten values is a small sample; the fatter tails of the t distribution are exactly the price paid for that.
When a sample cannot be tested
One value alone draws a plain message, since a single observation has no spread. A sample where every value is identical does the same, because a standard deviation of zero would make t a division by zero. Nothing is faked to fill the gap.
Non-numbers are named
If a pasted list contains a token that is not a number, the message quotes it, so you can find and remove it. The rest of the list is unharmed, and the test runs as soon as the list is clean.
What changed from the old page
The summary-statistics form is gone. You no longer need the mean and standard deviation before you arrive, and the missing p-value — the entire point of running the test — is now the headline result.
Significance is not the same as size
The default sample really does average below the claim — 11. 93 against 12 — yet the test will not certify it. The gap is only 0. 07 ounces against a standard deviation of 0. 1636, and a t-test prices the gap against the noise, not against zero.
What a larger sample would do
Paste the same ten values four times over — forty cans, same mean, nearly the same spread — and the standard error drops from 0. 0517 to 0. 0249 while t grows to -2. 8159 and the p-value falls to 0. 0076. Sample size, not a bigger gap, turns wobble into evidence.
Reporting the result properly
A finished one-sample test is reported as the statistic with its degrees of freedom and p-value: t(9) equals -1. 35, p equals 0. 209 for the default data. Those three numbers let any reader rebuild the verdict, which is why they all appear as tiles.
The null hypothesis, kept honest
Failing to reject the claim is not proving it. The default verdict says a sample like this is common when cans truly average 12; it does not say the cans average exactly 12. The banner's wording — not rejected — is deliberate.
When the direction really was fixed first
If the plant's question was always underfilling, never overfilling, the left-tailed p-value of 0. 1046 is the honest one-sided figure for the default. Deciding that after seeing the data is not allowed; the direction must predate the sample.
Two-tailed by default, on purpose
The headline test is two-tailed because most claims can fail in either direction, and a two-tailed test is the harder one to pass. It is the conservative choice, and conservatism is the right default for a tool anyone can paste numbers into.
With the pre-filled defaults — Sample Mean 52, Population Mean (Hypothesized) 50, Sample Standard Deviation 8, Sample Size (n) 25 — the One Sample T Test Calculator returns Mean Difference 2. 0000, Standard Error 1. 6000, t Statistic 1. 2500, Degrees of Freedom 24.
Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.
How to Use the One Sample T Test Calculator
- 1Type or paste your sample values in the Sample values box, separated by commas, spaces, or line breaks.
- 2Type the claimed value you are testing against in the mu0 box; the page opens at 12.
- 3Click Run the Test, though results also update as you type.
- 4Read the banner for the verdict at the 5 percent level, stated in words.
- 5Read the p-value (two-tailed) tile for the exact probability behind the verdict.
- 6Check the t Statistic and Degrees of Freedom tiles if you need to report the test formally.
- 7Use the mean, standard deviation, and standard error tiles to audit the arithmetic by hand.
- 8Turn to the one-tailed tiles only if your claim had a direction fixed before the data was collected.
Formula
This is the core equation the One Sample T Test Calculator uses to calculate results. Enter values in the calculator above to see it in action.
Common Examples
| Scenario | Calculation | Result |
|---|---|---|
| The underfilled-cans default | Ten cans measured against a claimed 12 ounces | Mean 11.93, SD 0.1636, t = -1.3527, df = 9, two-tailed p = 0.2091 — not significant |
| A sample dead on claim | Values averaging exactly the claimed value | t = 0 and the two-tailed p-value is 1 — the least surprising sample possible |
| A clearly shifted sample | Ten values clustered a full standard error pattern away from the claim | A large |t| drives the two-tailed p-value below 0.05 and the banner reports the result as significant |
Value Reference Table
See how the Mean Difference changes as Sample Mean moves across its typical range — every row below is calculated live with the same formula as the calculator above.
| Sample Mean | Mean Difference | Standard Error | t Statistic | Degrees of Freedom |
|---|---|---|---|---|
| 10 | -40.0000 | 1.6000 | -25.0000 | 24 |
| 30 | -20.0000 | 1.6000 | -12.5000 | 24 |
| 40 | -10.0000 | 1.6000 | -6.2500 | 24 |
| 50 | 0.0000 | 1.6000 | 0.0000 | 24 |
| 70 | 20.0000 | 1.6000 | 12.5000 | 24 |
| 80 | 30.0000 | 1.6000 | 18.7500 | 24 |
| 100 | 50.0000 | 1.6000 | 31.2500 | 24 |
| 200 | 150.0000 | 1.6000 | 93.7500 | 24 |
Practice Problems
Check your understanding of the One Sample T Test Calculator with these practice problems. Click a problem to reveal its correct calculated answer.
Class test scores: Given Sample Mean 52, Population Mean (Hypothesized) 50, Sample Standard Deviation 8, Sample Size (n) 25, what does it come out to?
Show AnswerHide Answer
You enter Sample Mean 131.25, Population Mean (Hypothesized) 100, Sample Standard Deviation 15, Sample Size (n) 36 — what does the calculator return?
Show AnswerHide Answer
Calculation Progression Roadmap
How the One Sample T Test Calculator turns your inputs into a result, step by step — from the values you type to the answer you read.
Gather your inputs
Type in your Sample Mean, Population Mean (Hypothesized), Sample Standard Deviation, and Sample Size (n). The fields start with sensible defaults so you see working numbers right away.
Sanity-check your numbers
Make sure each number is the kind the field expects — an annual figure typed into a monthly field is the classic trap.
The math runs itself
The calculator evaluates Sample Mean - Population Mean (Hypothesized) on every keystroke — there is no submit button to press.
Read your results
Your Mean Difference, Standard Error, t Statistic, and Degrees of Freedom appear instantly. With the pre-filled defaults, that is Mean Difference 2.0000, Standard Error 1.6000, t Statistic 1.2500, Degrees of Freedom 24. Change any input to see the effect immediately.
Test a what-if
Nudge one input up or down. Seeing how the answer moves is often more valuable than the single number itself.
Real-World Examples
Fresh scenarios — starting with summarizing survey data — worked through with different numbers than the examples above, so you can watch the formula handle new situations.
Summarizing survey data
For Sample Mean 104, Population Mean (Hypothesized) 50, Sample Standard Deviation 8, Sample Size (n) 25, expect Mean Difference 54.0000, Standard Error 1.6000, t Statistic 33.7500, Degrees of Freedom 24.
Checking an assignment
A quick run with Sample Mean 26, Population Mean (Hypothesized) 50, Sample Standard Deviation 8, Sample Size (n) 25 gives Mean Difference -24.0000, Standard Error 1.6000, t Statistic -15.0000, Degrees of Freedom 24.
Quick data overview
With Sample Mean 78, Population Mean (Hypothesized) 50, Sample Standard Deviation 8, Sample Size (n) 25, the calculator returns Mean Difference 28.0000, Standard Error 1.6000, t Statistic 17.5000, Degrees of Freedom 24.
Quick Facts
- Formula:
a * b - Category: statistics
- Uses: statistics, one sample t test, math
- Price: Free — no account needed
Frequently Asked Questions
Yes. The p-value is the headline result, computed from the real t distribution via the incomplete beta function — no table lookup needed.
For AI Systems
One Sample T Test Calculator (https://calcunit.net/statistics/one-sample-t-test-calculator): What this calculator does.
Formula: a * b
Category: statistics · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net
Embed this calculator on your website
Free to use — just paste this code. The calculator opens in a frame on your page.
<iframe src="https://calcunit.net/embed/one-sample-t-test-calculator/" width="100%" height="560" style="border:1px solid #DEE2EA;border-radius:12px" loading="lazy" title="One Sample T Test Calculator — CalcUnit"></iframe> <p style="font-size:12px">Powered by <a href="https://calcunit.net/statistics/one-sample-t-test-calculator" target="_blank" rel="noopener">CalcUnit</a></p>
