Test a sample mean against a target, a label or a norm. Paste the data or type mean, SD and n to get t, p, the confidence interval, Cohen's d, Hedges' g and the n needed for 80% power.
One-Sample T-Test Calculator - p-Value, CI and Power
Test a sample mean against a target, a label or a norm. Paste the data or type mean, SD and n to get t, p, the confidence interval, Cohen's d, Hedges' g and the n needed for 80% power.
Parameters
Enter data for calculations
💡 Fill in all required fields to unlock the calculate button
One-sample t-test against a label, a target or a norm
Ten boxes of cereal labeled 12 oz average 11.916 oz on a kitchen scale. That is 0.084 oz short, less than one percent, and the question is whether it is a real underfill or the luck of ten boxes. The calculator answers with t = -5.273 and a one-sided p = 0.0003, then adds the confidence interval, Cohen's d, Hedges' g and the sample size a test of this effect would need for 80% power. It takes either the raw measurements or a mean, a standard deviation and a sample size from a report.
Problem: a small gap and a small sample
Solution: measure the gap in standard errors
Six choices, in the order the form asks
- How you enter the sample - raw measurements when you have every value, or the mean, standard deviation and sample size from a report or a spreadsheet summary.
- Measurements - numbers separated by spaces, commas or new lines, with a dot for decimals and no thousands separators. At least 2, up to 5,000.
- Mean, standard deviation, sample size - for the second option. The standard deviation must be the sample one, divided by n - 1, which is what STDEV.S in Excel and sd() in R return.
- Reference value - the number you test against: a label weight, a specification, a published norm, last year's average. Fix it before looking at the data.
- Alternative hypothesis - two-sided when any difference matters, one-sided (greater or less) only when the direction was decided in advance, as with an underfill check.
- Significance level - 0.05 as the usual threshold, 0.01 when a false alarm is expensive, 0.10 for a first screening. Read t, p and the interval in the result.
Four outcomes, from p and d together
A p-value answers whether the gap could be chance. Cohen's d, the gap divided by the standard deviation, answers whether it is large. The result shows both, and the four combinations call for different conclusions.
| What the result shows | Reading | Next step |
|---|---|---|
| p below alpha, |d| of 0.5 or more | A real and sizeable difference | Report the interval, not just the p-value |
| p below alpha, |d| under 0.2 | Real, but small enough to be irrelevant | Judge the gap in your own units |
| p above alpha, |d| of 0.5 or more | Inconclusive: the sample is too small | Collect the n shown for 80% power |
| p above alpha, |d| under 0.2 | No sign of a difference worth finding | Stop, or check the interval width |
Five samples tested against a fixed number
How many measurements a given effect needs
The last tile of the result is the sample size that gives an 80% chance of a significant result if the true effect equals the d you observed. It comes from the noncentral t distribution, the same calculation power software runs, not from a rule of thumb.
| Effect size d | Two-sided, alpha 0.05 | One-sided, alpha 0.05 | Two-sided, alpha 0.01 |
|---|---|---|---|
| 0.2 (small) | 199 | 156 | 296 |
| 0.3 | 90 | 71 | 134 |
| 0.5 (medium) | 34 | 27 | 51 |
| 0.8 (large) | 15 | 12 | 22 |
| 1.0 | 10 | 8 | 16 |
Critical t, for checking a result by hand
A two-sided test is significant when |t| exceeds the value in the row for n - 1 degrees of freedom. The cereal's t of -5.273 clears 2.262 easily; a one-sided test at 0.05 uses the 0.10 column.
| Degrees of freedom | alpha 0.10 | alpha 0.05 | alpha 0.01 |
|---|---|---|---|
| 1 | 6.314 | 12.706 | 63.657 |
| 5 | 2.015 | 2.571 | 4.032 |
| 9 | 1.833 | 2.262 | 3.250 |
| 15 | 1.753 | 2.131 | 2.947 |
| 24 | 1.711 | 2.064 | 2.797 |
| 30 | 1.697 | 2.042 | 2.750 |
| 60 | 1.671 | 2.000 | 2.660 |
| 120 | 1.658 | 1.980 | 2.617 |
What readers ask about the one-sample t-test
Related tools
Two-Sample T-Test Calculator
Compare two groups, or before and after on the same people, with Welch, Student or the paired test - See calculator
P-Value Calculator
Turn a t printed in a paper or a printout into a p-value, or look up the critical t for any alpha - See calculator
Wilcoxon Test Calculator
The rank-based alternative when a short list is skewed or has an outlier - See calculator
Z-Score Calculator
Place one value against a mean and SD, or flag outliers in the list before testing it - See calculator
Coefficient of Variation Calculator
Relative spread in percent, useful when comparing precision across scales - See calculator
Interquartile Range Calculator
Quartiles and outlier fences for the same measurements - See calculator
Standard Deviation Calculator
Sample and population SD, the number the t statistic divides by - See calculator
Average Calculator
Mean, median and weighted average of a list - See calculator