One Sample T-Test Calculator

One Sample T-Test Calculator

Test whether a sample mean differs from a hypothesized population mean using t = (sample mean - mu0) / (s / sqrt(n)), df = n - 1, p-value, confidence interval, effect size, and alpha decision.

📌Presets

Load a realistic one-sample test, then adjust the sample mean, hypothesized mean, standard deviation, sample size, tail, confidence level, and alpha.

t Statistic -- df = n - 1
p-Value -- selected tail
Mean CI -- confidence interval
Decision -- compare p to alpha

Enter a sample mean, hypothesized mean, sample standard deviation, and sample size to calculate the test.

⚙Test Inputs

Short label for the printed interpretation.
Used in the CI and summary text.
The observed mean from your sample.
The null-hypothesis population mean.
Use sample SD, not standard error.
Degrees of freedom are n - 1.
Tail choice controls the p-value.
Decision rule: reject H0 when p <= alpha.
CI is for the population mean.
Controls p, t, CI, and effect rounding.
Cohen's d = (xbar - mu0) / s.
Breakdown includes the selected interval detail.

🔢Live Test Grid

24degrees freedom
1.500standard error
3.400mean difference
0.453cohen d
0.983left-tail p
0.017right-tail p
0.034two-tail p
2.064critical t

đź“‹Reference Tables

One-sample settingTypical inputNull mean cueTail choiceOutput to report
Class score benchmarkMean score, sample SD, nExpected class averageTwo-tailed if any change matterst(df), p, CI, d
Manufacturing fill auditAverage fill volumeLabel claim or target fillLeft-tailed for underfillp-value and lower-side decision
Battery runtime testMean runtime in hoursAdvertised runtimeRight or two-tailed by protocolCI for mean runtime
Clinical marker screenMean lab marker valueReference population meanTwo-tailed unless direction is pre-setEffect size and assumption note
Sensor bias checkMean reading errorZero error targetTwo-tailed for any biast statistic and CI around bias
Operations timingMean elapsed timeService-level targetLeft for faster, right for sloweralpha decision with practical size
QuantityFormulaUses df?What it means
Mean differencexbar - mu0NoObserved gap between sample mean and null mean.
Standard errors / sqrt(n)NoEstimated sampling spread of the sample mean.
t statistic(xbar - mu0) / (s / sqrt(n))YesDistance from null in standard-error units.
Degrees of freedomn - 1YesControls the Student t distribution shape.
p-valueTail area under t(df)YesEvidence against H0 under the chosen alternative.
Mean CIxbar +/- t* x SEYesPlausible population mean interval at the selected confidence.
Cohen's d(xbar - mu0) / sNoMean gap in sample-standard-deviation units.
df90% CI t*95% CI t*99% CI t*Two-tail alpha .05One-tail alpha .05
52.0152.5714.0322.5712.015

đź§®Formula Notes

Test statistic: t = (sample mean - mu0) / (s / sqrt(n)), with df = n - 1. The p-value is the selected Student t tail area: left, right, or two-tailed.
Confidence interval: mean CI = xbar +/- t* x s / sqrt(n), where t* comes from the selected confidence level and df. The effect size uses Cohen's d = (xbar - mu0) / s.
Use the sample standard deviation. If you already have the standard error, multiply it by sqrt(n) before entering s, otherwise the t statistic will be too large.
Set the alternative first. A one-tailed test should be chosen from the study question before looking at whether the sample mean moved up or down.

Something feels different. Perhaps you suspect that your new manufacturing process is actualy faster. Or maybe the average test score in your class have changed from last semester. Whatever it is, you’ve got the data. You’ve got a benchmark to compare it with.

What’s missing? Is this a change that’s real, or is it simply the sort of random noise you get when you try to measure things? That’s where the one sample t-test comes into play. It allow you to determine whether signal is loud enough for you to be able to hear it over the background hum.

What is a One Sample T-Test?

To understand how this thing works, let’s take a quick peek under the hood. What does it do? It runs the numbers for you if you plug them into the calculator above (here). In short, it asks the following: Is there a difference between mean of your particular group compared to some guessed or known population mean?

To answer that, we want to know three things: 1) The number of observations 2) This is the average (or mean) of your sample. 3) This is the standard deviation of that same sample. Those three numbers tell the story of your data.

Most importantly, the standard deviation conveys how spread out your values are. A small standard deviation indicate that everyone in your sample is pretty similar; detecting a difference becomes relatively easy. A large standard deviation makes it more difficult for you to demonstrate your mean really differs from the benchmark if your data is all over the place. That’s where folks screw up. They only pay attention to the mean and not to the spread.

Then there are degrees of freedom. That’s just the sample size minus one. Why? Because smaller samples aren’t quite as good than bigger ones. To account for that uncertainty, the t-distribution has fatter tails than the normal distribution does. And the larger your sample size, the smaller those tails become. In other words, the t-distribution increasingly looks like textbook bell curve.

The page’s reference table makes this clear. It shows the critical values at varying sample sizes so that you can see how much they decrease as you collect more data. When your sample is small, you’re paying a premium for uncertainty.

The next question is what’s the correct choice for tail? Here again, think before looking. The default answer is a two-tailed test, which essentially asks “Is the mean different in either direction (higher or lower)?” If you don’t have a strong prior expectation of direction, this is a reasonable guess.

By contrast, a one-tailed test is more specific: it asks “Is the mean strictly greater then or strictly less than the benchmark value?” You get more statistical power to detect a difference in the chosen direction, but there’s a cost: if the difference turns out to go the opposite direction then you must accept the null hypothesis, even if the difference is large. This is not just a mathematical tradeoff, but a strategic one.

The test is run and you obtain a p-value. The p-value shows how likely it is that you would get your result (or something even more extreme) if the null hypothesis were true. A low p-value means that the difference you observe are unlikely to have occurred by chance alone. Although 0.05 is commonly used as a cutoff, this is an arbitrary cut in the sand.

For more context, there’s also the confidence interval. The confidence interval puts into perspective what possible values for the true population mean could be. If the value falls within your hypothesized mean then there is no claim of significance. Not only does the interval tell you whether or not you’re wrong, but it will tell you how wrong you may be.

And finally, we have effect size. Practical significance isn’t necessarily statistical significance. Perhaps you have a really huge sample and found some small difference between two adult-sized sofa that is statistically true. But is it meaningful? That depends on how much of a difference it is.

How big is the difference? The effect size is measured in standard deviation units using Cohen’s d. This gives you an idea about how large the difference is. It separates the important results from the unimportant ones, in ways that a raw p-value simply can’t do.

If you have a small sample and a large effect size, it may not be significant, but tell you there’s something worth looking into. If you have a huge sample size and tiny effect size, then yes, it will be significant, but maybe it doesn’t mean very much. Know the former, and you should of known the latter.

It makes you specific. It doesn’t allow you to say, “things are different.” You need to say what different is, how uncertain you can afford to be, and how large the difference has to be for it to matter.

It structures your hunch. It transforms your opinion into a conclusion. It is a conclusion based off numbers but framed by context.

How do you go from not knowing to knowing?

One Sample T-Test Calculator